Class AStarSearchStrategy
java.lang.Object
com.google.adk.planner.goap.AStarSearchStrategy
- All Implemented Interfaces:
SearchStrategy
A* forward search strategy that explores from preconditions toward the goal, activating agents
whose inputs are all satisfied.
Uses a priority queue ordered by f-score (g + h) where:
- g = number of agents activated so far (uniform cost)
- h = admissible heuristic counting unsatisfied dependencies reachable backward from goal
After finding the goal, reconstructs the agent path and delegates to DependencyGraphSearch.assignParallelLevels(ImmutableList, List, Collection, GoalOrientedSearchGraph) for parallel grouping.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<String>> searchGrouped(GoalOrientedSearchGraph graph, List<AgentMetadata> metadata, Collection<String> preconditions, String goal) Searches for agent execution groups that produce the goal.
-
Constructor Details
-
AStarSearchStrategy
public AStarSearchStrategy()
-
-
Method Details
-
searchGrouped
public com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<String>> searchGrouped(GoalOrientedSearchGraph graph, List<AgentMetadata> metadata, Collection<String> preconditions, String goal) Description copied from interface:SearchStrategySearches for agent execution groups that produce the goal.- Specified by:
searchGroupedin interfaceSearchStrategy- Parameters:
graph- the dependency graphmetadata- agent metadatapreconditions- state keys already availablegoal- the target output key- Returns:
- ordered list of agent groups for parallel execution
-