Skip to content

Regressive search is probably a bit smarter #2

@seivan

Description

@seivan

I would suggest going backwards makes more sense when pathfinding to endState.
https://github.com/sploreg/goap/blob/master/Assets/Standard%20Assets/Scripts/AI/GOAP/GoapPlanner.cs#L93

That way you give the AI a higher chance of finding a solution that works instead of a predefined set of actions that give you the result.
In other words, you should match endState with postEffects and the action's postEffects with next actions preConditions or existing startState.

endState -> postEffects -> preConditions/startState
Though you want to make sure to always check against the startState for every action because you could end the planning earlier since it might just be sufficient enough from where you are.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions