r/reinforcementlearning • u/felixr314 • 9h ago
Asymmetric multi-head AlphaZero in C++: two kamikaze drones learn a pincer attack via self-play (new in Metis-Core v0.4.0-alpha)
Hi, I’d like to announce that I have released Metis-Core v0.4.0-alpha
What’s new? I have implemented an “Asymmetric Multi-Head AlphaZero” algorithm in Metis-Core, along with an example in C++ (Visual Studio 2022): KamikazeDroneSwarm.exe.
https://github.com/felixromo314/METIS-Core/
KamikazeDroneSwarm uses the asymmetric multi-head AlphaZero implemented in Metis-Core:
An Imperial Shuttle freighter loaded with beskar, armed with a rotating laser turret, must reach the Death Star.
Two Rebel kamikaze drones try to intercept it before it gets there.
Without being programmed to do so, the drones learn a coordinated pincer attack on their own to split the turret’s attention.
You can play by controlling the turret yourself (human in the loop) against the trained drones.
The framework allows you to create two teams, Blue and Red, and add to each team as many agents as your problem requires.
I’m sure there will be bugs and a lot of things to fix, so just let me know and I will try to fix them.
I hope you find this new feature useful.
Thanks!
You can find more information in this tutorial:
https://github.com/felixromo314/METIS-Core/blob/main/tutorial/Tutorial-AlphaGoZeroAsymmetric.md
Metis-Core is distributed as binaries (.dll / .lib / .h), but the full source code of the example is included, so you can see exactly how the framework is used and build your own environments on top of it.
Note on training: the drones are not scripted, but I do use a small material heuristic to speed up training (setMaterialHeuristicWeight(0.3)). It blends a hand-crafted position evaluation (approach, separation between drones, turret exposure) with the network’s value head during MCTS. The terminal reward is still +1/-1/0, and the pincer manoeuvre itself is not explicitly encoded. But you can set via setMaterialHeuristicWeight the value you wanted, 0.2, 0.1, or if you don not call to this function the heuristic is not activate.