goap
fun <Input : Any, Output : Any, State : GoapAgentState<Input, Output>> goap(name: String, initializeState: (Input) -> State, defineGoap: GOAPStrategyBuilder<Input, Output, State>.() -> Unit): AIAgentPlannerStrategy<Input, Output, State>(source)
Creates a Goal-Oriented Action Planning (GOAP) strategy for an AI agent.
Return
An instance of AIAgentPlannerStrategy<Input, Output, State> which represents the compiled GOAP strategy ready for execution.
Parameters
name
The name of the GOAP strategy.
defineGoap
A lambda to define actions, goals, and configuration for the GOAP strategy using a GOAPStrategyBuilder<Input, Output, State>.