Package-level declarations

Types

Link copied to clipboard
class Action<State>(val name: String, val description: String?, val precondition: Condition<State>, val belief: Belief<State>, val cost: Cost<State>, val execute: Execute<State>)

Represents an action that can be performed by the agent.

Link copied to clipboard

Builder for Action instances.

Link copied to clipboard

API for building Action instances.

Link copied to clipboard
typealias Belief<State> = (State) -> State
Link copied to clipboard
typealias Condition<State> = (State) -> Boolean
Link copied to clipboard
typealias Cost<State> = (State) -> Double
Link copied to clipboard
typealias Execute<State> = suspend (AIAgentPlannerContext, State) -> State
Link copied to clipboard
class Goal<State>(val name: String, val description: String?, val value: GoalValue, val cost: Cost<State>, val condition: Condition<State>)

Represents a goal that the agent wants to achieve.

Link copied to clipboard

Builder for Goal instances.

Link copied to clipboard
typealias GoalValue = (Double) -> Double
Link copied to clipboard
abstract class GoapAgentState<Input, Output>(val agentInput: Input)

Represents the state of a Goal-Oriented Action Planning (GOAP) agent during its operation.

Link copied to clipboard
class GOAPPlan<State>(val goal: Goal<State>, val actions: List<Action<State>>, val value: Double)

A GOAP plan.

Link copied to clipboard

Goal-Oriented Action Planning (GOAP) implementation for AI agents.

Link copied to clipboard
open class GOAPPlannerBuilder<State : GoapAgentState<*, *>> @JvmOverloads constructor(stateType: TypeToken? = null)

GOAPPlanner DSL builder.

Functions

Link copied to clipboard
fun <State : GoapAgentState<*, *>> goap(stateType: TypeToken, init: GOAPPlannerBuilder<State>.() -> Unit): GOAPPlanner<State>

Creates a GOAPPlanner using a DSL for defining actions.