In this project an agent learns how to collect items (using it's simulated sensor inputs) and returning them to the base station using the Genetic Programming paradigm. This task is quite complex since it consists of at least 2 subtasks:

  1. Developing a strategy to locate items widely scattered with short-range sensors and collecting them
  2. Bringing collected items to the base station as fast as possible

sample solution

Click on the image to view the whole movie (230kB)

This is the evolved program code (in LISP S-Expression syntax):

+ (WRITE (OR (Forward)(OR (* (AND (94.3)(Item-Loaded))(AND (+ (WHILE >0 (-108.3)(OR (271.2)(-273.4)))(Turn-Right))(/ (Read-Sensor-R)(+ (275.1)(Read-Sensor-L)))))(OR (WRITE (- (OR (OR (* (Get-Y-Pos)(+ (-96.6)(Item-Loaded)))(-185.1))(OR (Forward)(OR (+ (WHILE >0 (+ (WRITE (Get-X-Pos)(-131.7))(/ (+ (OR (-15.7)(* (-133.3)(Get-Y-Pos)))(Beacon-Visible))(OR (-182.2)(/ (OR (WHILE >0 (-121.7)(OR (196.8)(Item-Loaded)))(162.9))(AND (Forward)(Read-Sensor-L))))))(-97.2))(AND (- (70.7)(Get-X-Pos))(275.1)))(OR (OR (178.9)(WRITE ( 4.0)(Beacon-Visible)))(+ (Get-X-Pos)(Read-Sensor-L))))))(+ (Get-Y-Pos)(- (- (Forward)(OR (+ (-40.9)(+ (Get-Y-Pos)(AND (Forward)(- (Get-Y-Pos)(Read-Sensor-M)))))(WHILE >0 (/ (-184.5)(- (Turn-Right)(/ (+ (41.0)(WRITE (248.2)(Item-Loaded)))(Turn-Right))))(Forward))))(WRITE ( 3.4)(- (Forward)(WRITE (Item-Loaded)(Turn-Right)))))))(AND (AND (Forward)(Forward))(- (-195.0)(Forward))))(OR (+ (WHILE >0 (+ (WRITE (Get-X-Pos)(-131.7))(/ (+ (OR (-15.7)(* (-133.3)(Get-Y-Pos)))(Beacon-Visible))(OR (-182.2)(/ (OR (WHILE >0 (-121.7)(OR (196.8)(Item-Loaded)))(162.9))(AND (Forward)(Read-Sensor-L))))))(-97.2))(AND (- (70.7)(Get-X-Pos))(275.1)))(OR (Forward)(+ (Get-X-Pos)(Read-Sensor-L)))))))(AND (AND (Forward)(Forward))(- (234.5)(Forward))))(OR (WRITE (OR (Forward)(OR (* (AND (94.3)(Item-Loaded))(AND (+ (WHILE >0 (-108.3)(OR (271.2)(-273.4)))(Turn-Right))(/ (Read-Sensor-R)(+ (275.1)(Read-Sensor-L)))))(OR (Forward)(OR (+ (WHILE >0 (+ (WRITE (Get-X-Pos)(-131.7))(/ (+ (OR (-15.7)(* (-133.3)(Get-Y-Pos)))(Beacon-Visible))(OR (-182.2)(/ (OR (WHILE >0 (-121.7)(OR (196.8)(Item-Loaded)))(162.9))(AND (Forward)(Read-Sensor-L))))))(-97.2))(AND (- (70.7)(Get-X-Pos))(275.1)))(OR (OR (178.9)(WRITE ( 4.0)(Beacon-Visible)))(+ (Get-X-Pos)(Read-Sensor-L)))))))(AND (AND (Forward)(Forward))(- (234.5)(-51.9))))(182.9))



Feel free to make a small donation if you like the program and would like to support the work on this freeware application.