I started working project WSS AI and I’ve been researching Utility Theory. I came across Utility Theory in DOT A.I Engine.

What is Utility Theory for games? The idea is to define utility scores from conceptual models of your game world to model decision responses to your game world. This scoring can be applied to individual entities to make decisions or it can be applied to more abstract objects of the game world (A.I director). A soldier entity can use it to decide between taking cover or charging, or a mayor entity can use it to make decisions on how to allocate resources for a city simulation. (Isn’t it cool that this can be used to give VALUE to anything).

At the fundamental level one applies functions to attributes and output them into other functions. By combining these inputs and outputs one can derive a final set of scores. Decisions are based on scores where one can choose a score using max score, random N top scores, or random weighted-value of scores. One can define black boxes where definite world attributes are combined into conceptual attributes (enemy health and strength combined into enemy assessments) and together with other black boxes complex behaviors can result.

Once you learn what patterns and functions (you can be creative with how you come up with your model) you use them to come up with your AI behaviors. It’s really neat. Check out this video from GDC vault to learn all about UT in games:

http://gdcvault.com/play/1015683/Embracing-the-Dark-Art-of

http://gdcvault.com/play/1012410/Improving-AI-Decision-Modeling-Through

One doesn’t need specialized tools to start prototyping A.I with Utility Theory. All you need is python NumPY, SciPY, and graphing (or some other math package like Sage). I did some of this when I was prototyping potential field navigation. You can come up with a model, plug in the numbers, and check it from the resulting graph. This allows you to try out ideas and have quick iteration time without writing a single line of game code. Once you have a prototype you can turn it into c++ game code and have it all work the first time!

Needs Based A.I

This is a method that uses Utility Theory where the world is modeled through advertisements. An advertisement provide benefits or costs which an entity can use to derive a score. One can then combined with some of the utility ideas given in the videos above to complete your A.I.

I guess one could combine this with behavior tree also.

Click to access Needs-based-AI-draft.pdf

DOT A.I Engine:

I’m still checking it out. The version they have right now is pretty cool but is missing a lot of stuff they talk about at various places online. It’s still very cool. Their scoring / attune model is very cool. It uses descriptive statistics together with various mappings for scoring. For example error function F(x) and complement error function F'(x) centered on quantiles of an input relevance function (thus your input can come from arbitrary distributions of values) is used for scoring: where score = F'(currentX) – F(futureX). Score depends on which quantile we center on which affects where the error function is sampled.

I will make more posts when I create prototype models.