
A virtual agent learning to collect items
Download v0.1 182K - Mac OS 8.5 - 9.2
The agent's program is evolved using genetic programming. It has to find items with its simulated sensors and bring them back to the base station, which splits into two subtasks:
- Developing a strategy to locate items widely scattered with short-range sensors and collecting them
- Bringing them back to the base station as fast as possible
The evolved program, as a LISP S-expression:
+ (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))