The successor of the Warlight AI Challenge

For those of you who are familiar with the original Warlight AI Challenge and maybe even Warlight itself, here is a quick overview of the changes in this new competition.

  • Most notably, the maps are now randomly generated. No longer will you be playing on the 'small earth' map, because no two maps will ever look the same again.
  • The luck factor has been changed from 100% to 16%, which means you will be a lot more certain of the outcome of an attack.
  • We added some wastelands at the start of each game, which are neutral regions with a bit more armies on them.
  • We've changed the way starting regions are picked. From all the super regions, one region is randomly picked and then players can choose in turn which one they would like to start on.

If you have any thoughts on these settings, either positive or negative, let us know on the discussion page. Also if you really like or dislike a generated map you can post the game link there.

The start of the game

At the start of the game, the engine will make a list of regions by picking one random region from each super region. Then the bots are asked in turn what region they would like to start on and they will get the region they return. The ordering is in an ABBAAB fashion to keep things fair. So it will look like this:

bot1 bot2 bot2 bot1 repeat...

The engine will give the amount of regions a bot can pick beforehand. Both bots always get the same amount of regions. If a bot doesn't return anything or something incorrect the engine will pick a random region for him.

The structure of a game round

This is the same as in the first Warlight AI Challenge, but will be explained here again. The rounds of the game consist of 2 parts. In the first part, the bots can place armies on their regions. At the start of the round, the bots are rewarded a certain amount of armies (see Armies per turn). They can place any number of these armies on any region they own. If a bot doesn't place all the armies he's got on the map, they will be lost. So it's always wise to put them all on.

In the second part, the bots can do attacks and transfers. The bot chooses a region to attack/transfer from, a region to attack/transfer to and how much armies will be used. If the region the bot chooses to go to is owned by himself, it is automatically a transfer . The amount of armies will be directly transferred between the chosen regions. If the region the bot chooses to go to is owned by the other player or neutral, the move is an attack . The region will be taken over if the attack is a success and the remaining armies from the attack will be placed on that region. If the attack fails, both regions will lose some armies and nothing further happens (see Combat for the rules on attacks).

1 army must always remain on your region after an attack/transfer, so the maximum number of armies you can use is the number of armies on the region minus 1. The bot can choose any number of his owned regions to attack/transfer with, as long as they have more than 1 army on them. A region can attack/transfer multiple times in a round, but never to the same region twice. A region that you have taken over this round cannot attack/transfer yet and has to wait until the next round. Also, any armies that have been transferred can't be used that round for attacking/transferring again (the one army that has to stay behind still has to stay there, even if more armies have been transferred to that region that round).

The amount of armies per turn

The bots will always be rewarded at least 5 armies at the start of each turn. If a bot manages to completely own a super region at the start of a turn, bonus armies will be rewarded. The amount of bonus armies vary per super region. You can look this up in the legend by the lower left corner of the game map, which will appear if you click on a super region on the map. The amount of armies that is rewarded by a super region is dependent on how large the super region is, how hard it is to defend, and also a random factor. It is even possible that a small super region gives no reward at all.

Combat mechanics

Combat has changed a bit in Warlight AI Challenge 2, as the luck factor has decreased, but still uses the same concept. The amount chosen by the bot in his attack move are the attacking armies, all the armies on the region that is attacked are the defending armies. There are two values that are calculated and averaged to calculate how much attackers and defenders are destroyed.

For the amount of defending armies destroyed: The first value is exactly 60% of the total amount of attackers. The second value is the same value as used in the first Warlight AI Challenge, namely each attacker has a 60% chance of destroying one defending army. This second value is thus dependent on luck, as it should average 60% of the attacking armies, but in actuality more or less armies might be destroyed. After these two values are calculated they are averaged with use of the luck factor which currently is 16%. So 84% of the first value is combined with 16% of the second value, this is rounded and that is the total amount of defenders destroyed.

For the amount of attacking armies destroyed, the same calculations are used, except the 60% is changed to 70%. So the first value is 70% of the defending armies and the second value is a 70% chance for each defending army to destroy one attacking army. These values are combined again with a 16% luck factor.

As you can see it is now more predictable what will happen when you attack a region, but there is still a little bit of randomness. If all the defending armies are destroyed, the remaining attacking armies are transferred to the defending region and the region is now owned by the attacking player. If not all the defending armies are destroyed or if all of the attacking armies are destroyed, the attack has failed. Both regions lose the calculated amount of armies and the regions still belong to their original owners.

Fog of war

The game is played with fog of war. This means that the bots won't be able to see beyond the neighboring regions of the regions they own. When playing back the game, you are able change the view by pressing 'v' or clicking the view buttons in the lower left corner of the game. This way you can switch views a see what each bot is currently able to see.

Who moves First ?

In this game, the order in which the attack and transfer moves are played per round can have a big impact on the game. For placing armies this is not the case, so player 1 will always place all his armies, then player 2. How are the attack/transfer moves ordered then? Well they are ordered in the same way the bot returns them to the engine. The engine will then randomly decide which player will execute his move first.

For example if the engine chooses bot1 to move first in the first and second move and bot2 to move first in the third move, the ordering will look like this:

move1 bot1 move1 bot2 move2 bot1 move2 bot2 move3 bot2 move3 bot1

Winning

If one bot destroys all armies of the other bot, it has won. If the maximum amount of rounds has been reached and there is no winner yet, the game is a draw. Because maps can vary in size, the length of the game can also vary. So currently the maximum amount of rounds is the number of regions times 2.5. This value is sent to your bot at the start of the game.

Technical details

The timeout settings are the same as the Heads Up Omaha: You get an initial maximally filled timebank of 10 seconds and each time a move is requested 500ms will be added to your timebank. The engine will give the amount of time left in your timebank each time it asks your bot for a move. If your bot does not respond before the timeout, no moves will be done and if it doesn't respond twice, your bot will be shut down. Bots that do not output anything at all, a.k.a. fail their input test, can not be placed in the ranked matches.

When uploading your bot, you can upload a .zip , .rar or .tar.gz file. Make sure you either put the source files directly in the compressed folder, or in their respective class folders. So do not put a folder with the source files in the compressed folder, or your bot won't compile.

For JavaScript, Perl, and PHP bots: include __main__ in a comment in your main file, so our compiler can recognize it.

Game viewer hotkeys

hotkeys-headsupomaha