Open garfieldnate opened 1 year ago
You can set the random seed via srand. This may also not be good enough, but is definitely part of the solution.
On Fri, Sep 22, 2023, 5:50 PM Nathan Glenn @.***> wrote:
What sources of randomness exist in Soar, and what settings should be used to ensure deterministic behavior of an agent between runs?
In an internal discussion it came up that indifferent-selection --first by itself is not good enough.
— Reply to this email directly, view it on GitHub https://github.com/SoarGroup/Soar/issues/385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECTXHMWXM4MWBWWJQTIWLX3YBZZANCNFSM6AAAAAA5DVQCRY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
It looks to me like that seed is only used in exploration.cpp, in parts that don't get utilized if the user has set indifferent-selection --first
. There's one more usage for capturing input in SML, but I don't think it changes agent behavior.
Peter found during investigation of some non-determinism in operator selection that srand X
would not give deterministic behavior for his agent, but decide srand X
would. Investigate how these are related (or unrelated!).
We also have some non-determinism in the unit tests that sometimes fail: https://github.com/SoarGroup/Soar/issues/338. Not sure if these are all related to chunking or not.
Another flakey test: testSpreadingActivation_AlphabetAgentAllOn.
Might not be directly related, but we do have a couple of compilation warnings in the spreading source:
Core\SoarKernel\src\semantic_memory\smem_activation.cpp(1147): warning C4805: '==': unsafe mix of type 'T' and type 'bool' in operation
with
[
T=boolean
]
D:\a\Soar\Soar\Core\SoarKernel\src\semantic_memory\smem_activation.cpp(394) : warning C4700: uninitialized local variable 'previous_time' used
What sources of randomness exist in Soar, and what settings should be used to ensure deterministic behavior of an agent between runs?
In an internal discussion it came up that
indifferent-selection --first
by itself is not good enough.