#Weighing different AI models: behavior tree vs GOAP

1 messages · Page 1 of 1 (latest)

jolly jewel
#

Weighing different AI models: behavior tree vs GOAP

TL;DR: how could I best model the AI for a car combat game that is trying to simulate a human player?

I’m working on the AI for my car combat game and am using the Beehave addon to build a behavior tree. For the most part it’s going smoothly, but as I’m working in the “attack” behavior I’ve realized there is a lot of complexity to the decision making. For example, pre-attack, I’m trying to evaluate weapon range, damage, direction of attack (forward/backward shooting weapon), etc. to determine if the bot should engage or close distance or what. When I consider defensive maneuvers that seems very complex too.

I recently learned about goal-oriented action planning (GOAP) and it seems like an interesting approach to AI. What I read defined a “planner” object that had insight to all kids of game state, including other players info. This is in contrast to my approach with my behavior tree, where I’m trying to limit AI insight to sensors (raycasts, area3D) to mimic player decision making. Obviously there are other differences as well.

My goal is to make a relatively realistic simulation of a player that, eventually, could be made more/less difficult or have different “personalities” (aggressive, defensive, retreating). Which model would be a better fit for this kind of use-case?

karmic abyss
#

I'm a big proponent of GOAP, but it's more useful for forming intelligent multi-step plans, and usually action games are more about simulating instinct and reflex

#

Instead of a planning algorithm, you may want a steering algorithm

#

"Utility AI" is kind of a consulting buzzword, but that kind of system is more suited to shooters and racers

#

This video shows off a steering algorithm that was originally creating for a racing game (and is probably better suited to that)

#

In the description, he links to the original paper, which is very interesting

#

If you're not talking about a typical racing game, but some kind of Wacky Races / Speed Racer situation involving elaborate schemes, then GOAP would be more appropriate

jolly jewel
#

I’m thinking more Twisted Metal/Mario kart battle mode

karmic abyss
#

Maybe, but GOAP is more about reaching specific goals using actions that don't have immediately obvious benefits

#

Like, you know the classic puzzle where you need to move the fox, the goose, and the bag of corn across the river?

#

The benefit of GOAP is that it can make a plan like that, by imagining specific outcomes

#

I suppose there are some plans it could make, like trying to lure you into a hazard, or plotting to keep you away from powerups