langgoap.compute_goal_hash#
- compute_goal_hash(goal)[source]#
Return a stable short hash of a goal’s conditions.
The hash is deterministic across runs (unlike Python’s built-in
hash) and short enough to read in logs. It is the same key used byStoreExecutionHistoryto file records under its goal reverse-index, so callers can look up the history of a goal by passing the result toStoreExecutionHistory.query_by_goal().Example:
history = StoreExecutionHistory(store) records = history.query_by_goal(compute_goal_hash(goal))
- Parameters:
goal (GoalSpec)
- Return type:
str