langgoap.refine_with_csp

langgoap.refine_with_csp#

refine_with_csp(plan, goal)[source]#

Validate plan against goal’s constraints and attach CSP scoring.

Runs langgoap.planner.csp.validate_plan() over an existing plan and returns the plan re-scored with a HardSoftScore and metadata.csp filled in. It does not search: pair it with A* (or use TwoPhasePipelineStrategy, which does both) when you need a plan constructed as well as checked.

Parameters:
Return type:

Plan