Game play shows the way
AI Flight Race

Game play shows the way

So besides home-schooling with Arthur (aged 7), AI Flight Race is a fun project that's kept me busy the last few weeks... and away from the Virtual Regatta Inshore racing with fellow Tamesis Club sailors :(

AI Flight Race is an online game (desktop/laptop only sorry!) which invites you to pilot a plane using only your keyboard around a race circuit and race against other aircraft controlled by Machine Learning agents.

The game itself was created from an amazing tutorial by Adam Kelly of Immersive Limits that teaches you to build a video game quite literally from the ground up. Starting with the construction of 3D assets in Blendr; the desert scene, different shaped rocks and a single-seater acrobatic aeroplane. Then inside the Unity Editor, plugging the 3D assets together and applying all sorts of pre-built Unity features to create an actual game environment and launch menu. From there you write a series of custom C# scripts in Visual Studio to manage the game and to control the aircraft's flying behaviour. Before going back into Unity Editor to build, test and eventually deploy the game to a webpage which I can share with you all to try out too.

One of the most interesting pieces of the tutorial was setting up and training the competitor aircraft to fly and race around the desert circuit using Unity's ML-Agents package for training Machine Learning agents. Over the course of several iterations (~30 minutes on my Mac-Mini; seconds no-doubt if you are training in the cloud with multiple GPUs); the agents went from crashing the aircraft instantly to being able to fly around the circuit at high speed without crashing and flying around the race circuit way faster than any human game player is ever likely to achieve. You can try this out yourself, start with the default game difficulty setting (Level="Easy") and the other ML-controlled planes are already pretty good. Then change that difficulty setting to Level="Difficult" and you'll give up pretty quick if you're trying to actually catch the other planes.

It's been a super-fun project and got me thinking again about some of the simulations you could build pretty fast on real-world data using Machine Learning, 3D assets, maps and real-time gaming technologies to explore multiple scenarios and present decision makers (be they customers or business leaders) with options in really new and compelling ways. All you need is access to a small team of ace 3D artists, C# programmers and ML engineers and the inklings of a concept....

Anyway, that's a taster of what I've been up to and if you want to try out yourself then here's the link https://play.unity.com/mg/other/ai-flight-race... Do let me know in the Comments below or by LI direct message what you think about the game or if you have your own ideas for a simulation.

Keyboard control keys:

  • A or J >> Turn Left * 
  • D or L >> Turn Right *
  • W or I >> Nose Down *
  • S or K >> Nose Up *
  • Spacebar >> Speed Booster 
  • Escape >> Pause/Quit Game

* Or use the Arrow keys

#unitytechnologies, #machinelearning, #simulation, #gameplay

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics