there are two basic or common way to make decision using utility, firstis called absolute utility and the second is relative utility. absolute utility is a simply evaluates each option and takes the on e with the most score, unlike the relative utility selects an option at random but use the score of each option to define the probabil;ity that it will be selected.
the approach is referred to as weight based random and is implemented as follow;
relative and absolute utilities each have merit and demerit, absolute utilty is but when you want to ensure that the ai always takes takes the most appropriate action available. unfortunately this can become predictable given a predictability of absolute utility picking at random it ensures a certain amount of variation still giving perference to the most appropriate choices.
the combines absolute and relative untilities into a synergistic whole avoiding the weekness of both together and is also more flexible and expressive for the game designers. the idea is that rather assigning a single utility value to each option, we assign to rank and weight.
Finally, we use weight-based random to select from among those options that remain. Once again, the four steps are as follows:
Once this is done, we can use relative utility to pick from among the options within the best category in a random but reasonable way.