A new Dota 2 Bot API is in the works. Once completed, the project would allow for anybody to create their own bots and also improve the quality, options and difficulty of the ones that are currently available. The procedure is developed by a student at Maastricht University and is expected to be launched in the near future.
If you’ve played Dota 2 long enough, you’ll know that the bots offer limited training development or challenges. Practice can feel futile and often frustrating, but rarely are pubs any more rewarding of a training ground.
Martin Rooijakcers, a 26-year-old computer science student at Maastricht University, is looking to change that. In his final year of the AI program, Martin is in the process of creating a Dota 2 Bot API which will allow programmers to create better Dota 2 bots.
Inspired by a consistent outcry on Reddit for a Dota 2 Bot API and currently wrapping up his Master Thesis on a Brood War bot for StarCraft, Martin rolled up his sleeves.
While developing my Brood War bot, I was already wondering if developing bots was also possible for other esports titles. In StarCraft 2, Blizzard explicitly states to one of the Brood War AI people that they will stop any attempt to create such a bot; LOL was out of the question as well. But Dota 2 had LAN mode, so that one was an option that I was considering.
Martin is not just creating a bot, but also an API to allow others to create bots. The process is not an easy one and the Dutch student realized there were several drawbacks and limitations to the two methods that were already available.
One method is based entirely on using the LUA code (lightweight multi-paradigm programming language designed primarily for embedded systems and clients). However, LUA has some limitations: the File Input/Output and multi-threading are either disabled or not included in the LUA engine that Dota 2 uses. File Input/Output is used to store and retrieve a lot of information. Multi-threading enables usage of all the CPU available in a computer. Essentially, by using the LUA code method, the developer cannot store all or as much of the info needed to create a more complex bot and is left with limited amount of CPU at his disposal. Therefore, the method is far from being efficient.
With the LUA code being a little bit too restrictive to write a bot for a complex game like Dota 2, Martin looked to the second method perfected by Tobias Mahlmann. The method is based on a Maeven project for Java. This approach has a major drawback: since the server is integrated in the project, the procedure can only be executed with the Java programming language. Since the server is integrated, it has less overhead, but without knowledge or a detailed tutorial, the program is far from accessible.
Martin set out to develop a different framework/architecture. Instead of sending the Dota 2 data directly to a bot, it is sent to a server running on a computer – usually the one that hosts the game. Only one person has to run the bot framework, then others can join without having to do anything. From that server, the data is sent to a bot. The step by step tutorial proves the concept. In order to run to run the project, Dota 2 players would have to download XAMPP for the server and a bot written for that framework, then simply double click them both. Simple enough.
Plans for the Dota 2 Bot API
For now, in regards to the bot framework, Martin Rooijakcers has the following things planned:
- Bots available for both Dire and Radiant. Players can add as many bots to both sides as you want and even have a bot-only tournament. With this framework, it is even possible to have a 5v5 and let a bot take over in case of afk
- Works on all standard Dota maps (the winter map, for example)
- The bot controller can draft/pick all the heroes, unlike the default practice bots which can only play a limited hero pool
- Allows players to set the reaction time of the bots
- More options to control bots. For example, they can respond to chat messages and change their role to support, jungler or carry on request
- Customizable item builds, including the ability to set conditions for items to be bought. For example: only build an orchid if there is a specific hero like Invoker on the enemy team
- Lane options: players can tell each bot which lane it should use in the lane stage
- Players can set the farming priority for each hero (1, 2, 3, 4, 5 position)
- Players can request wards (observer and sentry) to be laid set down in specific places
Dota 2 Bot API crowdfunding
So far, the process has been lengthy and it has required help from various other people. Martin Rooijakcers is getting close to perfecting the Dota 2 Bot API. There is still some work to be done, and that takes money, resources and some extra hands.
I want to say thanks to the people from #Dota2Modding on irc.gamesurge.net for helping me out.
– Martin Rooijakcers
A crowdfunding request has been set up to help facilitate the process and will be launched October 22nd. The money collected is earmarked for the following:
- Adding missing features from the Dota 2 AI framework made by Tobias Mahlmann
- Making some other small adjustments needed due to the fact that the apache server will not be directly used to control the bot
- Writing the php code for the apache server
- Creating an example bot to show the functionality of the API
Most of the work has already been done. Now it is a matter of adding bits and pieces from the LUA framework and from the Tobias Mahlmann implementation, and then making sure the entire project runs smoothly with an apache server. Once that is completed, Martin Rooijakcers needs to write the php code to allow any bot to interact with the apache server. Martin estimates that the finalized project will be rolled out approximately one month after the crowdfunding campaign ends. The cost is set at $1,000.