[ODE] Non-deterministic behavior

Gary R. Van Sickle g.r.vansickle at worldnet.att.net
Sun Aug 31 21:02:02 2003


> On Sat, 30 Aug 2003 nlin@nlin.net wrote:
>
> > As a comment I'd like to point out that test_crash.exe (the stepfast
> > demo) gives non-deterministic behavior. You can press "r" to reset the
> > simulation, yet if you press "r" several times, the car(s) crash into
> > the wall in different ways each time. I don't know if this is due to
> > stepfast or ODE or a flaw in test_crash.cpp, but it's worth
> > investigating.
>
> Stepfast has an option to give deterministic vs. non-deterministic
> behavior.  In the code I have (which isn't current), it's controlled with
> this #define near the top of stepfast.cpp:
>
> #define RANDOM_JOINT_ORDER
>

I wonder if it wouldn't make sense to:

1.  Implement a portable PRNG in ODE used just for randomizing joint solving
order.
2.  Change that to #define PSEUDORANDOM_JOINT_ORDER.
3.  Reseed the PRNG apropriately on reset.

...so that even with random joint solving order, behavior is still
deterministic.

--
Gary R. Van Sickle
Brewer.  Patriot.