Trying to create a robot that is able to counter and beat a variety of other robots is a challenging task. I will try to create a robot that can beat Walls, RamFire, SpinBot, Crazy, Fire, Corners, Tracker, SittingDuck. My strategy for defeating each of these different robots is as follows:
Movement:
Robot will move up and down a wall, but if robot runs into an enemy robot, the robot turns and begins to move left and right across the map. This will help the robot evade attacks. The robot will also move the same way if it gets shot by another robot. The basic strategy for movement is to keep moving and not stay in one place.
Tracking:
Doesn't really utalize tracking capabilities. This robot will only pick up on enemy robots if the enemy is in front of the robot.
Firing:
Fires upon sight of the enemy.
Since Walls is one of the toughest robots to defeat, I decided to chose this design because it will defeat the Walls robot on average 80% of the time. After implementing this robot, I was able to defeat each of the robots on a consistant basis except the Tracking robot. I defeated all the other robots about 60% of the time, but I am 50-50 against the Tracking robot. I had a tough time against the Tracking robot because of it's aggressive nature and exploits the weak spots in my robot.
I have learned a lot about Robocode through this experience. It is very hard to get robots to do things by just using the basic Robot package. This restricts the robot's movements a lot. The robot only has a choice to do one command at any point. This meant that the robot was either evading or attacking and could not do both at the same time. If I were able to do this, I would have been able to build a much more balanced offensive and defensive robot.
My code can be downloaded here.
Monday, September 21, 2009
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment