r/MachineLearning • u/ToraxXx • Oct 18 '26
Project Beating Warcraft III’s insane AI with self-play reinforcement learning on one desktop [P]
https://warlock.ai/blog/warcraftsim-1/
305
Upvotes
r/MachineLearning • u/ToraxXx • Oct 18 '26
59
u/FernandoMM1220 Oct 18 '26
this looks incredibly well made and you used a fairly small model too. congrats.
20
u/Taenk Oct 18 '26
Oh wow this is is a solid writeup thank you for sharing. Do you think it would be possible to turn actual gameplay footage by humans into a format that you could use for SFT?
14
u/ricetoseeyu Oct 18 '26
lol the small paragraph where you briefly mention the “other experiments on reward shaping…” that right is probably a lot of hours of work 😂.
Your environment sampling throughout is actually pretty impressive for a single machine without headless servers. There’s also another world where people look into world models for experience generation without direct simulation which means GPU acceleration on world model state generation instead of tied to the game itself (eg Dreamer on Minecraft).
Would also love to follow up and see how you’re approaching diversity in self play. Exploiters are useful if you know the exploits ahead of time, or have time to script them out, but hard to scale practically. Maybe replay harvesting from existing WC3 games and increase behavior cloning data source?
3
u/garma87 Oct 19 '26 edited Oct 19 '26
Very interesting. Did I get correctly that you basically pitted the wow ai against itself to learn the first steps?
If so would you say there are obvious deviations from how a player would play either at the beginning or later in the training process?
I also wonder whether it would help to use a general purpose model to give it a head start somehow. I’m not sure how that would work but I wonder if you let Claude do what you’re doing how well would it do?
2
u/Kamimashita Oct 19 '26
Awesome write up! Very cool seeing what you built and how you improved your model. How good did it end up being at micro? Does it do stuff like pull back a hurt unit that's being focused then move it back in to attack again once the focus is gone, etc?
4
u/Timabcd Oct 18 '26
Very cool, was a fun read
4
u/tempetesuranorak Oct 19 '26
One opportunity that I've always been curious about with this kind of research is that it allows you to test how important is apm to skill. Computers have two potential advantages: better speed, and better decisions, and it's really the second one that is the more interesting. But an interesting kind of experiment is to train AIs at varying apm budgets and see how skill scales with apm. Then players would be able to gauge things like, what's the maximum possible skill level I could attain if my apm is fixed but I just make better decisions.
1
u/alexdark1123 Oct 19 '26
This is amazing man. You are my idol now, I was trying to do something similar with other games but had a hard time with complexity. Mind sharing more in detail snippets of code? Or a repo I could learn from?
1
u/FirelandsValley Oct 18 '26
Really cool project! I actually was working on something similar around 8 years ago, but abandoned it because I didn't have enough compute and time. If you need any help or have ideas, I'd love to work on it. I might check out the repo :) Plus I have a RTX 4090 now.
1
u/Resident-Apricot3212 17d ago
Thats a cool project. Did you try steering the learner to a highly aggressive early harassment play style? Insane AI derives its difficulty mostly from its double resource gain cheat. Games against insane AI opponents can be reliably won by hurting the economic base early on and not allowing the AI to leverage the resource cheat.
1
u/Anime_Expert_2026 Oct 21 '26
Even Insane AI can beat Insane AI. And mind you, this is a bot from 2002
0
u/paca-vaca Oct 20 '26
It's kinda cool. But to be honest, native bots in wc3 are not that bright and have no real world metas in them. They mostly hard for newbies because insane mode gets double resources but with proper meta and micro it actually works against them, as you get a chance to level-up heroes faster and heroes in wc3 is where a real power reside. Not sure if bots got clever, I stopped playing before Reforged.
When I practiced intensively, I used to play against 2 insane bots in a team and win. And it's wasn't something special comparable to what pro players could do.
P.S. wc3 brings some deep nostalgia and good time memories!
0
u/Hyperion141 Oct 19 '26
Very cool! Nice job! I don’t play Warcraft, but I play league, can someone explain how good was the AI in league ranks?
-9
u/mayabuildsai Oct 18 '26
the eval design is the part i'd steal. same matchups and races for parent and child, test games it never learns from. where i'd push is reading the smaller steps off a few hundred games each. at around 60% with ~300 games a side, the standard error on the difference between two runs is about 4 points, so 59 to 62 from the build-spot search is inside the noise. 49 to 59 from the discount change is clearly outside it.
that matters more than usual because the process is greedy. every experiment branches from the current best, and a lot of experiments didn't help. pick the winner out of several noisy runs and the winner's number is biased up, so some of the "no difference" changes may have been judged against an inflated baseline. re-running the final agent and two or three ancestors on the same 1,500 games you use for the dashboard would show which steps were real.
the one-strategy result is what i'd expect from testing against a single scripted opponent too. the insane ai answers a rush the same way every time, so beating it 9 in 10 with a rush says a lot about that ai and less about warcraft. curious whether the human replay build orders changed the long-game losses at all, or mostly the rush timing.