Genetic Planning using Variable Length Chromosomes Alexandru HORIA BRIE Ecole Polytechnique Palaiseau, France
A. Horia Brie, P. Morignot
Philippe MORIGNOT AXLOG Ingéniérie Arcueil, France
ICAPS – Monterey, CA – June 5-10, 2005
Page 1
Encoding C A
B
On(C, Table)
Chromosome (plan)
On(B,C)
A B C
On(A,B)
Action Binding index + env.
Gene (action)
C = ( ai , ( pi , j , o j ) j∈Param ( i ) )i∈[1, N ]
ai : index of i - th action
where
pi , j : index of j - th parameter in i - th action o j : index of j - th object in the parameter list
A. Horia Brie, P. Morignot
ICAPS – Monterey, CA – June 5-10, 2005
Page 2
Components • Fitness function : – – – – –
Number of conflicts Number of unexecutable actions Position of the first conflict Chromosome size, size of the longest correct sub-sequence #collisions wrt. goals
• Operators :
– Crossover : one-point uniform. – Mutation : • • • •
Growth / shrink Swap Gene replace, action parameter replace Heuristic : removal of conflicting genes, of duplicated genes, etc.
• A chromosome is a variable-length linked list of genes; A gene is a limitedlength vector of parameters. – The parameter typing comes from a binding environment (« World Model »).
A. Horia Brie, P. Morignot
ICAPS – Monterey, CA – June 5-10, 2005
Page 3
Genetic Techniques
Tournament selection
Local minimum
New population
Population reset A. Horia Brie, P. Morignot
Elite crossover / mutation
Initial state
1st action
Multi-populations
…
Goals
Weak memetism (in seeding) ICAPS – Monterey, CA – June 5-10, 2005
Page 4
Algorithm 1. 2. 3.
Parse the domain and problem, parse the configuration file; bind objects to types and record the typing of possible actions. Initialize the populations with random chromosomes of random lengths (using weak memetism in seeding). WHILE (solution not found OR timeOut not exceeded) A. B. C. D. E. F.
4.
Select 1 or 2 chromosome(s) using tournament selection. Apply crossover and/or mutation. Compute the offspring’s fitness value. Apply elitism selection if required. Add the result(s) to the next generation of this population. REPEAT from A UNTIL size(NextPopulation) = constant.
Decode the solution (or the best solution found so far)
A. Horia Brie, P. Morignot
ICAPS – Monterey, CA – June 5-10, 2005
Page 5
Implementation & Method • PDDL domains :
– Untyped blocks world problems in Spector’s or STRIPS domain. – (Un-) typed gripper problems.
• 0.5s to 2.0s in real time per generation
– On an average loaded computer (400 MHz, Pentium). – With a C++ implementation (Bison & Flex for the PDDL parser). – 1000s of chromosomes; 30 genes on average; 5 parameters on average.
• Several runs of the same example (average results). • Many inter-dependent parameters (e.g., weights, thresholds, probabilities).
– Searching for the most relevant parameters and their « optimal » value, considering the other ones as set to their default value.
• Pure performances (convergence speed). A. Horia Brie, P. Morignot
ICAPS – Monterey, CA – June 5-10, 2005
Page 6
Parameters Analysis 250
pddl1
A. Horia Brie, P. Morignot
grippertyped2
400
350
300
gripperuntyped2 pddl1
Population size 350
pddl1
pddl4
300
pddl4
pddl5 spector sussman gripperuntyped2 grippertyped2
spector sussman 0.8
gripperuntyped2
5 pddl1
#Generation
5
gripperuntyped2 pddl5 pddl1
pddl1 0.8
Elitist Mutate parameter
0.6
0.4
0.4
0.2
0
0
2 2 2 3 3 3 4 4 4 5 Tournament size 180 160 140 120 100 80 60 40 20 0
spector sussman
250
0
pddl5
200
50
1000 800 600 400 200 0
150
#Generation
100
#Generation
#Generation
150
pddl4
1200
pddl1 pddl4 pddl5 spector sussman gripperuntyped2 grippertyped2
200
250
pddl5
200 150
spector sussman gripperuntyped2
100 50 0
grippertyped2 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 #Populations
ICAPS – Monterey, CA – June 5-10, 2005
spector sussman pddl1
Page 7
Scaling up 800
run #1 run #2 run #3 run #4 run #5
700
# generation
600 500 400 300 200 100 0 0
1
2
3
4
5
Problem size
A. Horia Brie, P. Morignot
ICAPS – Monterey, CA – June 5-10, 2005
Page 8
Conclusion • Intuitive encoding, complex fitness function, built-in and extensible typing system. – Slightly more powerful than the predecessors’ planning description language.
• Parameter analysis :
– Approx. 300 individuals per population, 3 to 4 populations, 3 to 4 individuals in tournament.
• Work to make the model scale up. • Research directions :
– Hybridation A.I. planner / genetic planner. – Stochastic operators for PDDL. – Fast Messy GA, Linkage Learning GA, ...
A. Horia Brie, P. Morignot
ICAPS – Monterey, CA – June 5-10, 2005
Page 9