Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Goal-Oriented Action Planners #22

Open
0ffz opened this issue Sep 2, 2020 · 0 comments
Open

Goal-Oriented Action Planners #22

0ffz opened this issue Sep 2, 2020 · 0 comments

Comments

@0ffz
Copy link
Member

0ffz commented Sep 2, 2020

Goal-Oriented Action Planning (GOAP) is a technique that essentially builds behavior trees on its own, given the actions it can take. This is far better suited to a dynamic game like Minecraft, and the actions are also quite well suited to an ECS. GOAP also fits nicely with Minecraft's Pathfinder Goal system.

The system

  • A goal can be defined with a priority, alongside any other PathfinderGoals. The highest priority goal which can be executed will be executed.
  • Actions specify what they want to do. More specifically, what the conditions are to get that thing done, and what the results are (we call these pre/postconditions). Actions also have a "cost" associated with doing them.
  • Goals also specify a condition they want to see met.
  • When seeing if a goal can be executed, we pathfind backwards from the goal, going through actions with the lowest cost first, and seeing whether their conditions can be met, connecting them to actions which cause those conditions to occur. Essentially we are trying to find the lowest cost path to some action which has its conditions met, and which will, perhaps through several actions, eventually meet the conditions we define in our goal. Simple A* pathfinding can be used here.

Resources

A nice overview of common Behavior Selection Algorithms:
http://www.gameaipro.com/GameAIPro/GameAIPro_Chapter04_Behavior_Selection_Algorithms.pdf

@0ffz 0ffz mentioned this issue Sep 2, 2020
@0ffz 0ffz added this to Planning in ECS Dec 11, 2020
@0ffz 0ffz removed this from Planning in ECS Oct 9, 2021
@0ffz 0ffz added this to Research in [Mob AI] Custom pathfinding Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant