Skip to content

Commit

Permalink
Language improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jmiszczak committed May 24, 2023
1 parent e57f199 commit c19e53b
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ of Life with rule switching mechanisms.
# Reproducing data

Scripts in this repo can be used to reproduce data illustrating the behaviour of
the Game of Live cellular automata extended with the mechanisms for rule
the Game of Live (GoL) cellular automata extended with the mechanisms for rule
switching. Additionally, the model can be used in asynchronous and synchronous
mode.

Code compilation and runing is controlled by file `Makefile` in the main
directory. This file should be modified to suit our NetLogo installation. In
the provided `Makefile` it is assumes that NetLogo is installed in
Code compilation and running is controlled by file `Makefile` in the main
directory. This file should be modified to suit our NetLogo installation. In the
provided `Makefile` it is assumed that NetLogo is installed in

~/Local/NetLogo/3.0.0

directory. It is also assumed that `java` and `javac` are in you `PATH`
environment variable.

`Makefile` also uses GNU pararell for running Java programmes.
`Makefile` also uses GNU parallel for running Java programmes.

## Final configurations

Expand All @@ -32,15 +32,16 @@ compile this file run

make

in the main directory. This will also compile `CalculateMeanLiving.java` and `GenerateConfigurations.java`.
in the main directory. This will also compile `CalculateMeanLiving.java` and
`GenerateConfigurations.java`.

Examples are generated by issuing

make genex

in the main directory. This will produce files `world*.csv` files, named according to the parameters defined in `CalculateMeanLiving.java` file.

Ploting of the resulting data is handled by `plot_world_example.py` script. Running
Plotting of the resulting data is handled by `plot_world_example.py` script. Running

python plot_world_example.py word_data.csv

Expand All @@ -50,15 +51,16 @@ To plot all data from the generated examples run

for f in world*.csv ; do python plot_world_example.py $f ; done

**Note:** By default, world size is set to 2^6. Details are defined in `experiements.xml` file.
**Note:** By default, the world size is set to 2^6. Details are defined in
*`experiements.xml` file.

**Note:** Plots are saved in `plots` subdirectory.

## Realizations

Exlemplary realizations can be obtained by using `run.sh` script and
Exemplary realizations can be obtained by using `run.sh` script and
`experiments.xml` file. For each experiment defined in `experiments.xml` file,
make a symblic link to `run.sh`
make a symbolic link to `run.sh`

ln -s run.sh experiment-name.sh

Expand All @@ -82,7 +84,7 @@ To plot data from the realizations run

## Average growth

Data for the average number of living cells are calculate by
Data for the average number of living cells are calculated by
`CalculateMeanLiving.java` and can be obtained by running

make calcmean
Expand All @@ -92,7 +94,7 @@ You need to compile `CalculateMeanLiving.java` first
**Note:** BY default, 200 realizations are used fo averaging. This value can be
modified in `CalculateMeanLiving.java` file by altering `steps` variable.

Ploting of the data is handled by `plot_living_average.py`, which accepts one
Plotting of the data is handled by `plot_living_average.py`, which accepts one
argument with name of the data file.

**Note:** Data from this experiment are saved in
Expand All @@ -102,24 +104,24 @@ argument with name of the data file.

## Mutual entropy

For the purposa of analysing the mutula entropy of the generated patters it is
necessary to generate a number of final configurations. This data are generate
For the purpose of analysing the mutual entropy of the generated patters, it is
necessary to generate a number of final configurations. This data is generated
using `genfc` target in the Makefile,

make gencf

You nee to compile `GenerateConfigurations.java` prior to running this command.
You need to compile `GenerateConfigurations.java` before running this command.

Resultsing `csv` files in `configurations` subdirectory. For each combination of
parameters 1000 files representing final configuraitons are generated. The names
of the resulting configurations can be saved in a shhell variable using
Resulting `csv` files in `configurations` subdirectory. For each combination of
parameters 1000 files representing final configurations are generated. The names
of the resulting configurations can be saved in a shell variable using

golTypes=$(for i in *_0001.csv ; do echo `echo $i | sed s/_0001.csv//g` ; done)

in the `configurations` directory.

The calculation of the average mutula entropy is implemented in
`analyze_mutent.py` script. Using GNU parallel the analysis rsults can be
The calculation of the average mutual entropy is implemented in
`analyze_mutent.py` script. Using GNU parallel, the analysis results can be
obtained by running

parallel ./analyze.py {} ::: $golTypes
Expand All @@ -132,4 +134,4 @@ obtain the file with all data run
bash postprocess_dat.sh

script. This will produce `anayze_mutent.csv`, used by the plotting script
`plot_mutual_entropy.py` located in the main directory.
`plot_mutual_entropy.py` located in the main directory.

0 comments on commit c19e53b

Please sign in to comment.