-
Notifications
You must be signed in to change notification settings - Fork 25
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
nw:load-graphml somehow messes with the random seed #187
Comments
Thanks for reporting! I've managed to reproduce it, but it seems to be some sort of interaction between |
@qiemem I am not sure the layout is responsible, even if you comment it out and do like:
you can clearly see that things are not fixed as per the seed, but changes every time you call |
@qiemem closed because solved? |
Yup! It was importing the nodes in a non-deterministic order, so which agent id got matched up with which node was different each import. So, it wasn't actually messing with the RNG, but resulted in similar symptoms. |
@qiemem that’s great! Is there any chance to access a fixed version of nw? Sorry for the newbie question, I really need to run some experiments but I am not really confident with the git workflow in these cases... |
Sure. Here you go: https://www.dropbox.com/s/ugxxt7fhvqah3wm/nw.zip |
@qiemem thanks a ton, I see the patch works if I just read the graphml file in... still if you call layout-radial after importing then the ordering is not preserved, so maybe also layout-radial is doing the same stuff? anyway thanks a ton for now, I can run my experiment and have reproducible results now... 👍 |
I fixed the problem of deterministic turtle creation, but apparently link creation order is still non-deterministic. Depending on your application, this may or may not affect results. I should be able to fix this additional problem in the next few days. |
I think there is a problem with random seed if nw:load-graphml is invoked.
If you create a network like this, you can set the random seed and every time you call the procedure you have a network in the same exact position:
same applies if you create the network from scratch using the nw extension:
however, if you try to load from a graphml file, every time you have the network with a different layout - and this applies with a graphml that I have generated as well as the graphml file used in the nw guide:
See also the discussion here to find a netlogo model and graphml files that demonstrate the issue.
The text was updated successfully, but these errors were encountered: