<< Back to Programming Forum   Search

Posts 1 - 5 of 5   
New bot in town - competitive multiattack: 4/29/2020 23:12:22


Norman 
Level 58
Report
Hi guys,

as you might know, I wrote a WarLight bot a couple of years ago. Thinking about standard competitive WarLight play I always hit a wall when thinking about how I could formulate the game well enough in order for a bot to play at a great human level. However as for multiattack I had a certain idea that it's way easier to come up with well defined heuristics in order to make a bot play really strong.

So that's why a few months ago I put my thoughts into action and wrote a new bot with very limited functionality:
- Multiattack only
- The bot can only play smart, he isn't meant for picking
- No fog
- Map size up to RoR. The bot uses quite extensive search algorithms which can take about 3 minutes to compute on RoR however it's way faster on smaller maps.

The bot code: https://github.com/Norman1/Multiattack-Bot

When gathering sample games I had to put some open seat prerequisites since else the bot was just steamrolling the opponents without a nice game to watch:

Here some sample games (only losses):
- vs NeRo from Masters: https://www.warzone.com/MultiPlayer?GameID=21027070
- vs AI from Lynx: https://www.warzone.com/MultiPlayer?GameID=21005328
- again vs AI from Lynx: https://www.warzone.com/MultiPlayer?GameID=21005060

Currently I'm not feeling the fire in order to keep updating the bot. Maybe some coders are interested in it. The bot is way simpler than the old bot Wunderwaffe. Or maybe some of you guys want to play against the bot.

Edited 4/30/2020 07:04:00
New bot in town - competitive multiattack: 4/29/2020 23:21:32


Farah♦ 
Level 60
Report
That's actually rather impressive! Would you be able to teach it how to delay? For example: https://www.warzone.com/MultiPlayer?GameID=21005328
On turn 10 it's taken back Aegyptus successfully. But then it attacks Kreta next turn really early, making him not keep the bonus. It would be awesome to see it take these kinds of risks into account.
Other than that, really nice coding
New bot in town - competitive multiattack: 4/29/2020 23:24:34


Balthromaw
Level 55
Report
I can see the code for it is very simple.
Only around thousand lines of the code.
New bot in town - competitive multiattack: 4/29/2020 23:27:53


Annoying_Child
Level 46
Report
what language is it written in? I haven't coded a warzone bot before but have dabbled in creating AI for my own strategy game (which i eventually gave up on)
New bot in town - competitive multiattack: 4/30/2020 06:56:23


Norman 
Level 58
Report
@Farah:
That was an older version of the bot which played against AI. The new version would move those 2 armies in Illyricum around before any moves which the both thinks should happen late.

@Balthoromaw:
Yes, I had a clear idea how multiattack can get formulated. The bot basically works like this:

- The bot knows about 2 "tasks" namely completing a bonus and breaking a bonus.

- The bot calculates then for each task (breaking or taking a bonus) the necessary moves in order to fulfill it. More precisely the bot calculates the necessary moves for each combination of bonuses on the map. Here is where the heavy calculations are happening and due to performance reasons the bot has some limitations on how deep to search.

- Each of the calculated combination of tasks lead to a certain board outcome at the end of the turn. The bot evaluates each of the outcomes and picks the one which gives it the highest value. Here are the criteria:
-- Own income - opponent income (main criteria)
-- Own bonuses close to the opponent get a malus. Else the bot might expand right next to the opponent instead of taking the bonus far away.
-- Own armies - opponent armies. This helps the bot to take more efficient bonuses where it loses less armies taking them.


@Annoying_Child:
It's written in C#. You can create your own fork of mine or Fizzers github repository. Apart from my WarLight bots I have no experience in C# however getting up and running wasn't too hard and Fizzers guide works perfectly: https://www.warzone.com/blog/index.php/2016/02/the-warlight-ai-goes-open-source/
Posts 1 - 5 of 5