Turn based RPG AI : how can I handle risk / reward ?

Started by
31 comments, last by IADaveMark 8 years, 5 months ago

Have you watched my GDC lectures on utility-based AI, and specifically my Infinite Axis Utility System architecture?

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Advertisement

I watched both of your lectures and a good part of your articles on your website over the last few months smile.png

Your IAUS is a way to score actions so in the end you can select the best action. It is a heuristic like I'm trying to create. Thing is, I don't see how to have a representative list of axis (features) to evaluate. I'm generally more thinking about scoring a situation resulting from an action and assigning that score to that action and I think that the process of assigning a score directly to the action is similar.

In chess, people use material balance, mobility, board control ect... to have a pretty accurate utility function. In a RPG (even w/o movement like mine), there are so many parameters that can influence the score that I fail to see how it can be done.

Beside the obvious (hp, action point, resources) that I already don't see how to mix, there are things much more tricky like buffs. In conjuction with the 3 features I just mentioned, buff is the next big thing that can help us see if a situation is better or worst than another. Buff can have many effects (heal or damage over time, heal/damage when expires, (de)buff a stats, grant a new passive ability...). You can't really describe the state of the game w/o them and yet I don't see how they could be scored in a generalized manner.

For a random example : how do you score casting a "thorn" spell on one of your units. How can we quantify how good is it and how much better it would be compared to another skill we got? It depends on whether or not we think the unit with the thorn will be attacked for the buff duration (that alone will be tricky since the cast of the buff may deter the player from attacking...do we even want to redirect its attention?). It also depends on the type of damage our thorn does and what it will do to each of the possible attackers (if all attackers have resistances to fire and our thorn is fire, it may not be a good idea). What if our thorn interact on a bad level with another passive / buff (for example a enemy with another thorn for an infinite loop of damage, or if the player got a dispell that can only be activated with 2 buff on a target and we already got one) .... .... so many things to consider and no easy way to express it without hard-coding it.... for every kind of situation possible.

Even if you only try to score your actions based on the hp & resources impact and ignoring all buffs, I haven't found a relation between the two that would work in most situations.

What people seems to generally do is a weigthed sum of all our features (or a multiplication in your case). But how do you wiegth the need of hp vs resources ? Intuitively we can sense that often, the HP relationship between your party and the monsters is the most important thing. After all, the goal is to bring the opponenent HP to zero. That would lead us to score the HP difference from before/after a move to a much greater value than the resources. Let's say 0.8 vs 0.2 for example.

Sure it seems ok. But then you starting thinking about real situations. I may be fighting versus a mage whose attacks all cost some MPs. If he is out of MP, he cannot do a thing. I could have 1 hp and still have 100% chance to win in that situation. The 0.8/0.2 coefficient seems out of place here.

At the opposite of the spectrum, the monster may be a warrior with attacks that never cost MPs. Let's say he has a MP bar nevertheless, by using a 0.8/0.2 ratio I may score decently a mana burn on him even thought it is useless.

These are simple examples that doesnt work well already. There are ways around these two examples of course (by simply using a different curve/curve parameter for each input)but I dont even wanna think about more complex skills / items / stats interaction and the combinatorial issue of defining specific parameters for each specific case smile.png

I'd be interested to know how you deal with buff/debuffs with your IAUS for example. Does it work without the need of considering every stats / other buffs ect in the game? How ^^ ?

"Don't let the perfect be the enemy of the good."

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

This topic is closed to new replies.

Advertisement