soartech / jsoar

Pure Java implementation of the Soar cognitive architecture.
http://soartech.github.com/jsoar/
BSD 3-Clause "New" or "Revised" License
54 stars 19 forks source link

rete-net --load changes agent behavior #94

Closed marinier closed 11 years ago

marinier commented 11 years ago

To reproduce:

  1. in a debugger, source /jsoar-core/src/test/resources/org/jsoar/kernel/FunctionalTests_testWaterJugLookAhead.soar
  2. rete-net -s test.jrete
  3. srand 2000
  4. run (should finish in 27 dcs)
  5. close and restart debugger
  6. rete-net -l test.jrete
  7. srand 2000
  8. run

Expected: finishes in 27 dcs. Actual: runs much, much longer (I think it actually gets in an infinite loop, which is not necessarily related).

Somehow, loading rules with rete-net is changing the way the random seed affects operator selection? Huh?

cnewton commented 11 years ago

Fixed in rete-srand-patch branch.

When the child nodes of a ReteNode are read in, they're head-inserted into the list of children, i.e., inserted in the reverse order than they appear in the (j)rete file.

CSoar seems to have the same issue and we'll probably need to back port our change.

marinier commented 11 years ago

Confirmed fixed.

marinier commented 11 years ago

FYI, I've posted the bug to csoar, along with the change you made so hopefully they will be able to duplicate your fix easily.

On Tue, Mar 19, 2013 at 6:02 PM, cnewton notifications@github.com wrote:

Fixed in rete-srand-patch branch.

When the child nodes of a ReteNode are read in, they're head-inserted into the list of children, i.e., inserted in the reverse order than they appear in the (j)rete file.

CSoar seems to have the same issue and we'll probably need to back port our change.

— Reply to this email directly or view it on GitHubhttps://github.com/soartech/jsoar/issues/94#issuecomment-15146260 .

marinier commented 11 years ago

I guess I shouldn't close this until the change has been pushed to the public repo.