Download - Evolving Killer Robot Tanks
![Page 1: Evolving Killer Robot Tanks](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/1.jpg)
Evolving Killer Robot Tanks
Jacob Eisenstein
![Page 2: Evolving Killer Robot Tanks](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/2.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/3.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/4.jpg)
Dodging Squigbot
![Page 5: Evolving Killer Robot Tanks](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/5.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/6.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/7.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/8.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/9.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/10.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/11.jpg)
Cornering CornerBot
![Page 12: Evolving Killer Robot Tanks](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/12.jpg)
![Page 13: Evolving Killer Robot Tanks](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/13.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/14.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/15.jpg)
Outputs
Forward / Backward Turn robot Turn radar Turn gun Fire
Gun heat must be zero Variable power
![Page 16: Evolving Killer Robot Tanks](https://reader035.vdocuments.mx/reader035/viewer/2022062519/568150a8550346895dbeb58f/html5/thumbnails/16.jpg)
Functions
Greater than, less than, equal + - * / % Absolute value Random number Constant And, or, not Normalize relative angle