|
|
|
|
|
by ericbarrett
1836 days ago
|
|
I wrote a (much less fancy) cellular automata program I called "evol" [0]. It simulates organisms on a flat grid. They have opcodes which are randomly permutated from time to time. If they can collect enough energy, they split; if they lose too much, they die. Having more opcodes costs more energy. There is no hinting or designing; everything starts with a simple "MOVE_RANDOM". If you leave the program running long enough, they do actually evolve different behavior. Specifically, they will learn to recognize that there are other lifeforms in a direction and then move the opposite direction, reducing competition over the fixed amount of energy in a cell. You can actually see the population density rise when this happens. Since the grid wraps, you will generally get them "flowing" in one direction, cooperatively. The world is simple and boring and it doesn't have graphics. Also, since the naive "Dna"/opcodes I chose use branching and random number generation, it's very slow and can't be simulated on a GPU. Fun project nevertheless. The last few months, I've been slowly rewriting it in Rust and adding more stuff like terrain height. Haven't published the Rust version yet as it's incomplete—got hung up on the poor state of its terminal libraries. [0] https://github.com/ehbar/evol |
|