My Robots

My First Robot
Robocode is first created by IBM and it was designed to help people learn to program in Java, Net framework programming language (C#, VB, NET etc.)
Basically, robot has four parts: body, vehicle, gun and radar; and it has three basic functions: movement, target and fire. Movement means it can move forward, backward, turn left or right from 0 – 360 degree. It can also target because it has radar to help it scanning around and set targets. Once it finds a target, it can fire at it. A robot’s life will be considered over when its energy becomes zero.
Though it is excited to write my owned robot, it is not easy to write a competitive one. So far, my robots have very simple movement, such as move forward, backward and turn around. The most difficulty I encountered was to calculate the direction. For example, for the position4 robot, when I controlled it to move to center, I had to consider different angles as it locates in different corners.
Basically, I finished all robots. But they are very simple robots. Later, when we write a competitive robot, we also need to think about the velocity, distance, angle difference due to movement, power of fire, etc. Only if we handle these data well, we can have more accurate hit rate and avoid getting shoot.