Diplomacy has been a popular board game for over 60 years, pitting seven players against each other as they vie for control of Europe through statecraft and subterfuge, and with success determined entirely by skill rather than luck. Inspired by his father’s passion for the game, in 2005 Kestas Kuliukas built webDiplomacy, one of the first websites to enables users to play Diplomacy online.
The digital format eliminated one of the most significant obstacles to enjoying the game – the need to bring a large number of people together to play in person. As a result, the site quickly gained immense traction, which it has maintained to this day. However, online play also introduced its own challenges.
“It’s an inevitable issue with internet games,” explains Kestas Kuliukas. “When you’re not playing face-to-face with friends, there’s no obligation to keep playing if the match isn’t going well for you. Especially in low-level Diplomacy games, people would often join multiple sessions and simply drop out of the ones that weren’t looking favorable.”
Abandoning a game naturally made the experience far less enjoyable for the remaining players. And to make matters worse, since the culprits would frequently play on multiple fresh accounts, the trend was disproportionally affecting new players and turning them away from the game.
webDiplomacy needed a way to mitigate the impact of this poor sportsmanship and ensure honest players could continue to enjoy the game.
The answer to the leaver problem was obvious: an AI bot that could take over for missing players. But creating an AI capable of playing a game as complex as Diplomacy was much easier said than done.
“We have a vast amount of gameplay data that we were offering to anybody that was interested in tackling the problem,” continues Kestas Kuliukas. “A few people approached us, but no-one was able to produce a functioning AI model. At least, not until we met Attrava.”
Utilizing webDiplomacy’s data, Attrava built a dataset of more than 150,000 games and developed a deep learning model that can seamlessly take the place of human players in “no-press” Diplomacy games – a popular version of the game where there is no direct messaging between players.
DipNet models the board state as a graph, with each province linked to its neighbors. In this way, it can see where units are located on the board, and assigns values to them which enable it to compute the move that a human player would be most likely to make.
The bot requests board states and issues orders via a custom API. Built with a containerized infrastructure, the API integrates into the existing website, requiring no additional work on webDiplomacy’s end.
Kestas Kuliukas adds: “Attrava handled everything and drove the entire project. Getting the integrations right could have been a pain, but Attrava took the bull by the horns and added the AI module directly to our server.”
It’s been just over a year since DipNet was implemented, and the bot has been very busy – participating in over 56,000 games to date.
Now that players no longer have to deal with leavers ruining their no-press games, the overall user experience has improved substantially. What’s more, it’s now possible to play in full bot games. For new players, this option offers a stress-free way to learn the ropes. And veterans love playing with the bleeding edge technology, to the extent that there have even been bot tournaments.
Looking beyond the immediate impact on gameplay, the project has also unlocked more far-reaching benefits for webDiplomacy.
Kestas Kuliukas confirms: “One of the most tangible results of our work with Attrava is that the site is now being taken much more seriously. I always hoped that our data would be useful for something, and now researchers are taking a real interest. I can’t reveal too much about the ongoing work, but it’s hugely beneficial for the website.”
Since 2005, many other Diplomacy websites have emerged (often as branches of webDiplomacy’s own open-source code). But today, no other site gives users the chance to play alongside a fully-fledged Diplomacy AI.
“It’s hard to get your own Attrava,” concludes Kestas Kuliukas. “They’ve been great to work with. They have a great technical understanding and there’s never been a question without an answer.”