Sign in to follow this  
  • entries
  • comments
  • views

AI framework test video

Sign in to follow this  


Quick demo video of my Utility and Needs Based UI test framework.



Click to see video on workshop



This is a quick demo video of my Utility and Needs Based AI test framework.


There are several things going on here to cause the AI actors to decide what to do:


- A scoring function runs every tick that updates the score for each available action. The top scoring action is marked as the active mode; if the mode changed since the last tick, startup logic runs for the new mode and the new animation loop is activated.


- The sleep action takes into account a "need", which is tracked as an increasing number from 0-100. It slowly increases over time, somewhat differently for each actor. Around when the need reaches 100, the score function for sleep does as well, eventually exceeding all other action's scores, activating sleep. When sleeping, scores for all other actions drop since it is difficult to do anything when you're tired. The script then activates the sleep animation.


- While performing the sleep action, the actor receives a reward each tick that they are performing this action.


- When awake, the actors currently switch between idle and wander actions since there is currently no other input in the environment to change the score of the other actions. These actions have an internal, random time limit which varies slightly for each actor. When the time limit expires, the action is disabled (turning it red). This allows for breaking score ties for time based actions.


It's not an ideal framework but it's a start.

Sign in to follow this  


Recommended Comments

Thanks, I'm really happy with how it's turned out so far. We'll see if the model extends to the rest of the more important actions and if I can clean up the code enough to put it in the workshop (one of my goals is to make everything I create reusable for others).

  • Upvote 1

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Create Your Account

Sign in

Already have an account? Sign in here.

Sign In Now