I haven't participated in this thread at all while the competition was going on, but now that everything's locked in I'd like to join in on the fun.
First off, I hope everyone had a good time programming their bots (even through all those long hours debugging), and that we all have some good games! It's easy to watch your bot lose and blame it on yourself for not changing the logic up or getting rid of that one bug, but we should really be congratulating our opponents for doing an excellent job on their own bot. So good job everyone!
Now to share my AI logic. I still have a lot to learn regarding computer science, I learned it as a hobby a few years ago, so my code is terribly organized. That said, I think the main ideas behind it are valid, so I'll be glad to hear everyone's criticism on it.
-The picking strategy is quite simple, chosen from smallest bonus up, further organized by bonus safety (ways in) and regions are chosen from distance to other bonuses.
-Each round starts with predicting the enemies income, which works only if they deployed more than the previous known income a previous turn. It then assigns the smallest bonus that would fit the income shown to the enemy, if it's possible for them to have it.
-Enemy probabilities are then calculated. This includes lost picks if it's round 1, otherwise just some basic expansion predictions which could be improved quite a bit.
-Bonus goals are then calculated. This is the defining feature of my bot, it works based on 4 main bonus goals, which include Survival (if one's about to be eliminated), Capture (if it's a good candidate for capture), Break (if an opponent has it and it needs to be broken), and Elimination (if it's possible for an enemy to be eliminated completely from a bonus). Each of these are easier to calculate then you'd think. At the moment the calculations look like this:
bonus.Goals.Capture = bonus.ArmiesReward * (1 - enemyNearby) /
(territoriesToCapture - nearbyArmies / 30.0);
SurviveRating = Minimum Ratio Of((mostSurroundingArmies + state.PredictedEnemyIncome) * 0.6) /
(playerRegion.Armies * 0.7);)
bonus.Goals.EnemyElimination = (playerArmies + state.StartingArmies) * 0.6 /
totalEnemyArmies;
BreakRating = 1 if enemyIsVisible, else it's 1*enemyProb of all territories.
All of these are of course conditional on if my opponent and I are in the bonus being analyzed.
-Next comes the DeployArmies code, this is easily the most massive section of the program, at over 700 lines. That's not bragging, I'm rather disappointed by how much typing I had to do to accomplish what I wanted, but it is what it is.
-To skim over the details, the bot looks over the bonus goals and makes objectives based off of them of the different types (survival, break, etc.), doing its best to sort from most important to least important.
-It then runs a loop over the objectives, deploying the minimum armies necessary to accomplish each objective, with different logic for each type.
-If at the end there are some leftover armies, it deploys them evenly to all deployment orders made (with some backup logic in case no objectives were made).
-Then the AttackTransfer orders are made, this section looks at all the remaining useful territories and decides what to do with their remaining useful armies (transfer, add to previous attacks, etc.). When the attacks are made the Priority is included (important, delay, safe, unsafe), but this could've used some more work as no delay orders are generated if they've gotten to the most useful territory. Some transfers are odd as well.
And that's that. Sorry about the wall of text if you weren't interested in this. And I wish everyone the best of luck for the remainder of the challenge! I don't expect my bot to do too great, but I might get around that 1 euro mark. :) And I'll leave with one recent game I liked against ps, whose move into North America seemed costly but eventually won out, and had some nice anti-AI maneuvers (on purpose?) in South America. Also, I enjoyed watching my AI run away in Africa after I had lost. gg ps!
http://theaigames.com/competitions/warlight-ai-challenge/games/5383a22e4b5ab2088e1b9e48