AI Overlord


Cycle 2 - Week 2

Time to officially restart development on Tank Tracks. And I’m starting off with what my become the most complex system and something I will be returning to again and again to tweak and improve. The AI races you will be up against.

My original plan was to tackle the menu systems first and start laying down the foundation for the main gameplay loop.  But as I was looking through everything, I wanted to achieve this semester, I realized that if I don’t at least get serviceable AI in now, then I would have to revisits and rewrite a lot down the line.

So, I made the decision that the AI opponents would be the first major feature to get implemented.


My first approach to implementing this was to use Unity’s AI learning tool ML-Agents. With it, I could set up a simple training environment and a basic car and let the AI teach itself how to navigate the track. It would give me a more advanced and complex AI than anything I could create.

And while that still may be true, 3 hours’ worth of research, installation, and testing later, any benefits ML-Agents would have given me was quickly being out weighted by the time I was sinking into learning the tool. Unfortunately, the tool isn’t a simple plug-in for Unity, but rather a whole external application that is VERY temperamental and hard to work with. Even with following a tutorial and using the built in demo scene, I had a very hard time getting any results out of it.

 

It was clear that this wasn’t working out. So, before I wasted any more time, I decided to cut my loses and move to a simpler AI design. And I was in luck. Code Monkey, and YouTube channel’s tutorials I had used in the past, had another tutorial on this very topic.

 
 

Using his tutorial as a guide, I had managed to get a basic car AI that followed a node I moved around on the map. The car accelerates, turns, and reverses to navigate itself to the node. And that’s all it can do for now. It has no object avoidance and no ability to navigate a track. These are things I will be adding next week and will continue to improve up until the very end.

 
 

But for now, this is a good start. I look forward to further developments and seeing where I can take this AI. Next week is going to be all about getting the AI to drive around the tracks, then any remaining time will be used to further enhance the AI and make it more interesting to race against.


This concludes this week's report.

Previous
Previous

PvE

Next
Next

Getting back into it.