That sounds fun...
Better yet how about designing a complex, cannon wielding, slaying battle robot !
Now thats better.
Robocode is an open source educational game started by Matt Nelson of IBM, you can get a good idea of what the game is all about here: ROBOCODE
Robocode allows you to design the look and behaviour of a battle robot, you can create anything from a simple robot that shoots its gun in the direction of an enemy, to one that utilises complex statistical analysis, your skill level is the only limit with these battle bots. Well then, who do you get to battle and prove your superiority over given that you put your time and effort into making an effective killing machine? Robocode has a good sized online community where you can test your robots might against other programmers robots here: sourceforge
Okay so you are convinced and want to take on the quest of creating a robot capable of some mayhem, you need a starting point. I would suggest starting the way I did, by completing the 13 robocode Katas.
Robocode Code Katas
- The minimal robot. Does absolutely nothing at all.
- Move forward a total of 100 pixels per turn. When you hit a wall, reverse direction.
- Each turn, move forward a total of N pixels per turn, then turn right. N is initialized to 15, and increases by 15 per turn.
- Move to the center of the playing field, spin around in a circle, and stop.
- Move to the upper right corner. Then move to the lower left corner. Then move to the upper left corner. Then move to the lower right corner.
- Move to the center, then move in a circle with a radius of approximately 100 pixels, ending up where you started.
- Pick one enemy and follow them.
- Pick one enemy and follow them, but stop if your robot gets within 50 pixels of them.
- Each turn, Find the closest enemy, and move in the opposite direction by 100 pixels, then stop.
- Sit still. Rotate gun. When it is pointing at an enemy, fire.
- Sit still. Pick one enemy. Only fire your gun when it is pointing at the chosen enemy.
- Sit still. Rotate gun. When it is pointing at an enemy, use bullet power proportional to the distance of the enemy from you. The farther away the enemy, the less power your bullet should use (since far targets increase the odds that the bullet will miss).
- Sit still. Pick one enemy and attempt to track it with your gun. In other words, try to have your gun always pointing at that enemy. Don't fire (you don't want to kill it).
No comments:
Post a Comment