Skip to content
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

Same dataset, same seed -> different results ... #30

Closed
benoitgaudou opened this issue May 11, 2020 · 5 comments
Closed

Same dataset, same seed -> different results ... #30

benoitgaudou opened this issue May 11, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@benoitgaudou
Copy link
Contributor

I create (in COMOKIT Template Project) a new model from the template Case Studies Comparison.template without any modification.
In the datasets folder, I copy the Sample dataset from COMOKIT and paste it twice in the datasets folder of COMIKIT Template Project.

I have a model, with the same datasets, and the same seed for both simulations, so I was expecting exactly the same results in both simulations.
Nevertheless the plot shows difference...

Screenshot 2020-05-11 at 10 34 44

@benoitgaudou benoitgaudou added the bug Something isn't working label May 11, 2020
@AlexisDrogoul
Copy link
Contributor

Hum... Another random number leaking in perspective 😢 Hope it's not too difficult to find.

@AlexisDrogoul
Copy link
Contributor

Passing the same seed to different simulations, with the same dataset, I was able to reproduce it...

See the results I obtain when asking the simulations to write the cycle followed by a list of 5 random values:

0:[72,24,81,27,72]
0:[72,24,81,27,72]
1:[50,64,34,52,48]
1:[50,64,34,52,48]
2:[84,40,2,3,70]
2:[84,40,2,3,70]
3:[89,41,60,90,56]
3:[89,41,60,90,56]
4:[46,83,93,43,4]
4:[46,83,93,43,4]
5:[95,25,68,23,49]
5:[95,25,68,23,49]
6:[51,23,89,16,46]
6:[51,23,89,16,46]
7:[90,66,52,32,45]
7:[90,66,52,32,45]
8:[39,43,59,38,3]
8:[39,43,59,38,3]
9:[91,27,91,23,43]
9:[91,27,91,23,43]
10:[28,81,89,3,35]
10:[28,81,89,3,35]
11:[48,95,36,21,80]
11:[48,95,36,21,80]
12:[84,23,90,86,64]
12:[58,65,73,69,84]
13:[78,72,65,54,47]
13:[58,58,81,91,29]

It diverges at cycle 12 in that case (sometimes sooner when more simulations are created).
I disabled all displays, by the way, as well as all policies, so as to isolate the problem.

@AlexisDrogoul
Copy link
Contributor

AlexisDrogoul commented May 11, 2020

After a bit of investigation, deactivating the move of individuals from one building to another (in reflex execute_agenda) makes the simulations follow the same random pattern again... TBC

@AlexisDrogoul
Copy link
Contributor

AlexisDrogoul commented May 11, 2020

Deactivating the line

current_place.individuals << self;

solves the problem... So the leaking is somehow related to the management of list/containers...

AlexisDrogoul added a commit to gama-platform/gama.old that referenced this issue May 11, 2020
- COMOKIT/COMOKIT-Model#31
- COMOKIT/COMOKIT-Model#30
- Rationalizes the calls to 'shuffle' and 'shuffleInPlace'
@AlexisDrogoul
Copy link
Contributor

Should be fixed in gama-platform/gama@ac17bc3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants