You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few things about the management of RNGs seem wrong to me.
I would have assumed that CybORG.set_seed() could be used to re-seed the simulation. But references to the RNG (np_random) get copied into lots of objects. So when set_seed is called, some objects retain references to the 'older' RNG, and now the simulation uses a weird mishmash of multiple RNGs.
This can be fixed by re-seeding the RNG in place, instead of replacing it.
There are a couple of places where seeding is invoked to create RNGs. The one that seems especially suspicious to me is in the BaseAgent constructor. The constructor is not provided with a RNG object, it allocates one. But the code provides no access to re-seed those RNGs.
The text was updated successfully, but these errors were encountered:
A few things about the management of RNGs seem wrong to me.
I would have assumed that
CybORG.set_seed()
could be used to re-seed the simulation. But references to the RNG (np_random
) get copied into lots of objects. So whenset_seed
is called, some objects retain references to the 'older' RNG, and now the simulation uses a weird mishmash of multiple RNGs.This can be fixed by re-seeding the RNG in place, instead of replacing it.
There are a couple of places where
seeding
is invoked to create RNGs. The one that seems especially suspicious to me is in theBaseAgent
constructor. The constructor is not provided with a RNG object, it allocates one. But the code provides no access to re-seed those RNGs.The text was updated successfully, but these errors were encountered: