{"id":23412753,"url":"https://github.com/stepainpy/any-cellular-automata","last_synced_at":"2025-04-09T04:11:14.436Z","repository":{"id":244701742,"uuid":"815994454","full_name":"Stepainpy/Any-Cellular-Automata","owner":"Stepainpy","description":"Creating any cellular automata","archived":false,"fork":false,"pushed_at":"2024-10-31T13:12:50.000Z","size":1071,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T22:31:48.633Z","etag":null,"topics":["cellular-automata","console","console-application","cpp","graphic","markup-language","raylib"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stepainpy.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-16T18:59:26.000Z","updated_at":"2024-10-31T13:12:54.000Z","dependencies_parsed_at":"2024-10-31T14:19:55.045Z","dependency_job_id":"918114ae-25f8-4d13-9d86-346f373a24e6","html_url":"https://github.com/Stepainpy/Any-Cellular-Automata","commit_stats":null,"previous_names":["stepainpy/any-cellular-automata"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stepainpy%2FAny-Cellular-Automata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stepainpy%2FAny-Cellular-Automata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stepainpy%2FAny-Cellular-Automata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stepainpy%2FAny-Cellular-Automata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stepainpy","download_url":"https://codeload.github.com/Stepainpy/Any-Cellular-Automata/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974731,"owners_count":21026742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cellular-automata","console","console-application","cpp","graphic","markup-language","raylib"],"created_at":"2024-12-22T18:18:22.709Z","updated_at":"2025-04-09T04:11:14.414Z","avatar_url":"https://github.com/Stepainpy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Any Cellular Automata (ACA)\n\nThis program allows you to create cellular automata based on a given world file.\n\n## Content\n\n- [Quick start](#quick-start)\n  - [Build](#build)\n  - [Launch](#launch)\n  - [Key map](#key-map)\n- [World file syntax](#world-file-syntax)\n  - [How work may statement](#how-work-may-statements)\n- [Json gui setting](#json-gui-setting)\n- [Modifying 'Game of life' rule](#modifying-game-of-life-rule)\n- [Implemented automata](#implemented-automata)\n- [Todo](#todo)\n\n## Quick start\n\n### Build\n\n``` console\nmkdir build\ncmake -S . -B build\ncmake --build build\n```\n\n### Launch\n\nAs console app\n``` console\n./aca worlds/gol.world\n```\n\nAs graphich app (use [Raylib](https://github.com/raysan5/raylib))\n``` console\n./aca worlds/gol.world worlds/gui/gol.json\n```\n\n### Key map\n\n|       Key        | Action                                                   |\n| :--------------: | :------------------------------------------------------- |\n|  \u003ckbd\u003eEsc\u003c/kbd\u003e  | exit from application                                    |\n| \u003ckbd\u003eSpace\u003c/kbd\u003e | toggle pause                                             |\n|   \u003ckbd\u003eI\u003c/kbd\u003e   | toggle viewing count of iterations                       |\n|   \u003ckbd\u003eB\u003c/kbd\u003e   | toggle speed \u003cbr\u003e 50 FPS \u003c-\u003e 500 FPS \u003cbr\u003e 20 ms \u003c-\u003e 2 ms |\n|   \u003ckbd\u003eN\u003c/kbd\u003e   | step in simulation if set pause                          |\n\n## World file syntax\n\nWords, numbers and symbols separated by spacing symbols (space, tab, new line and etc.), Tabulation and line feed it does not matter.  \nSee the other syntax in the [EBNF](syntax/world.ebnf), [example file](syntax/example.txt) and [documentation](doc/statements.md).\n\n### How work may statements\n\nmay statement in if block checking via `and`\n```\n'a' may 1 2 3\n'b' may 4 5 6\n'c' may 7 8 9\n```\nas `'a' and 'b' and 'c'`\n\nnumbers in may statement checking via `or`  \n`'a' may 1 2 3` as `1 or 2 or 3`\n\n## Json gui setting\n\nShow example with ['Game of life' gui](worlds/gui/gol.json)\n``` json\n{\n    \"pixel\": {\n        \"width\" : 10,\n        \"height\": 10\n    },\n    \"dict\": {\n        \".\": [ 24,  24,  24],\n        \"#\": [231, 231, 231]\n    }\n}\n```\nWhere field:\n- `pixel` contains self size\n- `dict` contains matched char with color (in RGB)\n\nColors in `dict` must be unique because char matched to color and color matched to char\n\n## Modifying 'Game of life' rule\n\nRules for original game maybe present as `B3/S23`, where `B` - birth, `S` - survive  \n\nTemplate:\n```\nworld 80 30 '.' 2\n'.' ; dead\n'#' ; live\nalias end\nrules count\n    state '.' to '#' if '#' may\n        ; numbers in 'B'\n    end\n    state '#' to '.' if '#' nomay\n        ; numbers in 'S'\n    end\nend\nsetup\n    ; your setup of world\nend\n```\n\nExapmles: [B3/S23](worlds/gol.world), [B35678/S5678](worlds/diamoeba.world), [B2/S](worlds/seeds.world), [B3678/S34678](worlds/day_and_night.world)  \nFor gui use [gol.json](worlds/gui/gol.json)\n\n## Implemented automata\n\n- [Conway's Game of Life](worlds/gol.world), [Wikipedia](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)\n  - [with tail cells](worlds/gol_with_tail.world)\n- [Life-like cellular automaton](https://en.wikipedia.org/wiki/Life-like_cellular_automaton)\n  - [Day and Night](worlds/day_and_night.world), [Wikipedia](https://en.wikipedia.org/wiki/Day_and_Night_(cellular_automaton))\n  - [Diamoeba](worlds/diamoeba.world)\n  - [Seeds](worlds/seeds.world), [Wikipedia](https://en.wikipedia.org/wiki/Seeds_(cellular_automaton))\n- [Brian's Brain](worlds/brian_brain.world), [Wikipedia](https://en.wikipedia.org/wiki/Brian%27s_Brain)\n- Langton's ant, [Wikipedia](https://en.wikipedia.org/wiki/Langton%27s_ant)\n  - [69 x 69](worlds/langton_ant.world)\n  - [201 x 201](worlds/langton_ant_big.world)\n- [Wireworld](worlds/wireworld.world), [Wikipedia](https://en.wikipedia.org/wiki/Wireworld)\n- [Belousov–Zhabotinsky reaction (simple)](worlds/reactionBZ.world), [Wikipedia](https://en.wikipedia.org/wiki/Belousov–Zhabotinsky_reaction)\n\n## TODO\n\n- [x] Add pattern rule\n- [x] Add comments in world file\n- [x] Add alias statement for symbols","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstepainpy%2Fany-cellular-automata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstepainpy%2Fany-cellular-automata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstepainpy%2Fany-cellular-automata/lists"}