Skip to content

Add suboptimal search option#42

Open
arjo129 wants to merge 4 commits intoarjoc/feat/benchmark-infrafrom
arjoc/temp-benchmark-focal
Open

Add suboptimal search option#42
arjo129 wants to merge 4 commits intoarjoc/feat/benchmark-infrafrom
arjoc/temp-benchmark-focal

Conversation

@arjo129
Copy link
Copy Markdown
Member

@arjo129 arjo129 commented Apr 9, 2026

New feature implementation

Implemented feature

This PR introduces FOCAL search into the negotiation loop. Unlike standard Best-First Search which focuses purely on cost, FOCAL search prioritizes nodes within a sub-optimal bound f(n) <= weight * min_cost that have the fewest conflicts. This allows the solver to find valid paths significantly faster in congested environments by proactively avoiding agents.

Key Changes

  • FOCAL Search Logic: Implemented a two-tiered priority queue system for pathfinding.
  • Weight Tuning: Evaluated performance with weights of 1.1 and 1.5.

Benchmark Results: Weight Comparison

The following table compares the baseline (Standard Best-First) against FOCAL search with weights of 1.1 and 1.5.

Map:Scenario Agents Baseline Focal 1.1 Focal 1.5 Speedup (1.5 vs Baseline)
empty-32-32 20 2.47s 1.48s 0.55s 4.50x
room-32-32-4 10 Timeout 0.39s 0.42s Solved
empty-32-32 15 0.55s 0.53s 0.52s 1.06x
room-32-32-4 5 0.39s 0.36s 0.36s 1.08x

Observations:

  • Focal 1.5: Delivered a 4.5x speedup in high-density scenarios (20 agents). It is the most robust setting for avoiding timeouts in congested areas.
  • Focal 1.1: Successfully resolved complex scenarios (e.g., room-32-32-4 with 10 agents) that the baseline could not, but was slower than 1.5 in open-space congestion.
  • Baseline: Frequently timed out as agent density increased due to over-prioritizing shortest paths that were heavily contested.

Conclusion

Setting focal_weight to 1.5 provides the best balance between path optimality and search speed, resolving complex scenarios that previously timed out while offering substantial speedups in high-traffic areas.

Verification

  • Automated benchmarks run across empty, room, maze, and random maps from the Moving AI dataset.
  • Verified that all successful runs maintain valid, collision-free paths.

GenAI Use

We follow OSRA's policy on GenAI tools

  • I used a GenAI tool in this PR.
  • I did not use GenAI

Generated-by: Gemini-CLI

@mxgrey mxgrey added this to PMC Board Apr 9, 2026
@github-project-automation github-project-automation bot moved this to Inbox in PMC Board Apr 9, 2026
@arjo129 arjo129 changed the title Arjoc/temp benchmark focal Add suboptimal search option. Seee how much more effective it is. Apr 9, 2026
@arjo129 arjo129 marked this pull request as draft April 9, 2026 09:03
@arjo129 arjo129 changed the title Add suboptimal search option. Seee how much more effective it is. Add suboptimal search option Apr 10, 2026
@arjo129 arjo129 force-pushed the arjoc/temp-benchmark-focal branch 2 times, most recently from 24c130a to a04f3b2 Compare April 10, 2026 00:59
arjo129 added 3 commits April 10, 2026 01:13
…sults

Generated-by: Gemini-CLI
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Generated-by: Gemini-CLI
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
Generated-by: Gemini-CLI
Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
@arjo129 arjo129 force-pushed the arjoc/temp-benchmark-focal branch from a04f3b2 to 6b25f8b Compare April 10, 2026 01:13
This change allows for tunable suboptimality in the negotiation process by introducing a weight parameter to the focal search. A negotiate wrapper is provided for backward compatibility.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
@arjo129 arjo129 marked this pull request as ready for review April 10, 2026 08:21
@arjo129 arjo129 requested a review from mxgrey April 10, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants