{"id":20673632,"url":"https://github.com/jmiszczak/gol_rule_switching","last_synced_at":"2026-04-23T10:34:57.244Z","repository":{"id":139079184,"uuid":"535613700","full_name":"jmiszczak/gol_rule_switching","owner":"jmiszczak","description":"Implementation of the Game of Life with rule switching","archived":false,"fork":false,"pushed_at":"2026-01-29T16:23:06.000Z","size":466,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-30T04:44:35.756Z","etag":null,"topics":["agent-based-modeling","artificial-life","cellular-automata","stochastic-simulation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmiszczak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-09-12T10:23:38.000Z","updated_at":"2026-01-29T16:23:35.000Z","dependencies_parsed_at":"2024-01-04T11:30:08.593Z","dependency_job_id":null,"html_url":"https://github.com/jmiszczak/gol_rule_switching","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jmiszczak/gol_rule_switching","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmiszczak%2Fgol_rule_switching","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmiszczak%2Fgol_rule_switching/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmiszczak%2Fgol_rule_switching/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmiszczak%2Fgol_rule_switching/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmiszczak","download_url":"https://codeload.github.com/jmiszczak/gol_rule_switching/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmiszczak%2Fgol_rule_switching/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32176992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T02:19:40.750Z","status":"ssl_error","status_checked_at":"2026-04-23T02:17:55.737Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-based-modeling","artificial-life","cellular-automata","stochastic-simulation"],"created_at":"2024-11-16T20:42:06.832Z","updated_at":"2026-04-23T10:34:57.215Z","avatar_url":"https://github.com/jmiszczak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/535613700.svg)](https://zenodo.org/badge/latestdoi/535613700)\n\n# gol_rule_switching\n\nImplementation of the Game of Life with rule switching.\n\n## About\n\nThis repo contains model and scripts used to run numerical experiments for Game\nof Life with rule switching mechanisms. The code was used in\n\n\nJ.A. Miszczak, *Rule switching mechanisms in the Game of Life with synchronous and asynchronous updating policy*, Physica Scripta, 98, 115210 (2023). DOI:[10.1088/1402-4896/acfc6c](https://doi.org/10.1088/1402-4896/acfc6c) arXiv:[2310.05979](https://arxiv.org/abs/2310.05979)\n\n```\n@article{miszczak2023rule,\n\tauthor = {Miszczak, J.A.},\n\ttitle = {Rule switching mechanisms in the Game of Life with synchronous and asynchronous updating policy},\n\tdoi = {10.1088/1402-4896/acfc6c},\n\tjournal = {Physica Scripta}, \n\tvolume = {98},\n\tnumber = {11},\n\tpages = {115210},\n\tyear = {2023},\n}\n\n```\n\n# Reproducing data\n\nScripts in this repo can be used to reproduce data illustrating the behaviour of\nthe Game of Live (GoL) cellular automata extended with the mechanisms for rule\nswitching. Additionally, the model can be used in asynchronous and synchronous\nmode.\n\nCode compilation and running is controlled by file `Makefile` in the main\ndirectory. This file should be modified to suit our NetLogo installation. In the\nprovided `Makefile` it is assumed that NetLogo is installed in\n\n    ~/Local/NetLogo/6.3.0\n\ndirectory. It is also assumed that `java` and `javac` are in you `PATH`\nenvironment variable.\n\n`Makefile` also uses GNU parallel for running Java programmes. \n\n## Final configurations\n\nSample configurations are produced using `GenerateExample.java` script. To\ncompile this file run\n\n    make\n\nin the main directory. This will also compile `CalculateMeanLiving.java` and\n`GenerateConfigurations.java`.\n\nExamples are generated by issuing\n\n    make genex\n\nin the main directory. This will produce files `world*.csv` files, named according to the parameters defined in `CalculateMeanLiving.java` file.\n \nPlotting of the resulting data is handled by `plot_world_example.py` script. Running\n\n    python plot_world_example.py word_data.csv\n\nwill produce PDF file for visualizing data from the CSV file `world_data.csv`. \n\nTo plot all data from the generated examples run \n\n    for f in world*.csv ; do python plot_world_example.py $f ; done\n\n**Note:** By default, the world size is set to 2^6. Details are defined in\n*`experiements.xml` file.\n\n**Note:** Plots are saved in `plots` subdirectory.\n\n## Realizations\n\nExemplary realizations can be obtained by using `run.sh` script and\n`experiments.xml` file. For each experiment defined in `experiments.xml` file,\nmake a symbolic link to `run.sh`\n\n    ln -s run.sh experiment-name.sh\n\nNext, run\n\n    bash experiment-name.sh\n\nThe resulting data will be saved in `experiment-name.csv` In the included\n`experiments.xml` file there are defined two experiments:\n`deterministic_realizations` and `random_realizations`\n\n**Note:** The above commands can by run using\n    \n    make realizations\n\nTo plot data from the realizations run\n\n    python plot_realizations.py\n\n**Note:** Configure name of the data files in the plotting script.  \n\n## Average growth\n\nData for the average number of living cells are calculated by\n`CalculateMeanLiving.java` and can be obtained by running\n\n    make calcmean\n\nYou need to compile `CalculateMeanLiving.java` first\n\n**Note:** BY default, 200 realizations are used fo averaging. This value can be\nmodified in `CalculateMeanLiving.java` file by altering `steps` variable. \n\nPlotting of the data is handled by `plot_living_average.py`, which accepts one\nargument with name of the data file.\n\n**Note:** Data from this experiment are saved in\n*`living_data_250steps_200runs.csv` file. This file is included in the\n*repository. The name of the file used to save data should be configured in\n*`Makefile` and in the plotting script `plot_living_average.py`.\n\n## Mutual entropy\n\nFor the purpose of analysing the mutual entropy of the generated patters, it is\nnecessary to generate a number of final configurations. This data is generated\nusing `genfc` target in the Makefile,\n\n    make gencf\n\nYou need to compile `GenerateConfigurations.java` before running this command.\n\nResulting `csv` files in `configurations` subdirectory. For each combination of\nparameters 1000 files representing final configurations are generated. The names\nof the resulting configurations can be saved in a shell variable using\n\n    golTypes=$(for i in *_0001.csv ; do echo `echo $i | sed s/_0001.csv//g` ; done)\n\nin the `configurations` directory. \n\nThe calculation of the average mutual entropy is implemented in\n`analyze_mutent.py` script. Using GNU parallel, the analysis results can be\nobtained by running\n\n    parallel ./analyze.py {} ::: $golTypes\n\nin `configurations` subdirectory.\n\nThis will result in one `*.dat` file for each combination of parameters. To\nobtain the file with all data run \n\n    bash postprocess_dat.sh \n\nscript. This will produce `anayze_mutent.csv`, used by the plotting script\n`plot_mutual_entropy.py` located in the main directory. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmiszczak%2Fgol_rule_switching","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmiszczak%2Fgol_rule_switching","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmiszczak%2Fgol_rule_switching/lists"}