Baltor Get started

Gallery / Godot components

GOAP planner with A* over world states

In your harnessGodot componentMIT

Plan the cheapest sequence of actions from preconditions, effects and costs to reach a goal world state, with optional procedural checks and a bound on expanded states.

Files, names only

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • baltor_test.gd
  • component.json
  • goap_planner.gd
  • inspect_gdscript.py
  • run_tests.gd
  • test_package.py
  • tests/test_goap_planner.gd
  • verification/native.json

Full files in your harness.

What it takes and gives

Class
BaltorGoapPlanner, extends RefCounted
Methods
add_action(action_name: StringName, preconditions: Dictionary, effects: Dictionary, cost: float = 1.0, check: Callable = Callable()) -> bool; remove_action(action_name: StringName) -> bool; has_action(action_name: StringName) -> bool; satisfies(state: Dictionary, conditions: Dictionary) -> bool; apply(state: Dictionary, action_name: StringName) -> Dictionary; is_applicable(state: Dictionary,…
Placement
res://baltor/godot_components/goap_planner/

Limits. Forward search over Dictionary world states; facts are compared with ==. The heuristic counts unmet goal facts, so the plan is the cheapest only when every action costs at least 1 and sets at most one goal fact. Large action sets need the max_nodes bound. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.

Details

Kind
Godot component
Engine
Godot 4.3 or later
Files
11 files, 79.3 KB
Licence
MIT
Declared effects
reads files, runs commands
Checked with
Godot 4.7.2, headless
Checks
godot parse check only, godot gdscript tests, godot tests reject gutted component, godot editor import, godot contract reflection, godot readme usage compiles
Techniques
goal-oriented action planning, A* search, unsatisfied-goal heuristic
Tags
goap, planning, ai, a star, agents, world state
Identity
library.supply.creative_originals.5474b87cfbc909d6f640745c.a5bb42664443b53c
Version
a5bb42664443b53c9131b89c4c59d572be33a10c11749fba52120e161ae21e65

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.