Hacker News new | ask | show | jobs
by scottrogowski 1836 days ago
This is amazing. My question is whether there are emergent structures in a long-running sandbox environment? The videos that were posted appeared to have quite complex structures but it was unclear whether they were designed or if they "evolved" from earlier more-basic structures. Would be curious to get the author's take.
5 comments

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

Very cool. Interesting to hear that they actually managed to evolve. Would be curious to see what happens when they can eat each-other. Though I recognize that might be significantly more complicated
I’ve been thinking about that for the rewrite! Maybe some chance to incorporate snippets of opcodes from the consumed.
Most of these look very designed, though "emerging" from simple rules on agents/particles.

Others look evolved inside the sandbox. (see doc here: https://alien-project.org/documentation/Evolutionexperiments...)

One of the YouTube videos claims that they are self-replicating structures that were "evolved" in another simulation. So possibly the appearance of being designed comes from the fact that they were selected from the best of whatever was produced by that other simulation and placed together for a video.
Not a biologist but I understand that isolation is an important factor of diversity and by default, this simulation wouldn't have that. So it makes sense to evolve in different areas and put them back into the same area.
Have you ever seen http://boxcar2d.com/? It requires Flash so it probably doesn't work anymore, but it used genetic algorithms to "design" a 2d car to travel over bumpy terrain.

It was ported here https://rednuht.org/genetic_cars_2/ but it's not quite the same thing.

One of the videos mentioned they were evolved in a different simulation.
I wonder if multiple simulations show any level of convergence.