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

reporting organism.status['location'] for every organism in the population does not follow deployment schemes #14

Closed
clarencecastillo opened this issue Oct 1, 2013 · 3 comments
Assignees

Comments

@clarencecastillo
Copy link
Collaborator

Deployment schemes 2-4 does not properly change the 'location' status of every deployed organism.

  1. Something could be overwriting the changed 'location' status or,
  2. Deployment schemes are bugged, unable to change 'location' status of every individual properly or,
  3. Reporting [str(org.status['location']) for org in population.agents] is an incorrect reporting scheme to see the changes in 'location' status for every individual.
@ghost ghost assigned clarencecastillo Oct 1, 2013
@clarencecastillo
Copy link
Collaborator Author

Same issue applies to the organism's 'identity' and 'deme'. Expected results do not get reflected in the final report. Cause of bug is currently unknown.

Observations:

  1. Organism takes in the last generated 'identity' as the entire population's 'identity' individually.
  2. Implementing the methods inside genetic.py does not show any changes.
  3. Possible (least likely to be for this case) cause could be individuals inheriting or sharing the changes of the status dictionary keys.

@clarencecastillo
Copy link
Collaborator Author

Issue now resolved. Problem was caused by genetic.py's Organism.clone(). Function does not properly deepcopy() the status dictionary of each organisms. It simply references all status dictionary of all organisms into one original dictionary. Reporting location, deme, identity and genome now show the desired results. Was resolved by manually referencing each of the original organism to be cloned's status dictionary keys into the different clones. See genetic.py.

  1. Location of every individual now varies according to it's deployment scheme.
  2. Deme of every individual is named according to the population's name.
  3. Identity of every individual now varies according to it's randomly generated 32-char name.
  4. Genome variation among all individuals remain different among each generation. No important changes applied as this never did have issues.

@clarencecastillo
Copy link
Collaborator Author

  1. Creation of new Organism instances within mating schemes seems to have the same problems with this issue. (See new Issue Children produced in mating scheme share status dictionaries similar to Issue #14 #29)
  2. Solution to this issue is now obsolete (See commit: 75766b7). Replaced with a new method that incorporates the status dictionary to the initialization of Organism class itself which makes it bound to the Organism class. Also reverted clone function to its previous state. (See commit: b5b500c)

clarencecastillo pushed a commit that referenced this issue Dec 17, 2014
Merge pull request #77 from clarencecastillo/master
clarencecastillo pushed a commit that referenced this issue Dec 17, 2014
Merge pull request #14 from mauriceling/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant