Thursday, September 16, 2010

Competitive Robot: RiceMusubi

Overview
          After learning basics movements, targeting and strategies on previous Robocode assignments,  I created my own robot that will hopefully outlast the sample robots (Walls, RamFire, SpinBot, Crazy, Fire,  Corners, Tracker, SittingDuck) in the Robocode. This would help my robot to prepare in the coming competition in class. Below is the summary of my robot's design strategy.

Design  

Movement  
          The basic strategy for movement is just to keep on moving. It is evident from the sample robot, specifically the sample Walls robot that not staying on one place and moving in a certain distance would be very effective in dodging enemy bullets. When my robot finds and enemy, it moves its body parallel to the enemy and will 150 pixels forward but will try to maintain its position parallel to the other robot. This movement sometimes results to my robot circling around the other robot and effectively dodging the enemy's fire. In an event that my robot hits the wall, it will run towards the center of the battlefield to avoid getting cornered. And will then do its original movement.

Targeting
          For the targeting strategy, I adapted my previous robot's behavior- Boom04. It scans the nearest enemy robot and it uses its gun to keep track of that robot. The idea is to keep the gun pointing towards the enemy at all times. To be able to do this, I need to make sure that the gun and the body of my robot are able to move independently.

Firing
For the fire power, I adapted the behavior of my previous robot (Boom03), which uses its distance from the enemy to figure out how much fire power the bullets should have. The nearest the enemy, the highest the fire power will be use. As soon as my robot found another robot, it'll start shooting and will keep shooting.
    Results

              To be able to test my robot against other robots, I used the sample robots that are available in the Robocode program. Below are the results of the test.

    vs SittingDuck:
              This is a no competition, as this robot doesn't do anything. Any robot that can target and fire would win against this robot. My robot won 100% of the time.

    vs Fire:
              This robot is a pretty hard opponent against my robot. Although my robot moves a lot, the Fire robot was able to hit it a couple times before it could get away because of the number of bullets this robot fires at a time. My robots has a big disadvantage because it can only fire after it moves while this robot just sits and can keep firing. It only moves when it gets hit which makes it a hard target since my robot fires on its opponents previous position. My robot won 41% of the time.

    vs Corner:
              This robot is similar to Fire, the only difference is  this just stays in the corner and never moves. It is much easier target. My robot won 58% of the time.

    vs Crazy:
              This robot is a very hard target for my robot. That only weakness of this robot is it doesn't fire as much. It is also worth mentioning that this robot extends AdvancedRobot. My robot won 48% of the time.

    vs Tracker:
               This is a perfect opponent to show off my robots agility. My robot pretty much dodge every bullet the this thing throws. My robot won 64% of the time

    vs Spinbot:
               Similar to Tracker, my robot just pretty much dodge every bullet this thing fires. Its only advantage is it uses the maximum amount of fire power every time it fires. This is also another advanced robot. My robot won 60% of the time.

    vs RamFire:
              This is very hard to beat for my robot. My robot lost only because of the damage it cost when it rams and is pretty much dead when cornered. My robot won 35% of the time.

    vs Walls:
              My robot never had a chance on this robot. This is the robot to beat, that's why most of the other students based their robot from this. It's a very hard target. My robot never won a round.

    Conclusion
              Robocode is easiest and best way to learn programming. It not only teaches me but it also showed me that programming could be fun too. This experience thought how to be really a better programmer. It thought me read and understand APIs which. It made realize that programming takes time and I better start doing it earlier to be able to create and develop a better program. All in all, this assignment is really fun, ans I might actually like programming now. 

    Download:
     RiceMusubi Eclipse Package
     RiceMusubi robot jar file

    No comments:

    Post a Comment