Devlog 1: Making a Half-Functional AI


Hello!

You'd think the AI part would come a bit later, but I guess not.

Setting it Up

After trying to get all of the machine learning packages set up, I'm convinced that the Unity (the game engine I'm using) devs don't actually know what they're doing. It took a whole day just to install the necessary components and another day to figure out how to use everything.

Fortunately, while I was going through this process, I came across one of the package's many examples, which proved to be quite amusing (Refer to "Man forgets how to walk.mp4").

Implementation

Implementation was (obviously) 10x harder. The ML system works by giving "reward" if the AI does something good and taking away "reward" if the AI does something undesirable (The reward is just a number!) 

I tried to set up a checkpoint system where The AI would:

  • Gain "reward" for successfully crossing checkpoints or finishing a lap
  • Lose "reward" every few seconds to promote fast driving

Even with this code in place, they weren't driving (See Driving is Not Fun (Virtually))! It was all due to one. Simple. Misstep.

The roads didn't have colliders (And there weren't enough checkpoints)! After this, I waited for quite a long time (Machine Learning takes time!) and just like that, the AI was functional!

If you'd like to see how the AI progressed, check out "2 Days of ML Training." I will definitely be posting a release trailer for Rotor Drift in the next few days, so stay tuned!

That's all I have for now. Scram!

Get Rotor Drift

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.