Friday, 21 October 2011

Developer Journal 129

Some rough notes, I'll write this up in a readable form soon.


I've been working on adding new capabilities to the robots. My goal is to convert the hard coded values to things I can change from text files and then have the robot sub-systems change dynamically.

If you increase the number of input / output groups, you have to change the indices. I'll also have to save the indices in order to do the updating.

Create a gene class.

When the brain updates, it pulls from the sensors.
When the robot updates, it pulls from the brain.

How to convert to a new structure?
Modify text file.
Modify genome.
Modify neural network

When a user creates a robot, they have to create the following files.
+ bodyAlpha.cfg
+ brainAlpha.cfg
+ genomeAlpha.cfg
+ connectAlpha.cfg

You can change body, brain, genome, connect files by modifying robot. You can change which robot file to use through a setting the robot file.

1 shared CritParam, or 1 CritParam each

Focus on doing the minimum first

numInGroup 6

inGroup1 random
inGroup2 energy
inGroup3 red
inGroup4 green
inGroup5 blue
inGroup6 listen

inGroupRandom 1
inGroupEnergy 1
inGroupRed 3
inGroupGreen 3
inGroupBlue 3
inGroupListen 16

numOutGroup 8

outGroup1 eat
outGroup2 mate
outGroup3 fight
outGroup4 speed
outGroup5 yaw
outGroup6 light
outGroup7 focus
outGroup8 speak

outGroupEat 1
outGroupMate 1
outGroupFight 1
outGroupSpeed 1
outGroupYaw 1
outGroupLight 1
outGroupFocus 1
outGroupSpeak 16

Each genome in the text file should have a name, a variability flag, and a value

Each brain input / output has a name.
Each robot input / output has a name

// robot direction brain
visionOut > visionIn

// robot direction brain
forwardIn < forwardOut
leftIn < leftOut

I also want to be able to modify the neural network without modifying the genome.

When I serialize and after I load, I can check whether the settings file has changed.

The settings file can have a version number or I can check whether the parameters have changed. The problem with checking the parameters is that the process could take too long if each robot has their own genome param.

The reason I considered checking parameters is that I didn't want errors to come from manually incrementing the version numbers.

The genome checks the settings file.
The brain checks the genome.
The body checks the genome.

1 comment:

  1. Great taking the time to build clear the terminlogy into the inexperienced persons!