Dreamers Inc

Unity AI Suprise: Playing with AI Planner Package

Advertisements

While updating my packages and get the HD Render Pipeline Package on Wednesday night, I came across a recently added package.  The AI Planner package was release into the wilds back in March of 2019 with no fanfare.

First talked about at Unite 2017, there has been a group of user waiting for more info on this. After watching the 3 Unity Conference talks on this, I have decided to try to give this a test run and decide on whether or not to keep working on my Infinite Axis Utility AI Implement or not. The success of this project will be based on the Total time to implement the system, performance penalty, and whether or not the objective can be completed. This post, or possible series of post, is by no means intended to be a tutorial of the system.  This meant to be a hands on review.

 

Getting Started

The Goal for the project is to  create a 3 relatively simple AI systems that improve on the previous version. The hope is to examine the ease of development and get an idea of the perfomance of the system in its current state. It is important to not that will be using AI Planner version 0.1.1. Any conclusion drawn on are based on this version alone.

The first AI System being created is simple Standing Guard. The agent will go to a point and guard it. Every once in while the agent will get bored and wander around the area for a bit. After a set amount of time guard the point, the agent will return home to recharge for the next guard shift. The Second Agent is a roving guard that will monitor security cams for x amount of time and then walk around to check point. The Final example will be a combination of both guard types with multiple instances of running.

 

Putting a Pin in it

So after spending Friday night struggle to understand the system because I was using outdated Documentation and half of Saturday getting the standing guard working I decided to put a pin in this test for the time being. While it is known that preview packages are not production ready, I feel like this package is not even preview ready. While there is great potential here, there is still a lot to do and improve on. The example project, Otto, was not really a good representation on my 1800x at least in editor. In editor, the Otto update function run at 18.8ms but the dev build bouncing between 1.35ms up to 15ms. My biggest issue at this time is that it very non deterministic.  For those unaware, Unity’s example is the workaholic Otto. The Otto AI have 6 actions he can take based on his needs which are hunger, thirst, and fatigue. Otto can either work, sleep, eat, drink or store food or drink. In my many test runs to figure out what what going on with performance, Otto never show consistency in his action choices. Sometimes he would go straight to work. Other times he would max out his inventory before going to work. Few time he would loop between getting food and drinks. On a few rare occasions, he would just malinger around until his need states were half depleted before taking a distinct action.

 

So after playing around with the system, I feel it is better to press pause than rushing to a snap judgement. The AI Planner system was first announced at Unite LA 2017. This release feels like a “we need to release something” move by the Unity Labs team developing it.

Advertisements

Advertisements