Genetic Programming. A Brief Overview. Darius Makaitis CSC 650  Advanced Artificial Intelligence Creighton University. What is Genetic Programming?.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Genetic Programming
A Brief Overview
Darius Makaitis
CSC 650  Advanced Artificial Intelligence
Creighton University
http://whatis.techtarget.com/definition/0%2C%2Csid9_gci214639%2C00.html
Functions
+
2
3
*
/
X
7
Y
5
Terminals
(+ 2 3 (* X 7) (/ Y 5))
(+ …)
+
(+ 2 …)
+
2
(+ 2 3 …)
+
2
3
(+ 2 3 (* …) …)
+
2
3
*
(+ 2 3 (* X 7) (/ …))
+
2
3
*
/
X
7
(+ 2 3 (* X 7) (/ Y 5))
+
2
3
*
/
X
7
Y
5
(+ 2 3 (* X 7) (/ Y 5))
+
2
3
*
/
X
7
Y
5
*
X
7
First pick a random node
(+ 2 3 (* X 7) (/ Y 5))
+
2
3
/
Y
5
Delete the node and its children, and replace with a randomly generated program
(+ 2 3 (+ (* 4 2) 3) (/ Y 5))
+
2
3
+
/
*
3
Y
5
4
2
(+ X (* 3 Y))
( (/ 25 X) 7)
+

X
*
/
7
3
Y
25
X
(+ X (* 3 Y))
( (/ 25 X) 7)
Pick a random node in each program
+

X
*
/
7
3
Y
25
X
(+ X (* (/ 25 X) Y))
( 3 7)
Swap the two nodes
+

X
*
3
7
/
Y
25
X
* WhileNotAtCheese will be used exclusively as the root node of the parse tree
One possible solution:
While not at the cheese
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward
Turn right 90 degrees
Cheese?
Blocked?
How to get the starving mouse to the cheese?
Is there a better solution for this maze? How good is this solution?
Our mouse will die 10 moves from the exit after spending 100 units, so the fitness measure for our program is 12100
A fitness function:
Cheese?
Blocked?
While not at the cheese (12996)
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward one space
While not at the cheese (12996)
Move forward one space
Turn right 90 degrees
Turn left 90 degrees
While not at the cheese (12996)
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward one space
While not at the cheese (12996)
Move forward one space
Turn right 90 degrees
Turn left 90 degrees
Mutation:
While not at the cheese (12996)
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Turn left 90 degrees
While not at the cheese (12996)
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward one space
While not at the cheese (12996)
Move forward one space
Turn right 90 degrees
Turn left 90 degrees
Crossover:
While not at the cheese (11664)
If the way ahead is blocked
Move forward one space
Turn right 90 degrees
Otherwise
Move forward one space
While not at the cheese (12996)
Turn left 90 degrees
Turn left 90 degrees
Fitness measure: 2809
(after 4202 generations, with 1000 programs per generation)
While not at the cheese
If the way ahead is blocked
Turn right 90 degrees
Move forward one space
Move forward one space
Move forward one space
Otherwise
Move forward one space
Turn right 90 degrees
Move forward one space
Move forward one space
Turn left 90 degrees
If the way ahead is blocked
Turn left 90 degrees
Otherwise
Move forward one space
Is this better?
http://alphard.ethz.ch/gerber/approx/default.html