A multi-agent environment using Unity ML-Agents Toolkit where two agents compete in a 1vs1 tank fight game.
STATUS: Published, will have some minor updates.
- Two agents compete in a 1 vs 1 tank fight game.
- The goal is to kill the opponent team while avoid being killed.
- Vector Observation space:
- Bool canShoot (you can only shoot a snowball every 2 seconds).
- Uses a One-Hot Grid Sensor.
- (1 - accumulated time penalty): when you kill your opponent.
- (-1) When you're killed.
- 1️⃣ Download the ml-agents Release 12 NOT ABOVE THIS VERSION (because we use a modified version of the gridsensor that's compatible with only MLAgents Extensions 0.0.1).
- 2️⃣ Clone this Tank repository.
- 3️⃣ Put the
Tank.yaml
file to your ML-Agents folder into.\config\ppo
.
- 4️ Open the Unity Project
Project
in ML-Agents repo. - 5️ Download the package here
- 6️⃣ Import package > Custom package
Tank.unitypackage
file. - Enable the built in package 'Particle System' and 'Audio' in the Package Manager if you have some Audio and Particle errors.
2 scenes:
Train_NonRandomGeneration
: Always the same environment (no random moving of the assets).Train_RandomGeneration
: At each episode, the assets (trees, buildings) are placed randomly. 💡: A good idea, when you train, is to uncheck mesh render for all your assets, this way you can save computational power.
In scenes open Play scene.
You can also download the game on Itch.io.
- Use MA-POCA, Multi Agent Posthumous Credit Assignment (a technique for cooperative behavior).