Introduction
After seeing the large desire for a Dota 2 Bot API on reddit, I decided to try and create a Bot API such that everyone would be able to create a Dota 2 Bot just like people can with Brood War and the BWAPI. Since the LUA code running in Dota 2 doesn't allow for file I/O and multi-threading, it is unsuited for making complex bots.
As documented on my liquiddota blog , I have tried several other methods until I found out about the Dota 2 AI framework by Tobias Mahlmann.
But as mentioned on the github page, this framework is not finished yet. It is also only available for the Java programming language. As noted on the instructions : "you need to be familiar with Java programming and building an application using maven".
The proposal
So instead of using Java with maven, I decided to use an Apache/php server to act as a middleman. This server will communicate between the LUA code and the code that does the decision making.
This way you will only have to run the installer of XAMPP which handles the apache/php , copy some .php files and double click on the bot run script to play versus custom made bots. Thus eliminating the need to know any programming at all.
You can try out the proof of concept here. The installation instructions will be mostly the smae for the final version.
Besides the Bot API itself, I will also be creating a fully customizable bot with the API. This Practice bot will allow you to customize the hero compositions of the bots, the farm priority and which lane (or jungle) the bots are (for both friendly and enemy bots). You can find a list of all the planned features for both the API framework and the Practice bots here.
How will the funding be spend
The funding will be used for:
- Adding missing features from the Dota 2 AI framework made by Tobias Mahlmann.
- Making some other small adjustments due to the fact that the apache server will not be directly used to control the bot. This is mainly to allow other programming languages to be used for writing a Dota 2 bot as well.
- Writing the php code for the apache server.
- Creating a Practice bot with the API so that people can test certain strategies versus bots, which would otherwise require 9 other players to do what you tell them to. The planned features of this bot can be found here. This bot will be written in C++, but the API can support any programming language.
All these parts will be available open source.
Risks & Challenges
The main risk to this project is Valve deciding that HTTP requests are no longer allowed in the LUA code. The AI framework relies on this, since this is the only way the LUA code can communicate with an outside process.
If this happens then the only way to make custom bots would be a reverse engineering project like the BWAPI (which would mean you would only be able to play it offline because of VAC), or using image processing to determine the game state (very comutationally expensive)
However since quite some mods rely on HTTP request to store persistent data, I don't see Valve removing this function anytime soon.
The Developer
I am an AI student currently wrapping up my thesis on my StarCraft bot "LetaBot". It currently plays around the C-level.
You can contact me via email at:
mlm.rooijackers () student.maastrichtuniversity.nl
or send me a pm on my LiquidDota/TeamLiquid account:
http://www.liquiddota.com/forum/profile.php?use...
or send me a pm on my reddit account:
https://www.reddit.com/user/LetaBot/
Stretch Goals
All the money left after creating the API will be used to create a better Dota 2 bot using the API. You can see all the planned features
here.