Neural Network AI

A small prototype using using Unity’s Neural network libraries and integrations, exploring the possibility of AI training as a game mechanic.

The main action of the game is to knock the opponent off the platform.

The idea was to allow players to design fighters with basic shapes, and what kind of shapes to train against, before pitting their fighter in online tournaments.

The sped up, multi-generational training dojo for the capsule shaped fighters. The debug lines indicate impact velocity.

The actions for an agent are:

  • Rotate

  • Move Forward

  • Leap-Attack Charge.

Getting hit over a certain magnitude stuns both for a split second, and leaping gives you a mass bonus, allowing a good hit to knock the other one back when they otherwise wouldnt.

Their senses were simplified to:

  • X and Z Position.

  • Facing relative to other fighter. (Dot Product)

  • Other fighter’s facing relative to you (Dot Product),

  • Other Fighter’s Charge meter.

  • Distance to other Fighter.

I found simplifying the controls and senses yielded better results quicker.

After an hour of training, you could see the agents going through several strategic stages, before settling on something that resembled an actual fight.

The yellow agent is slightly better trained in this video, and will attempt dodging maneuvers as well as successful attacks.

Next Steps:

Building in the interface for customizing the warriors was going to be a large task, so the next logical step was to build a toolset that could just run natively in the Unit Editor, taking advantage of its toolset, and providing tools and processes to upload.