Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singletons setting unit tests fix #442

Merged
merged 37 commits into from
May 1, 2024

Conversation

scijones
Copy link
Contributor

I will also add this as a feature request if and when this is pulled. The problematic tests worth a future second glance:

Teach_Soar_90_Games
Demo_ToH_Recursive (probably worth just omitting this test from usual unit testing or rewriting the agent for this test)
Operator_Selection_Knowledge (AKA Operator_Selection_Knowledge_Mega_Test)
Constraint_Prop_from_Base_Conds

Everything else mostly seemed to be about removing redundant testing in the expected chunks where there really was only one thing in a superstate, but two branches of logic had varying levels of constraint. In these cases, because of the extra constraints now being condensed to constrain one symbol, chunks are essentially the same, but less general hopefully in a more correct way for typical usage.

… into a singleton pattern, set to "on" by default""

This reverts commit e96acdd.
… not have a redundant second test for the same wme.
…oar to no longer have three extra redundant ontop relations in the chunks.
…ted.soar to no longer redundantly test the same bottom block twice.
…r expect chunks with redundant testing of the same ^binding
…not expect a redundant test for the water jug problem space.
…t for a single foo satisfying both negations. technically this is a slightly less general chunk, but still correct.
…unk with combined tests where they used to be split.
…used to disable new singletons-by-default behavior

Note that it's a matter of "if these two branches of logic didn't necessarily have to test the same WME from the perspective of the backtracing, it's just by happenstance that they did" where the new behavior is "and so because they did ultimately test the same superstate wme, we won't generalize to say that potentially this logic would have happened had they tested different wmes". The old behavior was basically "and so we'll generalize that if different wmes lead to those same logic traces in the future, we'll already have the chunk"
…ts. note that the point of the test was to examine whether things were literalized that should be, so this is actually "more correct" imo than what was occurring.
… not redundantly test the same object1 twice. it seems like this is another case where maybe the default to have singletons leads to a more correct chunk, but I'm not certain.
…tors present with the same names. They weren't really there, though. but yes, two logic paths, so it once again comes down to whether "identity" should be based entirely on the testing logic or based on the superstate. Ahem: Updated ChunkingTests_Chunk_Operator_Tie_Impasse to expect chunks without redundant tests.
… variable in the RHS where I think it is supposed to use a literalization.
… test for ^value 3 and not variablized ^values.
…the point here is that with the singletons setting on, the intersection of the disjunctive sets is really what becomes the condition in the learned chunk. so, updating disjunction_merge to expect only the intersection of the disjunctive tests as the learned disjunction conditions.
… like in this test, it defeats the point of the test. so, updated justifications_get_new_identities to turn automatic singletons off.
…ed to be testing exactly, but all I had to do was eliminate redundant tests, so, I think this is fine.
…at the right chunks should be, so for now this has the new setting turned off.
… (a chunk learned from a chunk), and it seemed like it could suck up a lot of time to determine the correct behavior, so the automatically-create-singletons setting is off.
… to easily determine correct chunks in short period of time, so automatically-create-singletons off
…ct the automatically-create-singletons tests to be on.
…l (earlier commit) expectation, there was redundant testing, so I'm just using the new chunk as the "correct" expectation for this test.
…g this test in for now. does give old behavior with the automatically-create-singletons off setting.
…ched to off, the old behavior is not precisely replicated, but it seems to be a brittle test in general. I suppose just having the setting in there at all provides the potential for some arbitrary reordering somewhere. this "fix" is to allow one more chunk not to be recognized in order to pass the test.
@scijones scijones linked an issue Apr 1, 2024 that may be closed by this pull request
@scijones
Copy link
Contributor Author

scijones commented May 1, 2024

I went ahead and manually ran the 90 games. It doesn't seem to hang within a game and runs for about the same number of decision cycles as before and ends in the same state -- halted and waiting using the operator "wait-for-response".

So, I think this is fine to merge.

@scijones scijones merged commit d0dfcc8 into development May 1, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review and update these chunking unit tests
1 participant