MKaysen2 / GOAPProject

Personal attempt at GOAP implementation in Unreal Engine 4
2 stars 1 forks source link

improve effects and preconditions to be more expressive #28

Closed MKaysen2 closed 4 years ago

MKaysen2 commented 4 years ago

currently only using SET and EQ operations, should add increment and decrement for the effects, and <, <=, >, >= for the preconditions

MKaysen2 commented 4 years ago

For the backward chaining in AStar, I'm pretty sure that the prior value v should be

argmin_v h(v) where v in V_k s.t. P(v) where V is the domain of key k, P(x) is the truth value of precondition P for some x, and h(x) is the heuristic distance of value x, which should be a unique value for ordered keys (comparators other than eq are undefined for non-ordered keys)

I will probably hard code the cases in, but that's how I'm computing the values

edit: and I say pretty sure because I don't feel like proving it. Should hold if the heuristic is admissible and consistent, so don't mess up the edge costs

MKaysen2 commented 4 years ago

added improved effects to the planner, though currently it doesn't use the improved preconditions