https://github.com/axetion/dota2_nn
This is the start of a crude deep learning bot using Torch I've been working on. Unlike most of the previous ML bots here, this is purely supervised learning, which means that a set of examples is constructed ahead of time for the models to learn from as opposed to slowly learning in-game (unsupervised). These examples are made by extracting basic information on actions made by the top 3 players on the winning team (currently measured by kills, I intend to use fantasy Dota points instead as soon as I figure out how to extract them) from replays using Dotabuff's excellent Manta replay parser (written in Go) along with some nasty data munging of the bowels of the Source engine.
Currently installation is not very streamlined (I intend to package up the server that handles the Torch requests into a single executable as soon as the bots are ready for people to actually play against):
- Install Torch
- Install dependencies for the server:
- Extract repo to <steam path>/steamapps/common/dota 2 beta/game/dota/scripts/vscripts/
- Start the server with
before starting a match
I haven't included any pre-trained models with this, since currently only moving and attacking is working (no purchasing items yet) and I don't have the replays to make good models (I tried with 40 replays, which sounds like a lot until you realize that that accounts to 1-2 matches per hero at most which is very little to generalize from) -- the best way people can contribute is by getting me more replays, since you can only download 100 replays per 24 hours. To train your own models:
- Get Go
- Clone repo (if you're doing it from the command line, be sure to use the --recursive option)
- If you're on Windows, run set "GOPATH=%cd%". Otherwise (OS X, Linux) run export GOPATH=`pwd`
- Build the corpora from the replays:
- Train models:
- Move ability_data.lua to <steam path>/steamapps/common/dota 2 beta/game/dota/scripts/vscripts/bots
- Move the data folder to <steam path>/steamapps/common/dota 2 beta/game/dota/scripts/vscripts/server
This is still very much a WIP, but I wanted to get it out a little early to demonstrate the concept and get some feedback
This is the start of a crude deep learning bot using Torch I've been working on. Unlike most of the previous ML bots here, this is purely supervised learning, which means that a set of examples is constructed ahead of time for the models to learn from as opposed to slowly learning in-game (unsupervised). These examples are made by extracting basic information on actions made by the top 3 players on the winning team (currently measured by kills, I intend to use fantasy Dota points instead as soon as I figure out how to extract them) from replays using Dotabuff's excellent Manta replay parser (written in Go) along with some nasty data munging of the bowels of the Source engine.
Currently installation is not very streamlined (I intend to package up the server that handles the Torch requests into a single executable as soon as the bots are ready for people to actually play against):
- Install Torch
- Install dependencies for the server:
Code:
luarocks install luajson luarocks install uuid luarocks install https://raw.githubusercontent.com/benglard/waffle/master/waffle-scm-1.rockspec
- Start the server with
Code:
th <steam path>/steamapps/common/dota\ 2\ beta/game/dota/scripts/vscripts/server/server.lua
I haven't included any pre-trained models with this, since currently only moving and attacking is working (no purchasing items yet) and I don't have the replays to make good models (I tried with 40 replays, which sounds like a lot until you realize that that accounts to 1-2 matches per hero at most which is very little to generalize from) -- the best way people can contribute is by getting me more replays, since you can only download 100 replays per 24 hours. To train your own models:
- Get Go
- Clone repo (if you're doing it from the command line, be sure to use the --recursive option)
- If you're on Windows, run set "GOPATH=%cd%". Otherwise (OS X, Linux) run export GOPATH=`pwd`
- Build the corpora from the replays:
Code:
go run corpus_builder.go <replay files...>
Code:
th trainer.lua
- Move the data folder to <steam path>/steamapps/common/dota 2 beta/game/dota/scripts/vscripts/server
This is still very much a WIP, but I wanted to get it out a little early to demonstrate the concept and get some feedback

Comment