evolving killer robot tanks

16
Evolving Killer Robot Tanks Jacob Eisenstein

Upload: ziarre

Post on 21-Jan-2016

23 views

Category:

Documents


0 download

DESCRIPTION

Evolving Killer Robot Tanks. Jacob Eisenstein. Why Must We Fight?. Giving the people what they want. Essence of embodiment: Moving around and surviving in a hostile environment. Real creatures…. Tank fighting simulator Human players code tanks in Java ~4000 tank control programs online - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Evolving Killer Robot Tanks

Evolving Killer Robot Tanks

Jacob Eisenstein

Page 2: Evolving Killer Robot Tanks

Why Must We Fight?

Giving the people what they want

Essence of embodiment: Moving around and surviving in a hostile environment.

Real creatures…

Page 3: Evolving Killer Robot Tanks

Tank fighting simulator Human players code tanks in Java ~4000 tank control programs online

Directional “radar” sensor Must be pointed at enemy to see

Actuators Moving, turning takes time Gun must cool before firing

No terrain effects Walled combat area

Page 4: Evolving Killer Robot Tanks

Dodging Squigbot

Page 5: Evolving Killer Robot Tanks

Evolving Robocode Tanks

Use genetic programming to evolve tanks Many reports of people trying this… ...no reports of success! Wrong encoding?

Page 6: Evolving Killer Robot Tanks

Representation

Each AFSM is a REX-like program Fixed-length encoding

64 operations per AFSM ~2000 bits per genome

Input

Base

onRammed

onHit

onScan

Other actuators

Gun

Page 7: Evolving Killer Robot Tanks

Example AFSM

0.87

0.5

1

-50

-50

-50

1. Random ignore ignore

2. Divide Const_1 Const_2

3. Greater Than Line 1 Line 2

4. Normalize Angle Enemy bearing ignore

5. Multiply Line 4 Line 3

6. Output Turn Gun Left Line 5

Function Input 1 Input 2 Output

… … … …

Page 8: Evolving Killer Robot Tanks

Training

Scaled fitness Mutation pegged to diversity Typical parameters

200-500 individuals 10% copy, 88% crossover, 2%

elitism This takes a LONG TIME!!!

Sample from ~25 starting positions Up to 50,000 battles per generation 0.2-1.0 seconds per battle 20 minutes to 3 hours per

generation

Page 9: Evolving Killer Robot Tanks

Results Fixed starting position, one

opponent GP crushes all opposition Beats “showcase” tank

Randomized starting positions Wins 80% of battles against

“learning” tank Wins 50% against “showcase”

tank Multiple opponents

Beats 4 out of 5 “learning” tanks

Both… Unsuccessful

Page 10: Evolving Killer Robot Tanks

GP is not Magic

A good encoding provides a huge advantage. Previous researchers got this wrong

GP is really good at finding non-general solutions Clever fitness functions can encourage general

solutions Much more computationally expensive

Page 11: Evolving Killer Robot Tanks

Cornering CornerBot

Page 12: Evolving Killer Robot Tanks
Page 13: Evolving Killer Robot Tanks

Example Program

0.87

0.5

1

-50

50

1

1

100

0

0

0

1. Random ignore ignore

2. Divide Const_1 Const_2

3. Greater Than Line 1 Line 2

4. Normalize Angle Enemy bearing ignore

5. Absolute Value Line 4 ignore

6. Less Than Line 4 Const_90

7. And Line 6 Line 3

8. Multiply Const_10 Const_10

9. Less Than Enemy distance Line 8

10. And Line 9 Line 7

11. Multiply Line 10 Line 4

12. Output Turn gun left Line 11 0

Function Input 1 Input 2 Output

Page 14: Evolving Killer Robot Tanks

Inputs Position Velocity Heading Energy Gun Heat Useful Constants

1 2 10 90

Enemy Distance Bearing Heading Energy Velocity

Page 15: Evolving Killer Robot Tanks

Outputs

Forward / Backward Turn robot Turn radar Turn gun Fire

Gun heat must be zero Variable power

Page 16: Evolving Killer Robot Tanks

Functions

Greater than, less than, equal + - * / % Absolute value Random number Constant And, or, not Normalize relative angle