Skip to content

Add optional heuristic weight and tie-break support to A*#1381

Open
christiefhyang wants to merge 1 commit into
AtsushiSakai:masterfrom
christiefhyang:christie/weighted-a-star-options
Open

Add optional heuristic weight and tie-break support to A*#1381
christiefhyang wants to merge 1 commit into
AtsushiSakai:masterfrom
christiefhyang:christie/weighted-a-star-options

Conversation

@christiefhyang

@christiefhyang christiefhyang commented Jun 4, 2026

Copy link
Copy Markdown

Reference issue

None.

What does this implement/fix?

This PR adds optional Weighted A* settings to AStarPlanner while preserving the default behavior.

Changes:

  • Add heuristic_weight, defaulting to 1.0.
  • Add tie_breaker, defaulting to None.
  • Support tie_breaker="larger_g" to prefer nodes farther from the start when priorities are equal.
  • Add last_expanded_node_count for benchmarking without changing the planning() return values.
  • Add tests for default compatibility, weighted planning, and invalid options.

Additional information

The default constructor path keeps the same behavior as before. In local benchmarking, weighted variants reduced expanded nodes on the default demo scenario while preserving the path length in that run.

CheckList

  • Did you add a unittest for your new example or defect fix?
  • Did you add documents for your new example?
  • All CIs are green? (You can check it after submitting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant