From c19e53b8569c93a7e7f22ebcd7029740e0e516b1 Mon Sep 17 00:00:00 2001 From: Jarek Miszczak Date: Wed, 24 May 2023 09:53:28 +0200 Subject: [PATCH] Language improvements --- README.md | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 2d610dd..b4b3fca 100644 --- a/README.md +++ b/README.md @@ -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 @@ -32,7 +32,8 @@ 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 @@ -40,7 +41,7 @@ Examples are generated by issuing 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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. \ No newline at end of file +`plot_mutual_entropy.py` located in the main directory.