Welcome on the CodeBattle Platform!
Stage 1 of Code-IT 2018
You are the ruler of a small village and your goal is to become the wealthiest ruler in the area. On the way to achieving this goal you can count on the support of your subjects. Your warriors and archers are powerful weapons against your competitors and your workers will help you to collect the necessary resources to persist in such a war.
The goal of one battle is to produce as many coins as possible. At the end of a battle the player with the most coins in their base wins. To produce coins you need to upgrade your base with resources which you can collect.
The MapEach map is a square map. A map can have the following types of fields:
- Land (units can walk on these fields)
- Water (units cannot walk on these fields, but arrows can traverse them)
- Wall (units cannot walk on these fields and arrows cannot pass them)
- Base (only your units can walk on your own base). Newly created units will be placed in the player's base. In the player's base his/her collected resources are stored.
The UnitsThree types of units exist:
- Collectors: They have large pockets for collecting resources but carry only a small bad dagger which makes them weaker when fighting against other units.
- Warriors: They carry mighty swords which are good for fighting but carrying more means smaller pockets which can hold not so many resources.
- Archers: Their bows make them excellent fighters from a distance but hauling a bow and quiver leaves little space for resources. Additionally, attacks further away and at close range do less damage.
Collect ResourcesAll units can collect resources, but collectors are much better in collecting resources than the other units. To collect a resource walk on a field that contains resources. The unit will collect as much resources as possible. All maps have some predefined resource locations. At the beginning of a battle, all possible resources locations are filled completely. When too many resource fields have been emptied, new resources will respawn on a random resource location. One field contains only a limited amount of resources. The resources on a field have a certain lifetime measured in rounds. When the lifetime expires, the (remaining) resources on that field will disappear. When not enough resource fields are present on the map another field will be chosen randomly and spawn fresh resources.
Unit Health and Fighting
Each unit has a specific amount of health points. Different unit types have different amounts of health points. When the health points of a unit reach zero, the unit is removed from the game and all resources the unit was carrying will be dropped.
You can fight against a unit of another player by either moving your unit aggressively on the map field of the other unit, or by specifically requesting an attack. You cannot fight against your own units. You cannot attack other players' bases but units from inside a base can attack enemies nearby according to the rules of their type.
When one unit attacks another, it deals a specific amount of damage to its target. The damage is then subtracted from the attacked unit, possibly killing it in the process. The damage of an archer depends on the distance. The distance between units is measured in Manhattan distance. In addition the archer needs a line of sight to shoot the arrow.
You can heal a unit completely when it is currently in your base. However the healing will cost half the resources required to build it. When a unit is healed, it cannot do any other actions in that round.
Produce Coins to win the battleThe player with the most coins at the end will win the battle. To produce coins you need to upgrade your base and it will start building coins. Each upgrade is more expensive but the production increases. TrueSkill is used to determine the overall rank. You can find the overall rank here. After the 17th of November 2017 (23:59:59) the overall rank will be reset and the final game play will start. The competitors with the best AIs will be invited to the final in Tübingen at the 24th of November 2017.
AI DevelopmentThe AI has to be developed with Java (JDK 8). You develop your AI locally with the CodeBattle SDK which you can download from here.
Take a look at the SDK tutorial page how to develop your AI. Don't worry if you have no clue how to start, the SDK contains a very basic example implementation. When you want to test your AI against the other competitors upload your client on our CodeBattle Server using your API key. Check this page for how to upload your CodeBattle client. You can upload your client until 17th of November 2017 (23:59:59). Afterwards the final battle will be played on our server in order to determine the best AIs.
You are allowed to use third party libraries and to copy code from other sources (if you have permission and/or license to do so) but you have to implement your own tactics and strategies.
The 5 Steps to get your AI working
Competing against your enemies is really simple. After downloading the SDK you can start implementing your own AI and after uploading your AI it will automatically fight your enemies.
For more details about the steps just click on the image.