Java Final Project – Robocode
Competition Submission Date:
Thursday, May 30th Demonstration Dates:
Friday, May 31th Tuesday, June 4th –
Period 2 & 6
Wednesday, June 5th – Periods
7
|
Objectives:
This project is designed to teach you more familiarity with basic Java
programming including using a Java API, inner classes, and event handling.
Requirements:
Download Robocode and
design your own battle robot. While you are free to be creative, you must
address the following items somewhere in your design:
1.
You must implement your robot using the PartsBot
structure.
2.
You must implement at least one basic game strategy for your robot. Some example strategies are robots that use advance
targeting, robots that ram other robots, and robots that use walls and corners
for cover.
3.
You must handle at least these four
events: onScannedRobot, onHitByBullet,
onHitRobot, onHitWall.
Plan to take some reasonable action during these events. Do not leave the
event handler empty.
4.
You must also plan to avoid the following
undesirable situations: being hit by a bullet, being hit by another robot, and
hitting a wall. If your basic strategy includes ramming other robots, then
this situation clearly would not apply in your case. Otherwise, consider what
actions you need to take to avoid these situations.
I
will permit you to use code snippets from existing robots. However, you must
reference all code that you borrow including code you write based on other
robot’s code. In addition, you must also include the source of the
referenced robot with your submission. This will allow me to ensure that you
are reusing code snippets and not simply reusing existing robots. You can also
expect that I will ask you to explain your code to me, so DO NOT REUSE CODE
YOU DO NOT UNDERSTAND. If you cannot explain the logic of your code, I will
deduct points from your project grade.
Demonstrations:
During Finals, you will need to demonstrate and explain your program. Please
make sure you have all of your java files and class files with you for you to
do your demonstration. Make sure you are prepared to have your robot running
at the time of your demonstration. Failure to be prepared for your demo will
result in a grade reduction for the project.
Documentation:
You do not need to generate Javadocs for your robot. Inline comments will be
sufficient. However,
please make sure these comments are meaningful and readable. I will inspect
your source code to see how well you documented your robot.
Grading:
The breakdown of the grading for this project is listed below. Note that 80%
of your grade comes from the code inspection and the remaining 20% from your
demonstration. You are permitted to modify your code after the competition
submission. However, I will not remove any deductions for missing or broken
functionality that you fix after your demo.
Functionality (implements
the stated requirements) ........................ 50%
Design (employs
efficiency, creativity, and uniqueness)..................
20%
Demonstration (punctual
and prepared).................….......................
Documentation (comments,
white space, readable style, etc.) .........
10%
Submission:
Once your robot is complete, go under the Robot menu and select "Package
robot for upload". In the resulting dialog make sure to include all the
names of your group members. While you will not be graded on your robot 's
performance in the tournament, you will be graded on the quality of your
implementation. For example, if your robot gets stuck in a corner for 10
minutes, you will lose points. This will also include a code audit for
commenting, design and other coding standards.
FAQ:
1. Your
robot must meet a minimum level of performance.
This means that it must be able to beat all of the sample robots (including Walls
) and HaveAtItBot
.
2. You cannot assume that the
battlefield will be of a specific size. Your robot must adjust to all possible
sizes. See the getBattleFieldWidth and getBattleFieldHeight
methods for details.
3.
Names must be short and sweet as well as not containing any words that
might offend the School. Names like
ThisBotIsTheCoolestAndWillOwnz0rAllOtherBotsInTheUniverse
will be disqualified. Use your common sense.
4. You must manage your gun's
heat! You can only fire your gun when the heat == 0.
You will need to use the cooling rate and energy of each shot to manage the
gun's heat.
5.
No overriding the onDeath method to do
anything stupid. If you die, you die. You can't respawn, or pop up a window,
or play some Windows sound. Same with onRobotDeath.
Just don't interrupt the match to taunt the person you just killed and you
will be fine.
6.
Inheriting from the AdvancedRobot class is mandatory since you will be implementing
your robot as a PartsBot. Your robot may write to files to improve
its AI. However, keep the writing to a minimum. If all the bots are spewing
out tons of information, the battle will be very slow.
7.
Use the examples! While the example bots are pretty useless, each one
implements a feature that might be of interest to you. Combine some of these
together and you will get some useful behavior.