langgoap.resolve_conditions

langgoap.resolve_conditions#

resolve_conditions(resolvers, keys, world_state, *, overwrite=False)[source]#

Run all resolvers against keys and return an updated world-state copy.

Keys already present in world_state are skipped unless overwrite is True. TRUE writes True, FALSE writes False, and UNKNOWN leaves the key absent.

Parameters:
  • resolvers (list[ConditionResolver | AsyncConditionResolver]) – Registered condition resolvers.

  • keys (list[str]) – Condition keys to evaluate (typically from goal + action preconditions).

  • world_state (dict[str, Any]) – Current world state (not mutated; a copy is returned).

  • overwrite (bool) – Re-evaluate even when the key is already set (default False).

Returns:

Updated world-state dict with resolved TRUE/FALSE keys merged in.

Return type:

dict[str, Any]