goal
fun goal(name: String, description: String? = null, value: (Double) -> Double = { cost -> exp(-cost) }, cost: (State) -> Double = { 1.0 }, condition: (State) -> Boolean)(source)
Defines a goal for the GOAP agent.
Parameters
name
The name of the goal.
description
Optional description of the goal.
value
Goal value depending on the cost of reaching the goal. Default is exp(-cost).
cost
Heuristic estimate for the cost of reaching the goal. Default is 1.0.
condition
Condition determining when the goal is achieved.