robot intelligence technology lab. generalized game of life 2003. 05. 22 20025059 yongduk kim

16
Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Upload: ruby-lang

Post on 21-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab.

Generalized game of life Generalized game of life

2003. 05. 22

20025059 YongDuk Kim

Page 2: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 2

0. Content

Introduction Original game of life Create generalized game of life Using GA Result Conclusion

Page 3: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 3

1. Introduction

Goal Implement original game of life system Make this system more general

This is achieved by using Genetic Algorithm.

Page 4: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 4

2. Original Game of Life

Rule If the number of surrounding cells is less than 2 or greater than 3,

the current cell dies. If the number of living cells is exactly 2, or if the number of living

cells is 3, maintain status. If the current cell is dead, but has three living cells surrounding it,

it will come to life.

Implementation 40 X 40 cells Each bound is connected Using C++

Page 5: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 5

3. Create Generalized game of life using GA

GA is used to make generalized game of life.Procedure GA

Begint ← 0

Initialize P(t)

Evaluate P(t)

While (not termination-condition) do

Begint ←t+1

Select P(t) from P(t-1)

Alter P(t)

Evalutate P(t)

End

end

Start

initialize

evaluate

Keep the best

Generation++

Selection

Crossover

mutate

evaluate

elitist

generation<MAXGENS

End

Page 6: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 6

3. Create Generalized game of life using GA

Components of GAA genetic representationA way to create an initial populationSelection methodAn evaluation functionGenetic operators

Page 7: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 7

3. Create Generalized game of life using GA

A genetic representation

A way to create initial population Randomly

0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1

First 9 bitcurrent cell is dead

Total 18 bit

Last 9 bitcurrent cell is alive

Current cell is dead and has no neighbor.

Current cell is dead and has “1” neighbors.

Current cell is alive and has no neighbor.

Current cell is alive and has “1” neighbor.

Current cell is alive and has “8” neighbors.

Page 8: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 8

3. Create Generalized game of life using GA

Selection method Roulette wheel method

Probability of selection

Evaluation function Best solution has maximum fitness.

My interest world Active Not crowded

Page 9: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 9

3. Create Generalized game of life using GA

How? Active

Look at 2 generations in the Game of life, then check how many cells are different.

Let’s call this fitness1.

Not crowded Find a deviation from my desired number of cells. Then invert this deviation, because we want to maximize

fitness. Let’s call this fitness2.

fitness = W1 * fitness1 + W2 * fitness2

Page 10: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 10

3. Create Generalized game of life using GA

We must look the global feature Each generation of GA is consisted of 500 generation of Game of

Life Average this fitnesses.

Final Fitness

Page 11: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 11

3. Create Generalized game of life using GA

Genetic operator Mutation

With probability Pm

Crossover With probability Pc

Elitist Keep the best solution!

Page 12: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 12

Result

Number of Runs: 10 Population size : 100 Max generation : 200 PXOVER : 0.25

PMUTATION : 0.02

Page 13: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 13

Result

Result 1 I want half of the cells is alive, and active world. I think First constraints is 5 times important than second condition

W1 = 5.0 W2 = 1.0

001111111000000011 => Best fitness = 5599.918000000 for 200 generation 111111111000000000 => Best fitness = 5599.999990000 for 73 generation 001111111000000011 => Best fitness = 5599.940000000 for 200 generation 011111111000000001 => Best fitness = 5599.996000000 for 200 generation 011111111000000001 => Best fitness = 5599.994000000 for 200 generation 111111110100000000 => Best fitness = 5599.998000000 for 200 generation 001111111000000010 => Best fitness = 5599.878000000 for 200 generation 001111111000000010 => Best fitness = 5599.894000000 for 200 generation 111111110100000000 => Best fitness = 5599.984000000 for 200 generation 101111110000000010 => Best fitness = 5599.876000000 for 200 generation

Many solution shows just inverting property.

Page 14: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 14

Result

Result 2 I want about 10 cells is alive, and active world. I think First constraints is twice important than second condition

W1 = 2.0 W2 = 1.0

000110100000000001 => Best fitness = 3021.632000000 for 200 generation 000110011000000000 => Best fitness = 3021.658000000 for 200 generation 000110011000000000 => Best fitness = 3021.666000000 for 200 generation ……………………..

Page 15: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 15

Result

Result 3 I want about 30 cells is alive, and active world. I think First and second constraints have same importance.

W1 = 1.0 W2 = 1.0

000101011010000111 => Best fitness = 1566.490000000 for 200 generation 000110011000001111 => Best fitness = 1581.482000000 for 200 generation 000100111010001111 => Best fitness = 1581.070000000 for 200 generation ……………………..

Page 16: Robot Intelligence Technology Lab. Generalized game of life 2003. 05. 22 20025059 YongDuk Kim

Robot Intelligence Technology Lab. 16

Conclusion

Implementation the Game of Life using c++ Extend it to generalized Game of Life Using GA

GA generates funny rules successfully, according to my intends.

BUT, it is Somehow difficult to find the fitness function because it seems that this is a little subjective and vague.