Skip to content

Game jam entry for Crete Summer School 2018: self-play agents trained with Reinforcement Learning Algorithm

Notifications You must be signed in to change notification settings

caolele/Glaidaitors

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glaidaitors

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.

Avoiding Each Other

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:

Watch the video

Chasing Each Other

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)

Watch the video

About

Game jam entry for Crete Summer School 2018: self-play agents trained with Reinforcement Learning Algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 63.2%
  • Python 35.4%
  • Jupyter Notebook 1.4%