Presentation is loading. Please wait.

Presentation is loading. Please wait.

Evolving Killer Robot Tanks Jacob Eisenstein. Why Must We Fight? Giving the people what they want Essence of embodiment: Moving around and surviving in.

Similar presentations


Presentation on theme: "Evolving Killer Robot Tanks Jacob Eisenstein. Why Must We Fight? Giving the people what they want Essence of embodiment: Moving around and surviving in."— Presentation transcript:

1 Evolving Killer Robot Tanks Jacob Eisenstein

2 Why Must We Fight? Giving the people what they want Essence of embodiment: Moving around and surviving in a hostile environment. Real creatures…

3 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

4 Dodging Squigbot

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

6 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

7 Example AFSM 0.87 0.5 1 -50 1. Randomignore 2. DivideConst_1Const_2 3. Greater ThanLine 1Line 2 4. Normalize AngleEnemy bearingignore 5. MultiplyLine 4Line 3 6. OutputTurn Gun LeftLine 5 FunctionInput 1Input 2Output …………

8 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

9 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

10 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

11 Cornering CornerBot

12

13 Example Program 0.87 0.5 1 -50 50 1 1 100 0 0 0 1. Randomignore 2. DivideConst_1Const_2 3. Greater ThanLine 1Line 2 4. Normalize AngleEnemy bearingignore 5. Absolute ValueLine 4ignore 6. Less ThanLine 4Const_90 7. AndLine 6Line 3 8. MultiplyConst_10 9. Less ThanEnemy distanceLine 8 10. AndLine 9Line 7 11. MultiplyLine 10Line 4 12. OutputTurn gun leftLine 11 0 FunctionInput 1Input 2Output

14 Inputs Position Velocity Heading Energy Gun Heat Useful Constants 1 2 10 90 Enemy Distance Bearing Heading Energy Velocity

15 Outputs Forward / Backward Turn robot Turn radar Turn gun Fire Gun heat must be zero Variable power

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


Download ppt "Evolving Killer Robot Tanks Jacob Eisenstein. Why Must We Fight? Giving the people what they want Essence of embodiment: Moving around and surviving in."

Similar presentations


Ads by Google