When any agent's energy reaches its
threshold for replication it spawns
an offspring that occupies a neighbouring location,
remvoving the previous occupant. The
offspring inherits a variation of their parent's genetic
colour and key.
The parent's energy is shared equally between
the two. Colour mutation is minimal so related agents can
be identified over time by slowly evolving colour.
In 1D the screen shows a scrolling down history of the
living agents in
the 1D world. The agents live on a line running across the top
of the screen. After each agent has been updated the
history is scrolled down and the new agent states written
to the top row. Running evolution fast (by increasing the rate
of energy extraction) is a pretty way to see agent
evolution.
When evolution is slowed down and agent energy level
shown as their brightness you can see individual
agent replication events taking place.
The keys and locks in these runs have 3 values each so we can
visualise then as RGB colours.
Here the top row is showing the lock values across the
world. It forms a simple a greyscale gradient here;
although they can mutate over time. You can see
that the agent keys have evolved to roughly match the
gradient. Agent keys vary more wildy than their colours
because key mutation uses a different type of mutation noise.
I haven't been able to produce any particularly
pretty visuals with 2D worlds. Might be a case of finding
the right parameters. If you
find some settings that work then let me know.