goap

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package goap provides deterministic goal-oriented action planning over immutable planning.WorldState values. Its Planner uses uniform-cost search, which is complete and cost-optimal for the non-negative finite Action costs accepted by the Planning domain.

Index

Constants

This section is empty.

Variables

View Source
var ErrExpansionLimitReached = errors.New("goap: expansion limit reached")

Functions

This section is empty.

Types

type Config

type Config struct {
	// MaxExpansions bounds states removed from the frontier. Zero selects a safe
	// default of 10,000 expansions.
	MaxExpansions uint32
}

Config contains the bounded search policy for a GOAP Planner.

type Planner

type Planner struct {
	// contains filtered or unexported fields
}

Planner performs stateless uniform-cost search and is safe for concurrent use after construction.

func New

func New(config Config) *Planner

func (*Planner) Plan

func (p *Planner) Plan(ctx context.Context, problem planning.Problem) (planning.Plan, bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL