GOAPPlannerBuilder

class GOAPPlannerBuilder<State>(stateType: KType)(source)

GOAPPlanner DSL builder.

Constructors

Link copied to clipboard
constructor(stateType: KType)

Functions

Link copied to clipboard
fun action(name: String, description: String? = null, precondition: (State) -> Boolean, belief: (State) -> State, cost: (State) -> Double = { 1.0 }, execute: suspend (AIAgentFunctionalContext, State) -> State)

Defines an action available to the GOAP agent.

Link copied to clipboard

Builds the GOAPPlanner.

Link copied to clipboard
fun goal(name: String, description: String? = null, value: (Double) -> Double = { cost -> exp(-cost) }, cost: (State) -> Double = { 1.0 }, condition: (State) -> Boolean)

Defines a goal for the GOAP agent.