MTAT.08.015, 2CP Seminar Ilja Livenson Ilja.livenson@gmail.com Robot Fight MTAT.08.015, 2CP Seminar Ilja Livenson Ilja.livenson@gmail.com
Outline Robot: a hero of our time Introduction to Robocode Passing the course More about Robocode Rules of the world
Sample Fight Alt-Tab
Passing the course 2 benchmarks 2 competitions Top 50% in both of them In case you fail the previous point – extra work! Article and presentation http://courses.cs.ut.ee/2007/robots/Main/Assessmen t
Deadlines I Contest – 3.10 – One-on-One II Contest – 10.10 – Melee I Benchmark – 7.11 – Movement II Benchmark – 14.11 – Targeting Final results: 28.11
Robocode Originally by Matthew Nelson from IBM Small world with simple rules Developers write code to control the behavior of the tanks in the field Moving, shooting, scanning, ramming Code size Nanobots, Microbots, Minibots, Megabots http://robocode.sourceforge.net
Physical model Processing loop Movement Gun and radar rotation Bullets 1 tick = 1 turn = 1 frame Movement Gun and radar rotation The speed of rotation per tick is limited Bullets http://robowiki.net/cgi-bin/robowiki?GamePhysics
Processing loop All robots execute their code until taking action Time is updated (currentTime++) All bullets move and check for collisions All robots move (heading, acceleration, velocity, distance, in that order) All robots perform scans (and collect team messages) The battlefield draws
Movement Acceleration: 1px/tick Deceleration: 2px/tick Maximum speed: 8px/tick
Bullets Damage = 4 * firepower. Velocity = 20 - 3 * firepower If firepower > 1, it does an additional 2 * (power - 1). Velocity = 20 - 3 * firepower Gun heat generated = 1 + firepower Power returned on hit = 3 * firepower Heat = 1 + (firepower / 5)
Robocode API Event based programming Superclasses JuniorRobot SimpleRobot AdvancedRobot
Modes One-on-one Melee Team
Questions? Next time: Movement, Targeting, Radar, Strategy