- Movement: How does the robot move? Does it have an avoidance or following strategy?
- Targeting: How does it find a target to fire?
- Firing: What is its criteria for firing?
Walls
Movement: The walls robot moves exactly as the name implies: around the walls of the map. At the start of a game, the robot turns to a side of the and heads straight for it. Then turns parallel to the wall and moves in a clockwise fashion around the map. Before turning around the corner of the map, Walls checks if there is an enemy robot along that wall, and if there is, Walls fires at that robot until the robot is either not on the wall or dead. If Walls runs into another robot, Walls either backs up or moves ahead 100 pixels, depending on where the enemy robot it bumped into is. Walls then turns 90 degrees right moves across the screen. Thus, this robot impeliments an avoiding strategy since it is always trying to move away from an enemy.Targeting: Walls finds a target around the map when an enemy passes in front of Walls and is picked up by the scanner. This robot does not lock on to any robot.
Firing:Fires on sight. As soon as Wall's radar identifies an enemy robot, it fires its weapon. It always fires a bullet with firepower 2.
RamFire
Movement: RamFire spins around in a circle until it finds and enemy. This robot utilizes a following strategy. When RamFire finds an enemy, it stops spinning, calculates the distance between it and the enemy and charges at the enemy full speed. If it gets to its destination without ramming into an enemy, RamFire starts spinning again until it finds another enemy and the process starts over again. If RamFire runs into another robot, it backs up and fires its weapon.
Targeting: This robot spins around 360 degrees until it picks up an enemy robot.
Firing: The amount of firepower that RamFire uses is proportional to the amount of energy the enemy robot has left. RamFire doesn't want to kill the enemy robot since it primarily wants to ram the other robot for extra bonus points. So the more energy the other robot has left the stronger the firepower up to firepower 3. The weakest bullet that RamFire uses is 0.1. Unlike other robots, this calls the fire() method in the onHitRobot() method instead of in onScannedRobot().
SpinBot
Movement: SpinBot moves around in a circular pattern throughout the entire game. SpinBot will turn if it runs into a wall. If SpinBot runs into another robot, SpinBot will fire upon that other robot if the enemy is in front of it, otherwise it will just turn right 10 degrees. This means that SpinBot uses an avoidance strategy, since it is always moving around.
Targeting: SpinBot's gun and radar never move around to track anything. SpinBot just scans the map as it moves around in its circular pattern.
Firing: Always fires a bullet with firepower 3 whenever it scans an enemy robot.
Crazy
Movement: Crazy moves around by turning and moving at the same time. This is accomplished by using the AdvancedRobot package and using the waitfor() method. The waitfor() method waits until the robot completes a turn while still allowing the robot to move forward. Thus, the method seems to allow the robot to move and turn at the same time. The robot keeps moving forward until it hits a wall or enemy robot and then moves in the opposite direction.
Targeting: The gun and radar do not move. So like previous robots explained, Crazy has no tracking system and just waits for a robot to be in front of it.
Firing: Fires when the robot scans an enemy robot in front of it with firepower 1.
Fire
Movement: Fire only moves after it got hit. When Fire gets hit, it turns at an angle relative to the angle that it was shot from and then moves 50 pixels forward. Fire only shows signs of evasive maneuvers after it gets shot.
Targeting: Fire targets other robots by spinning its gun around 360 degrees. After finding the first target it sees, Fire locks onto that target. This is the first robot that has tracking capabilities. Once it finds its target, Fire locks onto the target and keeps firing bullets until Fire recieves damage and then tries to use some evasive maneuvers.
Firing: After finding a target, Fire fires its strongest bullet if the enemy robot is within 50 pixels and if Fire has more than 50 energy left. Otherwise, Fire only fires a power level 1 bullet.
Sitting Duck
Movement: This robot has no movement, it just sits there and outputs some information on the console.
Targeting: None
Firing: None
Corners
Movement: When a match begins, Corners does exactly what the name implies and goes to a
corner that is specified in the code. Corners gets to a corner by first turning to one wall, moving
toward that one, then turning perpendicular to that wall until it gets into the corner of the map.
Targeting: After getting into a corner, the robot's gun turns its gun 360 degrees until it finds an enemy then tracks and fires at it.
Firing: Depending on its distance from an enemy, the firepower of the bullet changes. The closer the enemy the stronger the bullet.
Tracker
Movement: Tracker moves toward an enemy until the enemy is within 150 pixels of it. If the enemy is closer than 100 pixels away, then tracker moves back.
Targeting: Tracker initially spins its gun around and tracks the first enemy it finds. Tracker targets a single enemy until the enemy either dies or Tracker cannot find the enemy for 10 turns. If Tracker runs into another robot while moving, Tracker will change the robot it is tracking to the robot that it just bumped into and fire.
Firing: Tracker fires at the tracked enemy if the enemy is within 150 pixels with firepower 3.
0 comments:
Post a Comment