[[cs-175_fa14_first_robocode_tournament | <== Back to Robocode Tournament page]] ---- ====== Robocode Tournament 1 Ideas/Hints ====== ---- ===== Hint: Don't try to be perfect ===== Your strategy to touch the SittingDucks may not work every time. Sometimes the SittingDucks aren't in the formation you need them to be in. But you have three tries. ===== Idea: Destroy the SittingDucks ===== You won't get time bonuses, but getting rid of SittingDucks simplifies the task of touching them all. ===== Idea: Use SittingDucks' energy level ===== See the [[http://robocode.sourceforge.net/docs/robocode/robocode/Robot.html#onScannedRobot(robocode.ScannedRobotEvent)|onScannedRobot]] method documentation. For a robot //e// that you scan, you can get data such as distance (//e.getDistance()//) and bearing (//e.getBearing()//). But another item of data you can get is the //[[http://robocode.sourceforge.net/docs/robocode/robocode/ScannedRobotEvent.html|energy]]// of the scanned robot. A SittingDuck that hasn't been damaged yet has full energy; that's a SittingDuck that you haven't tagged yet. ===== Idea: Cover as much of the field as you can ===== * Simple strategy that could work if the SittingDucks are lined up just right * Start in a corner. * [[https://piazza.com/class_profile/get_resource/hzkswvpxv2r2nu/i1bos4n135j470|See image]]. ===== Idea: Don't go back ===== * Start from the west wall. * Scan and collide with the SittingDuck that has an x-coordinate closest to your x-coordinate. * Try to move only in eastward directions, never westward. * [[https://piazza.com/class_profile/get_resource/hzkswvpxv2r2nu/i1bpxmf5ncu7pb|See image]]. ---- [[cs-175_fa14_first_robocode_tournament | <== Back to Robocode Tournament page]]