---- ====== Extra Credit: Second Robocode Tournament ====== Deadline: Fri, 12/12, 5pm The second Robocode tournament will be optional, for extra credit only. It will increase your average lab test grade by up to 15%. I will conduct the tournament outside of class time and post the results. You will work alone for this tournament. I'll need to have your robot code (.java file) by the above deadline. Use the CS-175 ecampus dropbox. ===== Objective ===== The objective of your robot will be the following: * Touch all four corners of a 800x600 battlefield, returning to the center of the battlefield after touching each corner. * The order in which the corners are visited by your robot does not matter, //but it must return to the center after touching each corner.// (This means the robot has to return to the center at least 4 times.) * Your robot must be on the battlefield with //13 SittingDucks//. * The tournament winner will be the robot that reaches the center after touching all four corners in the shortest amount of time. * Robots will be timed by stopwatch while robocode is running at 30 frames per second (the default speed of robocode). Sample robots (without source code) from a previous tournament are here: * [[https://piazza.com/class_profile/get_resource/hzyhv50hhbf7f5/i3alqykr6x71o1|Corn__winwin]] * [[https://piazza.com/class_profile/get_resource/hzyhv50hhbf7f5/i3alr2cal1p1pa|Strategery]] * Import these in Robocode through the "Robot" menu. ===== Requirements for extra credit ===== Your robot must meet the following __minimum__ requirements; if you meet all the requirements, you will get full marks toward extra credit, otherwise you will get less than full marks: * Your robot must touch all four corners of a 800x600 battlefield, returning to the center of the battlefield after touching each corner. * It must do this with 13 SittingDucks on the battlefield. * Whether your robot destroys the SittingDucks or goes around them is up to you. * Your robot must include a top comment block that includes your name and a __**detailed**__ explanation of your robot's strategy. * You'll need to provide //a minimum of 100 words// describing your strategy. * Your robot must be unique (not a copy of an existing robot from google). * Your robot must not be named "CornerBot" or any variation of "CornerBot". * Your robot must extend the Robot class, not the AdvancedRobot or JuniorRobot class. * Change your robot's colors using the ''setColors(Color.bodyColor, Color.gunColor, Color.radarColor)'' or ''setColors(Color.bodyColor, Color.gunColor, Color.radarColor, Color.bulletColor, Color.scanArcColor)'' method. * See list of [[http://docs.oracle.com/javase/6/docs/api/java/awt/Color.html?is-external=true|valid colors]]. * Movement: * Your robot can use the ''[[robocode_lab_-_gotocenter_gotocoords_methods|gotoCenter() and gotoCoords()]]'' methods, but this is not mandatory. * Reacting to radar-scanned robots: * Change what happens in the ''public void onScannedRobot(ScannedRobotEvent e)'' method. * Reacting to hitting a wall: * Use the ''public void onHitWall()'' method to avoid getting stuck on walls. * Reacting to hitting another robot: * Use the ''public void onHitRobot()'' method to react to hitting another robot. * You have to actually do something in the methods listed above. * Your robot must be autonomous, i.e., it must not be human controlled via keyboard or mouse. * Your robot must compile. * Your robot must be valid. Invalid robots blow up immediately when a battle starts. Other Guidance: * Consult online tutorials, the sample robots, and the [[http://robocode.sourceforge.net/docs/robocode/robocode/Robot.html|documentation]]. * Email me with questions. ----