by jiggawatts · 3y ago · 0 comments
Before the game starts each of the ten players gets to pick a distinct hero for themselves out of a pool of about 120 choices. This is over 10^20 distinct combinations! Each hero has some unique capabilities that combo with allies or counter enemy heroes.
I tried to train a “hero recommender” based on tens of millions of games.
It turned out that this is obscenely difficult because even the best AI training algorithms struggle with such highly noisy labels. A good hero combo might shift win rates by some positive percentage but have a single sample data point, which is a loss because of one stupid kid in the team throwing the game.
You also can’t naively simplify the problem into 2-hero or 3-hero combinations because this misses the “total team composition” metrics.
I found some research papers that were just a few months old at the time which covered this corner of the AI training space. Their conclusion were: “We don’t know either but it’s an interesting problem!”
The problem is that it has been highly throttled, throwing 429 errors after just a few dozen calls. When I looked at it before it was "soft" throttled and would return data at a pretty decent rate. If I remember correctly I got something like 80 million game results downloaded in about a week.
You can get 100 matches at a time[1] via this API: https://wiki.teamfortress.com/wiki/WebAPI/GetMatchHistoryByS...
The "ID" is the game ID, which is 570 for Dota 2. Hence the actual API endpoint is:
GET https://api.steampowered.com/IDOTA2Match_570/GetMatchHistoryBySequenceNum/v1
[1] It would be ever so nice if Steam provided daily batches in gzip files. That would be thousands of times cheaper for them to host, and much more useful for AI researchers.