A simple implementation of a framework to define and interact with life-like cellular automata, written in Gleam.
This project is a personal exercise in learning the Gleam programming language by implementing a framework to simulate the Game of Life and other variants of life from scratch, using as few third-party libraries as possible. This is a learning tool and not intended for production use. The code is licensed under the MIT License and is available at GitHub. Contributions and usage are welcome, but please credit the project if you find it helpful. Don't forget to give it a star if you like it! ⭐
I want to add that I did not look at any of the other implementations of the Game of Life or other cellular automata, so I am not sure if there are any similarities or known non-idealities between this implementation and the others. If you find any, please let me know!
I referred to this wiki to review some of the known rules and grid states of the Game of Life and other related life-like cellular automata.
📌 The project is divided into the following source modules:
📌 And also the following test modules:
📌 Complete the source modules:
- Complete cell
- Complete definitions
- Complete gol (Main)
- Complete grid
- Complete location
- Complete neighbourhood
- Complete rule
- Complete ruleset
- Complete tick
📌 Complete the test modules:
- Complete cell_test
- Complete definitions_test
- Complete gol_test
- Complete grid_test
- Complete location_test
- Complete neighbourhood_test
- Complete rule_test
- Complete ruleset_test
- Complete tick_test
📌 Complete the documentation:
- Complete the README
📌 Complete the project:
- Complete the Game of Life project
- Gleam – The Gleam programming language, version 1.0.0 or later (As Gleam is a fairly new language, I try to always use the latest version and update the codebase to match it, same goes for the packages used)
- VSCode Editor – Recommended development environment with relevant extensions (see
.vscode/extensions.json)
📌 Run the project:
gleam run📌 Run tests:
gleam test- I will be exploring other kinds of cellular automata in future projects, that's the reason for some of the design choices I made in this project.
- I decided to read the Gleam documentation after writing a lot of code by just trial and error, which led me to rewrite the entire codebase.
See the included LICENSE.txt for details. Licensed under the MIT License.
-- A. Uzan