Bill Talada (1/15/2010)
To keep the code sample very small, I cut some corners. The code that "looks" at the surroundings of the robot assumes a square border around a 10 x 10 grid. Inserting a 2 into the grid won't help; it will be ignored currently. I would have loved to implement a crazy maze but my objective was to make it easy for people to understand Genetic Algorithms.
I don't understand why you say it would be ignored. If I put a 2 in there somewhere the robot will see a wall in that direction.
case when @y=0 then '2' else substring(@world, ((@y-1)*10)+@x+1,1)
Down in the movement section
set @points = @points - 5
That takes off 5 points and it doesn't move. I surely seems like you can put walls in there to me.