Giter VIP home page Giter VIP logo

Comments (4)

mauriceling avatar mauriceling commented on August 16, 2024

For Organism.identity, a simple way is
Organism.identity = [random.choice(('1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'd', 'e', 'g', 'h', 'q', 'r', '=', '#', '$', '%', '&', '@', '<', '>', '?', '/', '', '|', ';', '-')) for x in range(32)]

That will give you a possibility of 57^32 (1e56) identities.

from dose.

mauriceling avatar mauriceling commented on August 16, 2024

At initiation, Organism.deme can take population name. Then it can be changed during simulation.

from dose.

clarencecastillo avatar clarencecastillo commented on August 16, 2024

Created methods to define 'identity' and 'deme' for every individual. Similar to deployment schemes, changes to such dictionary keys do not reflect on the final reports.

  1. Organism.generate_name() function created to define a random 32-character value to an organism's status 'identity' dictionary key.
  2. Spawn_populations(p) in dose.py now includes assigning of a 'deme' status to every individual after construction of populations. Takes the population name as default.

from dose.

clarencecastillo avatar clarencecastillo commented on August 16, 2024

Bug regarding incorrect identity and deme assignment 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 deme and identity 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. Deme of every individual is named according to the population's name.
  2. Identity of every individual now varies according to it's randomly generated 32-char name.

from dose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.