{"id":24895203,"url":"https://github.com/jcocozza/gotomata","last_synced_at":"2025-06-25T23:35:53.890Z","repository":{"id":246435043,"uuid":"820284555","full_name":"jcocozza/gotomata","owner":"jcocozza","description":"A concurrent, sparse grid framework for working with cellular automata. Has some basic visualization capabilities.","archived":false,"fork":false,"pushed_at":"2024-10-20T13:03:48.000Z","size":20933,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T15:26:24.936Z","etag":null,"topics":["cellular-automata"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcocozza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-26T07:06:15.000Z","updated_at":"2024-10-20T13:03:51.000Z","dependencies_parsed_at":"2024-06-28T00:11:48.338Z","dependency_job_id":"6d110870-9f40-4615-addf-70ddae044846","html_url":"https://github.com/jcocozza/gotomata","commit_stats":null,"previous_names":["jcocozza/gotomata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jcocozza/gotomata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgotomata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgotomata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgotomata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgotomata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcocozza","download_url":"https://codeload.github.com/jcocozza/gotomata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgotomata/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261973255,"owners_count":23238541,"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"],"created_at":"2025-02-01T19:17:08.278Z","updated_at":"2025-06-25T23:35:53.853Z","avatar_url":"https://github.com/jcocozza.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gotomata\nA concurrent, sparse grid framework for working with cellular automata inspired by Steven Wolfram's _A New Kind Of Science_.\n\nThe three dimensional cellular automata were inspired by the very excellent [softology blog post](https://softologyblog.wordpress.com/2019/12/28/3d-cellular-automata-3/).\n3d rendering of the cellular automata is done here as well.\nI know nothing about rendering and basicially copied the code from [Raylib-go](https://github.com/gen2brain/raylib-go) outright.\nIn particular, I used their shaders from the [mesh_instancing](https://github.com/gen2brain/raylib-go/tree/master/examples/shaders/mesh_instancing/glsl330) example.\n\n## How it works\n\nA grid of cells is sharded based on the number of CPU's your machine has.\nThis allows for parallel computation of the next state of the grid based on the specified neighborhood and ruleset functions.\n\nWhen instantiating a grid, you specify a default state which allows the grid to be sparse.\nOnly cells that are not the default state will be stored across the shards.\n\nJust about any grid type should be supported because all a coordinate is, is a list of integers.\nThus, you define what a coordinate means. For a typical 2 dimensional square grid, this is the standard (x,y) coordinate pair.\nBut you can just as easily use hexagonal coordinates (q,r) because neighbors are computed by a user defined function.\n(The geometry of the grid is essentially determined on read instead of hardcoded)\n\nThanks to go generics, cells store arbitrary data allowing for complex automata.\nMostly commonly booleans can be used to store on/off states, but ints can be used to model several states.\nMuch more complex states can also be represented using custom structs provided they implement the necessary methods to make the comparable.\n\n## Sample Usage\nI recommend checking out the [1-d continuous](./common/continuous/continuous.go) as an example of some implementation.\n(Hopefully this will be easier to implement later, for now things are internally exposed)\nThen you can run it with:\n```go\ninitCfg := continious.SetRandomConfig(width)\ncontinious.MainContinious(width, steps, 10, initCfg)\n```\n\n## Visualizations\n\n### The famous rule 30\n![png](./docs/images/rule-30.png)\n\n### Continuous Cellular Automata\n![png](./docs/images/continuous.png)\n\n### 1D 3 Color Totalistic Cellular Automata\n![png](./docs/images/totalistic-rule-912.png)\n\n![png](./docs/images/totalistic-rule-1635.png)\n\n### Hexagonal Growth\n![gif](./docs/images/hex-grid-growth-inhibition.gif)\n\n### Sample Conway Game of Life\n![gif](./docs/images/conway-acorn.gif)\n\n## Random Walk\n![gif](./docs/images/random-walk.gif)\n\n## 3D (Still a work in progress)\n![gif](./docs/images/crystal.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcocozza%2Fgotomata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcocozza%2Fgotomata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcocozza%2Fgotomata/lists"}