230 likes | 316 Views
Graduate Capstone Project Breaking Walls: Developing a Success f ul Robot in Roboc od e. Chris Velez cvelez4@pride.hofstra.edu Summer 2011 Advisor :Dr. Xiang Fu Committee Members: Dr. Habib Ammari , Dr. Chuck Liang. Overview. Introduction Problem Algorithm Design Performance
E N D
Graduate Capstone ProjectBreaking Walls: Developing a Successful Robot in Robocode Chris Velez cvelez4@pride.hofstra.edu Summer 2011 Advisor :Dr. Xiang Fu Committee Members: Dr. HabibAmmari, Dr. Chuck Liang
Overview • Introduction • Problem • Algorithm • Design • Performance • Conclusion
What is Robocode? • Game where robots battle in an arena • Robots are controlled via Java programs • Battles consists of 10 rounds • A battle ends when robot is destroyed
The Problem • Goal: Defeat the robotWalls • Walls is the top performing robot • Must create a robot to defeat Walls
The WallsKiller Robot • Contribution: Creation of WallsKiller • WallsKiller defeats Walls in 1 on 1 combat. • Maintains a high level of performance
What Does WallsKiller do? • Implements a firing algorithm developed to hit Walls • Uses an erratic movement pattern to avoid enemy fire
The Algorithm • Takes advantages of Walls predictable movements • Predicts the movements of the Walls robot • Uses quadratic equations
The Cosine Rule • Will utilize rule and apply to the positions of Walls and Wallskiller
Applying Cosine Rule Beta Alpha
Design • WallsKillerRobot • BattleData • FireControlSystem • FireCommand • QuadraticEqRoots
WallsKillerRobot • Base class • Controls movement and firing commands • Battle event handlers
BattleData • X,Y – Coordinate data • Distance, heading and bearing • Enemy heading, bearing and velocity
FireControlSystem • Implements firing algorithm • Calculates firing angle • Passes information to FireCommand
FireCommand • Choose whether or not to fire • Set power of bullets • Determines degrees to rotate gun
QuadraticEqRoots • Implementes advanced mathematics • Returns data to FireControlSystem
Performance • Hit Rate 70% • Average Remaining Health: 77 Energy • Robocode Score: 72%
Observations • Hit percentage under 100% • Walls turning • Improved evasion
Conclusion • Successful in 1-on-1 combat • Performance shows room for improvement • Needs improved movement algorithm
References • Mathew Nelson, "Robocode", available at http://robocode.sourceforge.net/, retrieved 06/01/2009. • Parker S, “Secrets from the Robocode Masters: Predictive Targeting”, http://www.imb.com/developerworks/java/library/j-pred-targeting/ (2002) • Eisenstein, J.: “Evolving robocode tank fighters”. Technical Report AIM-2003-023, AI Lab, Massachuesetts Institute of Technology (2003) • F.N. Larsend, “Robocode Scoring” Available: http://robowiki.net/wiki/Robocode/Scoring (2010) • S.Li,“Rock‘em sock ‘emrobocode!, http://www.ibm.com/developerworks/java/library/j-robocode/ (2002)
References cont. • Shichel S, Ziserman E, Sipper M,: “GP-Robocode: Using genetic programming to evolve robocode players”. Ben-Gurion University, Department of Computer Science. • Kobayashi K, Uchida Y, Wantabe K,: “A study of Battle Stragety for Robocode”. SIC Annual Conference, Fubuki University Japan (2003) • J.L Nielson and B.F Jensen, “Modern AI for Games: Robocode”. http://www.jonnielson.net/RoboReportOfficial.pdf, (2010) • J. Hong and S. Cho, “Evolution of emergent behaviors for shooting game characters in Robocode,” Evolutionary Computation, pp. 634-638, 2004