<commit_before># HOW TO
This file describes things that can be performed with EvolAcc 0.1.0.  
So, this is something like a usecase tutorial, for final users and for developpers !


## Add a new program option
Many options already exists, like *--factory*, *--help* or *--interactive*.
For add a new option, the developper need to:
- add new option in *__main__.py* docstring, according to [docopt](http://docopt.org/ ) syntax;
- add constant name in *config* module (like *UNIVERSE\_SIZE* for example) with associated key;
  
Some things may be necessary, according to what is the option goal:
- if it need to be casted in a particular format, *__normalized* and *__converted* functions must be completed;
- if a default value exist, then it add to be put in *__default_configuration* function;
  
This done, the remain work is to use it !  


## Game of Life in universe of 100 by 100 for 100 phases
The Conway's Game of Life is a very simple cellular automaton, 
and reproduce its behavior is always fun.  
In EvolAcc, it can be design like this:
- a cell is a Unit with a Custom Genome that contain, mainly, a state (alive or dead);
- an UnitFactory will be designed for create alive or dead cell according to a density;
- the FunctionCall Action will be used for implementation of state switching; 
- a watcher that print alive and dead cells;

All these things are already implemented in *evolacc/userdata/factories/gol.py*, *evolacc/userdata/watchers/gol.py* and *evolacc/userdata/genomes/gol.py* files.
Developpers are encouraged to take a look to these classes before code their own ones.  
So, launch a Game of Life for 100 phases and in a world of 100 by 100 can be performed by:<commit_msg>more help for users<commit_after># HOW TO
This file describes things that can be performed with EvolAcc 0.1.0.  
So, this is something like a usecase tutorial, for final users and for developpers !


## Add a new program option
Many options already exists, like *--factory*, *--help* or *--interactive*.
For add a new option, the developper need to:
- add new option in *__main__.py* docstring, according to [docopt](http://docopt.org/ ) syntax;
- add constant name in *config* module (like *UNIVERSE\_SIZE* for example) with associated key;
  
Some things may be necessary, according to what is the option goal:
- if it need to be casted in a particular format, *__normalized* and *__converted* functions must be completed;
- if a default value exist, then it add to be put in *__default_configuration* function;
  
This done, the remain work is to use it !  


## Create a new simulation 
Just launch EvolAcc create and run a new Simulation, but the goal of this part is to show what things need to be done for provide new Simulation patterns.  
Firstly, the principle and goals of Simulation must be determined. *Two species coevolves and each represents the K/r strategy ; 
which will be the most adaptated to a (un)stable world ?*, *A eat B, B eat C and C eat A ; is it possible to find rules that describes evolution of this world ?*, 
or others *in a world with poles and equator, is a speciation possible ?*.
  
Many classes can be usefuls, all need to be defined in *evolacc/userdata/* repertory:
- one or many Genomes, that describes behavior and caracteristics of life Units;
- one or many Factories, for generates the world according to the needs;
- one or many Actions, that permit to Genomes to act on world;
- one or many Watchers, that allow user to study results;
All these classes can be put in only one, or heavily use already defined objects (notabily Actions and Watchers).

Once all theses objects are defined, EvolAcc can be launched:

        python -m evolacc --universe_size=100,100 --factories=MyFactory1,MyFactory2 --step_at_start=1000 --watchers=MyWatcher1,MyWatcher2,MyWatcher2


## Game of Life in universe of 100 by 100 for 100 phases
The Conway's Game of Life is a very simple cellular automaton, 
and reproduce its behavior is always fun.  
In EvolAcc, it can be design like this:
- a cell is a Unit with a Custom Genome that contain, mainly, a state (alive or dead);
- an UnitFactory will be designed for create alive or dead cell according to a density;
- the FunctionCall Action will be used for implementation of state switching; 
- a watcher that print alive and dead cells;

All these things are already implemented in *evolacc/userdata/factories/gol.py*, *evolacc/userdata/watchers/gol.py* and *evolacc/userdata/genomes/gol.py* files.
Developpers are encouraged to take a look to these classes before code their own ones.  
So, launch a Game of Life for 100 phases and in a world of 100 by 100 can be performed by:
{'fraction_non_alphanumeric': 0.06184238780330685, 'fraction_numerical': 0.012239639252737813, 'mean_word_length': 4.085152838427947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '711281', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1266, 'n_words': 720}