This run with the latest (ATTiny) version is a good illustration of the GA technique as it's applied in this project. Again the bot is scored on how well it stimulates the Passive Infrared Sensor (PIR) - usually by jostling the ball as much as possible. And as before, the values for its operations are pulled directly from the seed-controlled PRNG.
More discussion after the vid.
The clip fast-forwards through 35+ generations, and in that time the bot goes from using all of its servos all of the time to what appears to be a more efficient locomotive pattern that often bounces the ball violently.
A few factors play into what behavior scores best:
- PIR: Any motion sensed by the PIR will score 10 points per instruction cycle. A single event may trigger for up to 4 seconds.
- Servo Cost: Each time output is sent to servos, a 2 point penalty is given.
- Time: Each GA has only 4 seconds, so inaction is the most costly of all.
Importantly, the GA does not approach some sort of "perfection" and stay there: It continues to mutate, constantly. This - again - is what excites me so much about these techniques: These kinds of robots could adjust constantly to changing demands, or opportunities.
There is considerable work to be done still - I'm currently focusing on the following:
- More stable convergence - Do a better job of identifying and keeping the positive aspects of successful GAs
- More GA self-influence - They currently have surprisingly little control over their own code morphology. I'm expanding that.
- More fitness tests - I score motion now because I can't score distance, altitude or light. The next item will help add more test sensors!
- PI Zero Transition - I'm ironing-out a plan to put the Adafruit Contest's PI Zero in charge of a herd of "traditional" IQ Zeros. Clever angle, no?
Stay tuuuuuuuunnnnnned!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.