Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Showcase ML Agents training of an asymmetric adversarial simulation

Discussion in 'ML-Agents' started by ChillX, Feb 4, 2022.


Is this type of post useful to anyone ?

  1. Yes it is useful

  2. No it is a waste of time and space

    0 vote(s)
  1. ChillX


    Jun 16, 2016
    Note: This post is becoming far too long for a forum post. So I moved it to an article on Medium.Com instead.

    Note: I'm developing this to be eventually launched as a game. Just sharing the ML agents training experience in case it might help someone else trying a similar scenario.

    Disclaimer: There are probably a million good ways to do this. I just chose one after testing a few over the last few months.

    The article is in 4 parts and I'm publishing it as the project evolves.

    Part 1:

    Part 2:

    Part 3:

    Screenshot of game level 1


    Gabe Rules:

    The Green Cube is ML Agents powered and represents the player.
    The Red Cube is ML Agents powered and represents the enemy game AI
    The Blue Cube is the target kind of like the football in soccer
    The Purple Square is checkpoint kind of like the goal in soccer.
    The Yellow Cubes are blockers which can only be moved by the green cube "player" and not by the red cube "enemy"

    The objective of the game is for the green cube "player" to push the blue cube "target" to the purple square "checkpoint". The red cube "enemy" must prevent that by pushing the blue cube "target" away from the purple square "checkpoint"
    The yellow blocker cubes and the target cube cannot be moved right next to the edge of the game map. Otherwise corners create a stalemate where the cube cannot be moved out again.
    The number of targets / checkpoints / blockers is variable and configurable via config file parameters
    Reward components can also be turned on and off via config file parameters

    The rules of the game are stacked in favor of the player.

    Screenshot of all 5 game levels:

    Last edited: Feb 12, 2022