Mastodon Icon RSS Icon GitHub Icon LinkedIn Icon RSS Icon

Tag Planning

Choosing between Behavior Tree and GOAP (Planning)

Header image for Choosing between Behavior Tree and GOAP (Planning)

I would like to expand the answer I gave on /r/gamedesign some days ago. The main point of the question was: how can I decide if it “better” to implement the decision-making layer of our game AI with Behavior Trees (BTs) or with more advanced plan-based techniques such as Goal Oriented Action Planning (GOAP) or Simple Hierarchical Ordered Planner (SHOP).

First consideration: this is not a technical problem

The first thing to know is that writing game AI is not a race for the best technology. Instead, it is just about choosing the right tool for serving the gameplay as well as possible. So, there is no urgency to select the most advanced algorithm. You need to choose the simplest one that is good enough for your game. Remember Pac-Man. The AI of Pac-Man is still utterly challenging, and yet it is exceptionally straightforward.

Improve Inventory-Aware Pathfinding with Map Preprocessing

Header image for Improve Inventory-Aware Pathfinding with Map Preprocessing

This article has been originally published on Gamasutra.

In the last article we introduced a basic approach for Inventory-Aware Pathfinding (IAP), a pathfinding algorithm capable of interacting with obstacles and not just avoiding them. If you have not read it, I encourage you to go back and read it to understand the basic challenges and the main ideas behind the proposed solution.

For instance, we can have a pathfinding algorithm that can solve small plans and “puzzles” involving reasoning like “before passing this door, I need to get that key”. This is definitely planning territory. However, if we focus on a small subset of the problem, we may squeeze the algorithm into the pathfinding search itself.