Game jam entry for Crete Summer School 2018
This is the result of a team effort within one day, using Unity ML-Agents, which can be followed to build our game.
It contains a 3D scene with two agents (stiffly) fighting/avoiding each other. When the weapon hits the other's body, the opponent will be pushed backward for a certain distance; when any party falls off the battle-field, that party lose. Any party loses will trigger a random initialization of both agents.
Actions of agents at any time t:
- rotate a certain degree
- go forward
Two experimental scenarios are tested.
Any more step of survival will give +0.005 reward; falling off the arena will give -1 reward; collision will give -1 reward. One shared brain is trained using PPO. The trained model is in folder python/model_avoid
. The video effect as follows:
Same as the previous scenarios, yet added two rewards:
- obtain -1 reward getting hit by opponent's weapon;
- obtain +1 reward hitting opponent by weapon.
Train one PPO brain for each agent (folder Assets/ML-Agents/TFModels
); the behavior becomes: (click to watch video)