Close

IQ Zero "Arm" Test

A project log for IQ Zero: Evolving Unprogrammed Robots

Clueless, broken robots thrive on Genetic Algorithms and Procedural Generation

die-master-monkeyDie, Master Monkey! 03/01/2016 at 02:310 Comments

This Robot is "Armed"

Yes, I still have to finish explaining the other half of The Big Diagram, but I wanted to share this quick dispatch from the lab. Forgive me also for typos and such, because (hey admins!) it is extremely difficult to edit articles here. Moving on...

In this test, Zero is placed in charge of a crude two-servo armature and - again - scored on how often (and how efficiently) it stimulates the Passive Infrared Motion Detector. The "PIR" is partly obscured, forcing the Genetic Algorithm to discover a small range of effective motion.

Here is an example of its performance within the first minute or so:

It doesn't really succeed in triggering the sensor much, and spends much of its time outside the PIR's field of vision.

A few dozen generations later, it's considerably more effective and seems to be generating "GAs" that at least focus their motion to the useful area.

It's hard to be sure, but it might even be responding to sensor event by "bouncing" back to a clockwise extreme, then slowly creeping back toward the sensor.

This is possible because some of the "commands" which can result from interpretation of its pseudo-random DNA can read like this:

  1. Read value of from InPin to InReg
  2. Skip next instruction if InReg > OutReg
  3. Write value of OutReg to OutPin

Consider the following scenario, in effect at the time these instructions were executed:

If this were the case, a zero would be sent to the servo if the value read from the PIR sensor were higher than zero. Zero degrees, being outside the range of the servo, would push the arm all the way clockwise.

Conversely, if the PIR returned nothing (zero), InReg would not be greater than OutReg, and Step 3 would be skipped. No servo action would result.

Actually this background is going to be useful in...

Next Up: Chaos from Code Part II - Time, PRNGs and Fake Languages

Discussions