4 ms·
My goal was to limit how much I hard coded into the creatures function, so it could evolve as much as possible. This was the design: The environment was made o
by RaftPeople 2y ago
My goal was to limit how much I hard coded into the creatures function, so it could evolve as much as possible.
This was the design:
The environment was made of a small number of materials:
1-Non-life - blocks etc., obstructions
2-Plant-life - is food but not a creature, not mobile etc.
3-Creatures - alive and mobile (can be eaten by other creatures)
Creatures:
1-Shaped like hexagons
2-Eyes:
Located on one of the sides of the hexagon
3-Mouth:
A medium length proboscis type thing on same side as eyes
Touching plant or food with mouth=eating (which transfers energy)
4-Movement/Motor:
Can move forward or backward (based on which way pointing)
Can rotate to face new direction
Special neurons connect to the motor+rotator
5-Senses - Eyes:
Each eye had 32 rays of "light" that spread out in an
expanding pattern
Each ray provided instant information
Information returned per ray: distance the ray traveled before hitting something, and type of material it hit
Each ray within each eye connected to a group of input neurons so distance and material could be input
6-Senses - Sound:
Each creature emitted waves of sound in decreasing amplitude in a full circle, like ripples in a pond
This signal traveled faster than creatures top speed but much slower than instant
Sound sensor neurons covered the entire "skin" of the creature
7-Senses - Body or Mouth touching other materials:
The mouth and entire skin had direct touch sensor neurons which detected the type of material being touched
Just like the eyes, if non-life material was being interacted with then one neuron fired, if plant then a different neuron, etc.
8-Senses - Body - being eaten:
The entire skin had special sensors for when another creatures mouth is physically touching this creature (meaning it's being eaten)
9-Brain:
Randomly created, then evolved per generation
Many random/semi-random/ajustable factors controlled the higher level structure of the NN, examples:
Number of layers
Number of sections per layer (section=a group neurons more tightly connected intra-section compared to inter-section)
Percent connectivity within section
Percent connectivity between sections
Percent conectivity between layers
Percent of recurrent connetions (for each of the above)
Type of neurons (in total or per section)
Types of synapes (experimented with various things here)
etc.
10-Fitness function
Basically amount of energy at end.
Creature starts with X, eating adds to it, moving reduces it, getting eaten reduces it
I needed to tweak this a bit because the naive version rewarded limited movement.
The creatures needed to evolve the ability to use their eyes, their motors, to respond to being eaten by another creature, to eat another creature (just by touchig with mouth).
During the early generations they would just be jiggling around randomly, but eventually some would settle in to more productive movements.
I noticed that for long running sessions (7 days), the best creatures frequently had a NN structure that was deep-ish, like 6 layers, and came together in middle layers with many signals whittled down to a much smaller number of neurons before exploding out again to connect to the control neurons.