Skip to main content

Crate condor

Crate condor 

Source
Expand description

§Condor

Condor is a pathfinding library with explicit public entrypoints for grids, polygonal scenes, repeated polygonal queries, navmesh routing, and replanning lanes.

The published package is condor-for-games; the Rust library name is condor (cargo add condor-for-games --rename condor). This crate is the public facade: it curates feature-gated re-exports from owner crates (core, geometry, grid, navmesh) and owns a small set of root contracts (solver_portfolio, polygonal pack adapters, artifact error types). Application code should depend on condor, not on implementation crates directly.

Start with SolverPortfolio if you want the current recommended surface for a problem model, then move to the concrete solver or workflow type for that model. Project support catalogs, capture reports, and readiness checklists live outside this curated import surface.

§Problem models

ModelBuild and query withHow it relates to the other lanes
Discrete gridGrid, SearchRequest, PathfinderCell-based static, any-angle, prepared, replanning, and MAPF work
Continuous free spacePolygonScene, PolygonSearchRequest, PolygonPathfinderUses world-coordinate Point2 values and Euclidean polyline paths
NavmeshNavmesh, NavmeshPathfinder, PreparedNavmeshBuilderReuses the continuous Point2 / polygon-path vocabulary over convex cells and portals
Shared outcomeSearchOutcomeEach lane distinguishes invalid requests (Err) from computed found/no-path outcomes with stats
Search budgetSearchBudget on each request/queryOptional max_expansions / max_duration; default unlimited; exhaustion is Err, not no-path

The grid and continuous/navmesh lanes deliberately use their own request and path types. Choose the model that matches the caller’s world representation; SolverPortfolio maps that choice to the endorsed public entrypoint.

§Features

FeatureSurface
gridGrids, static search, any-angle, preprocessed grids, MAPF, replanning
polygonalContinuous polygon scenes, visibility / SPM / TFS solvers, artifact errors
navmeshNavmesh substrate and routing (implies polygonal)
polyanyaOptional Polyanya router (implies navmesh)
fullAll of the above (default)

§Add Condor to an application

Give the dependency the library name so application code can use condor::{AStar, Grid, ...} directly:

cargo add condor-for-games --rename condor
[dependencies]
condor = { package = "condor-for-games", version = "0.4.0", default-features = false, features = ["grid"] }

Omit the feature settings when you want Condor’s complete curated surface; full is the default.

§Examples

Choose an endorsed surface for a problem model:

use condor::{SolverPortfolio, SolverUseCase};

let recommendation = SolverPortfolio::recommend(SolverUseCase::ExactNavmeshRouting);
assert_eq!(recommendation.solver(), "TRAStarBuilder");
assert_eq!(recommendation.integration_surface(), "PreparedNavmeshBuilder");

Run a grid-only A* search:

use condor::{AStar, Cell, Grid, Pathfinder, Point, SearchRequest};

let mut grid = Grid::new(5, 5).expect("grid dimensions are valid");
grid.set_cell(Point::new(2, 2), Cell::Blocked)
    .expect("point is in bounds");

let result = AStar.search(
    &grid,
    SearchRequest::new(Point::new(0, 0), Point::new(4, 4)),
).expect("request is valid");

assert!(result.is_found());

Cap expansions or wall-clock time on any online search request:

use condor::{AStar, Grid, Pathfinder, Point, SearchBudget, SearchRequest};

let grid = Grid::new(20, 20).expect("grid dimensions are valid");
let request = SearchRequest::new(Point::new(0, 0), Point::new(19, 19))
    .with_budget(SearchBudget::max_expansions(4));
let error = AStar.search(&grid, request).expect_err("budget should stop a long path");
assert!(matches!(error, condor::GridSearchError::BudgetExhausted(_)));

Re-exports§

pub use error::ArtifactContractError;
pub use error::ArtifactContractKind;
pub use error::ArtifactContractLocation;
pub use error::ArtifactDataError;
pub use error::ArtifactLoadError;
pub use polygonal::NoPathProof;
pub use polygonal::PolygonScenePack;
pub use polygonal::PolygonScenePackKind;
pub use polygonal::SeparationAxis;
pub use polygonal::load_polygon_scene_pack;
pub use polygonal::load_polygon_scene_stress_pack;

Modules§

algorithms
Algorithm taxonomy re-exports grouped by search contract (owner crates hold bodies). Algorithm taxonomy re-exported from owner crates, grouped by search contract.
any_angle
Any-angle grid pathfinder trait and continuous-on-grid request surface (owner: grid). Any-angle grid search contracts re-exported from the grid owner crate.
continuous
Continuous free-space geometry substrate and walkability primitives (owner: geometry). Online continuous pathfinder trait, polyline path, and search result vocabulary. Continuous polygonal path types and the [PolygonPathfinder] search trait.
error
Artifact and pack-boundary error types owned by the facade. Root-owned structured errors for embedded polygon-pack loading.
flow_field
Multi-agent same-goal flow-field amortization (owner: grid). Same-goal multi-agent flow-field build and query amortization. Same-goal flow field for amortizing many independent 4-connected paths.
grid
Discrete grid storage and cell model (owner: grid). Discrete grid storage, cell model, and edit/build errors. Rectangular 4-connected map substrate shared by all discrete grid lanes.
hierarchical
Hierarchical abstract-grid layers for multi-level search (owner: grid). Hierarchical abstract-grid layers for multi-level search. Hierarchical build-once/query-many contracts for cluster abstraction and refinement.
mapf
Multi-agent pathfinding starter surface (owner: grid). Multi-agent pathfinding (MAPF) runtime re-exported from the grid owner crate.
navmesh
Navmesh substrate and pathfinder re-exports (owner: navmesh). Navmesh runtime types re-exported from the navmesh owner crate.
path
Grid path reconstruction and cost types (owner: grid). Discrete path reconstruction and path cost types. Validated discrete path value: ordered cells plus an algorithm-reported cost.
point
Integer grid coordinates (owner: grid). Integer cell coordinates for the discrete grid lane. Integer coordinates for discrete grid cells.
polyanya
Optional Polyanya-backed navmesh pathfinder (owner: navmesh, feature-gated). Optional Polyanya navmesh router re-exported from the navmesh owner crate.
polygonal
Continuous polygonal pack adapters and scene pathfinder surface (owner: geometry + facade packs). Polygonal scene types (re-export) plus root-owned embedded pack loaders.
prepared_any_angle
Prepared any-angle visibility graphs over grids (owner: grid). Prepared any-angle visibility graphs over static grids. Prepared exact any-angle search for many queries over one static grid.
preprocessed_grid
Preprocessed static grid search substrates (owner: grid). Preprocessed static multi-query grid search substrates. Algorithm-neutral build-once/query-many contracts for static grid search.
replanning
Incremental and interpolated grid replanning contracts (owner: grid). Dynamic and interpolated grid replanning contracts re-exported from the grid owner crate.
search
Online grid search traits and request/result contracts (owner: grid). Online Pathfinder trait, search request, budget, and outcome contracts. Online 4-connected grid-search request, result, and Pathfinder contract.
shortest_path_map
Continuous shortest-path maps for fixed-source polygonal queries (owner: geometry). Source-rooted prepared shortest-path maps for repeated polygonal queries. Source-rooted shortest-path maps for repeated polygonal goal queries.
solver_portfolio
Endorsed solver recommendations keyed by problem model / use case. Root-owned recommendation catalog for Condor’s endorsed public solver entrypoints.
topological_fracture_search
Topological fracture search for continuous free space (owner: geometry). Exact topological-fracture continuous polygonal pathfinder. Exact polygonal pathfinder using topological fracture search (TFS).
visibility_graph
Visibility-graph exact polygonal shortest paths (owner: geometry). Exact visibility-graph continuous polygonal pathfinder (sparse-scene baseline). Exact polygonal pathfinder using a visibility graph over scene vertices.

Macros§

grid
Discrete grid storage and cell model (owner: grid). Constructs a Grid from textual rows using Grid::try_from_rows.

Structs§

AStar
Weighted static-grid Pathfinder: A* with Manhattan heuristic.
AnyAnglePath
Non-empty polyline in grid coordinates with Euclidean traversal cost.
AnyAngleSearchRequest
Start and goal endpoints for an any-angle grid search.
AnyAngleSearchStats
Work counters from an any-angle search (algorithm-defined node visits).
Anya
Any-angle pathfinder implementing AnyAnglePathfinder.
AnyaDiagnostics
Solver-local diagnostics for row-interval Anya (inspect path only).
AnyaInspection
Instrumented Anya outcome: pathfinder result plus expansion diagnostics.
Bfs
Online Pathfinder: unweighted 4-connected BFS.
BidirectionalBfs
Online Pathfinder: bidirectional BFS meeting in the middle.
BudgetWatch
Shared search-budget types used across problem models (owner: core). One-shot wall-clock deadline for a single search invocation.
ChannelSearch
Stateless corridor-BFS pathfinder with portal-midpoint funnel seeding.
ContinuousShortestPathMap
Visibility-graph builder for source-rooted continuous shortest-path maps.
DStarLite
Curated dynamic-grid GridReplanner (D* Lite product name).
Dijkstra
Weighted-grid Pathfinder: uniform-priority Dijkstra.
DynamicNavmeshPortalKey
Canonical undirected portal identity for dynamic enable/disable updates.
DynamicNavmeshState
Mutable availability overlay on a validated base Navmesh.
DynamicPreparedNavmeshQuery
Applies dynamic updates, materializes, rebuilds prepared data, and runs connectivity.
DynamicPreparedNavmeshQueryMetadata
Staleness and rebuild bookkeeping from one dynamic prepared query run.
DynamicPreparedNavmeshQueryResult
Materialized navmesh, rebuilt prepared map, and raw vs rebuilt query outcomes.
FieldDStar
Interpolated InterpolatedGridReplanner (Field D* name).
FlowFieldBuilder
Builds a PreparedFlowField for one goal on a uniform-cost 4-connected grid.
Grid
Dense row-major rectangular map: walkability, traversal_cost, optional reachability.
GridBuilder
Builder for applying validated bulk edits to a new Grid.
HPAStarBuilder
Hierarchical / preprocessed builder for HPA* on uniform-cost grids.
InterpolatedPath
Continuous polyline over a grid with an associated traversal cost.
InterpolatedPathOutcomeRef
Borrowed view of a successful interpolated path plus its stats.
InterpolatedSearchOutcome
Grid-owned adapter for an interpolated found/no-path outcome.
InterpolatedSearchRequest
Fractional start/goal coordinates for interpolated grid search.
InterpolatedSearchStats
Work counters for one interpolated search or replan (solver-local).
JpsPlusBuilder
PreprocessedGridBuilder for cardinal JPS+.
JumpPointSearch
Online cardinal Pathfinder: Jump Point Search (4-way).
LazyThetaStar
Online AnyAnglePathfinder with deferred LOS (Lazy Theta*).
LifelongPlanningAStar
Incremental LPA* GridReplanner for dynamic weighted grids.
MapfAgent
One MAPF agent with a static start cell and a static goal cell.
MapfAgentPath
Time-indexed path for one agent (positions[t] is the cell at timestep t).
MapfPlan
Time-stepped multi-agent plan indexed by agent paths.
MapfPlanMetrics
Objective metrics derived from a plan (first-arrival based).
MapfProblem
Static-grid MAPF problem: grid, agents, and objective label.
MapfStarterPlanner
Deterministic fixed-order reservation-table starter baseline for MAPF problems.
MapfStarterPlannerResult
Result from the bounded MAPF starter planner.
MapfValidationReport
Complete MAPF plan validation result.
Navmesh
Graph of convex cells and portal segments for connectivity and walkability.
NavmeshCell
One convex walkable polygon in a navmesh, keyed by a stable cell_id.
NavmeshPortal
Adjacency segment between two cells; endpoints must lie on both cell boundaries.
NavmeshQuery
Start/goal endpoints for connectivity checks and route search.
NavmeshSearchStats
Work counters for a navmesh route search.
Path
Non-empty sequence of grid cells with an associated traversal cost.
Point
A single grid cell address (x column, y row), zero-based.
Point2
Continuous 2D point in world / scene coordinates (not grid cells).
Polyanya
NavmeshPathfinder that routes through Polyanya then Condor string-pulling.
Polygon
Simple polygon obstacle: closed ordered vertex ring, not necessarily convex.
PolygonPath
Non-empty free-space polyline in scene coordinates with Euclidean cost.
PolygonScene
Bounded free space with polygon obstacles and walkability predicates.
PolygonSearchRequest
Start/goal pair for online polygonal search.
PolygonSearchStats
Work counters for polygonal search (typically expanded graph vertices).
PreparedAnyAngleBuildDiagnostics
Build-time diagnostics for a prepared any-angle visibility graph.
PreparedAnyAngleGrid
Immutable prepared visibility graph for repeated exact any-angle queries.
PreparedAnyAngleGridBuilder
Preprocesses a static grid into an exact any-angle visibility-graph snapshot.
PreparedAnyAngleQueryDiagnostics
Per-query diagnostics for prepared any-angle search.
PreparedContinuousShortestPathMap
Precomputed visibility-graph distances from one fixed source.
PreparedFlowField
Prepared same-goal flow field (integration + direction per cell).
PreparedHPAStar
Prepared HPA* map implementing hierarchical and preprocessed search contracts.
PreparedJpsPlus
Prepared map implementing PreparedGridSearch for JPS+.
PreparedSubgoalGraph
Prepared subgoal graph implementing PreparedGridSearch.
PreparedTRAStar
Immutable prepared TRA* map wrapping a StaticPreparedNavmesh.
PreparedTRAStarPortalTransitionCache
Prepared TRA* with an eager map from directed cell transitions to portal midpoints.
PreparedTRAStarWaypointDatabaseAdaptiveLru
Prepared TRA* with a capacity-bounded single-tier LRU of portal midpoints.
PreparedTRAStarWaypointDatabaseCostAwareEviction
Prepared TRA* that evicts cached midpoints using cost-weighted signals (not recency alone).
PreparedTRAStarWaypointDatabaseFixedAdmissionThreshold
Prepared TRA* that gates cache admission on a fixed transition-cost threshold.
PreparedTRAStarWaypointDatabaseFixedDemotionRule
Prepared TRA* that demotes protected midpoints under a fixed overflow policy.
PreparedTRAStarWaypointDatabaseFixedPromotionRule
Prepared TRA* that promotes probation midpoints after a fixed hit count.
PreparedTRAStarWaypointDatabaseLazyQuery
Prepared TRA* that computes midpoints on demand without cross-query retention.
PreparedTRAStarWaypointDatabasePolicyProfile
Prepared TRA* bound to a named TRAStarWaypointDatabasePolicyProfile.
PreparedTRAStarWaypointDatabaseStatic
Prepared TRA* with an eager per-cell portal-midpoint waypoint database.
PreparedTRAStarWaypointDatabaseTwoTierLru
Prepared TRA* with probation/protected two-tier LRU midpoint cache.
PreprocessedGridMetadata
Build-time summary of grid shape, walkability, and movement model.
RectangularSymmetryReduction
Online Pathfinder: Rectangular Symmetry Reduction (RSR).
SearchBudget
Shared search-budget types used across problem models (owner: core). Caller-chosen expansion and/or wall-clock limits for one search.
SearchRequest
Start and goal cell endpoints for a single discrete grid search.
SearchStats
Work counters produced by a grid search (algorithm-defined node visits).
SolverPortfolio
Static recommendation facade over Condor’s current public problem models.
SolverPortfolioRecommendation
One static recommendation row from SolverPortfolio::catalog.
StaticPreparedGrid
Immutable grid snapshot with metadata for repeated online search.
StaticPreparedGridBuilder
Pass-through builder that clones the grid and delegates queries to AStar.
StaticPreparedNavmesh
Pass-through prepared snapshot owning a cloned navmesh and adjacency indexes.
StaticPreparedNavmeshBuilder
Starter builder that indexes neighbors and portals from a static navmesh.
SubgoalGraphBuilder
PreprocessedGridBuilder for sparse corner subgoal graphs.
TAStar
Stateless pathfinder: corridor BFS, funnel, then optional local portal-endpoint refinement.
TRAStarBuilder
Base TRA* preprocess: adjacency snapshot + corridor/funnel search, no waypoint cache.
TRAStarPortalTransitionCacheBuilder
Eager directed portal-midpoint table built at preprocess (no eviction).
TRAStarWaypointDatabaseAdaptiveLruBuilder
Capacity-bounded single-tier LRU of portal midpoints across queries (recency only).
TRAStarWaypointDatabaseCostAwareEvictionBuilder
Cost-weighted eviction of cached midpoints (recency blended with low-cost bias).
TRAStarWaypointDatabaseFixedAdmissionThresholdBuilder
Retain midpoints only when portal segment cost meets a fixed admission threshold.
TRAStarWaypointDatabaseFixedDemotionRuleBuilder
Fixed admission + promotion, with protected overflow that evicts (not demotes).
TRAStarWaypointDatabaseFixedPromotionRuleBuilder
Fixed admission threshold plus multi-hit promotion from probation to protected.
TRAStarWaypointDatabaseLazyQueryBuilder
Per-query lazy midpoints only—scratch storage discarded after each search.
TRAStarWaypointDatabasePolicyProfileBuilder
Preprocess builder that materializes a named TRAStarWaypointDatabasePolicyProfile.
TRAStarWaypointDatabaseStaticBuilder
Eager per-cell portal-midpoint waypoint lists (full static database, no eviction).
TRAStarWaypointDatabaseTwoTierLruBuilder
Two-tier probation/protected midpoint LRU; first hit promotes into protected.
TfsDiagnostics
Expansion counters collected only by TopologicalFractureSearch::inspect.
TfsInspection
Instrumented TFS outcome: pathfinder result plus expansion diagnostics.
ThetaStar
Online AnyAnglePathfinder using Theta* vertex expansion.
TopologicalFractureSearch
Online exact continuous pathfinder via topological fracture search.
VisibilityGraph
Online exact continuous pathfinder: visibility graph + Dijkstra.
WorldBounds
Axis-aligned rectangular world extent that bounds a PolygonScene.

Enums§

AnyAnglePathBuildError
Error returned when any-angle path construction violates invariants.
AnyAngleSearchError
Invalid any-angle search request or budget hard stop.
BudgetExhausted
Shared search-budget types used across problem models (owner: core). Why a search stopped for budget rather than completing found/no-path.
Cell
Walkability state of a single grid cell.
DynamicNavmeshUpdate
Single availability mutation applied to a DynamicNavmeshState.
DynamicPreparedNavmeshRebuildStatus
How a dynamic prepared query restored a fresh prepared snapshot.
FlowDirection
Cardinal step stored in a prepared flow field cell.
FlowFieldBuildError
Error when building a flow field.
GridBuildError
Error returned when a grid cannot be constructed.
GridEditError
Error returned when a requested grid edit violates grid invariants.
GridSearchError
Failure to execute a grid search request (request validation or hard stop).
GridStorage
Storage buffer that could not be allocated while constructing a grid.
HierarchicalGridBuildError
Hierarchical preprocess failed (cluster size or non-uniform costs).
InterpolatedExpectedKind
Expected outcome kind asserted by interpolated replan fixtures and oracles.
InterpolatedPathBuildError
Interpolated path construction failed.
InterpolatedPathOutcome
Path quality returned by an interpolated search (full, partial, or fallback).
InterpolatedPathOutcomeKind
Discriminant for InterpolatedPathOutcome without owning the path.
InterpolatedQueryResult
Connectivity probe for fractional endpoints mapped onto discrete cells.
InterpolatedSearchError
Invalid interpolated-search request or uninitialized replanner state.
InterpolatedTraversalCostModel
Cost model for continuous polylines over a discrete weighted grid.
MapfConflict
Validation issue or conflict found in a MAPF plan.
MapfObjective
Objective label used by the MAPF validation foundation.
MapfStarterPlannerFailure
Explicit bounded-failure reason for the starter planner.
MapfStarterPlannerOutcome
Explicit solved or failed starter-planner outcome.
NavmeshQueryResult
Connectivity outcome for a start/goal pair (no geometric path polyline).
NavmeshSearchError
Failure to validate or prepare a navmesh route search request.
PathBuildError
Path construction failed because the step list was empty or otherwise invalid.
PolygonEndpoint
Endpoint role carried by PolygonValidationError::EndpointNotTraversable.
PolygonPathBuildError
Polygon path construction failed (empty polyline or invariant violation).
PolygonSearchError
Request rejected before search, or budget hard stop mid-search.
PolygonShortestPathMapBuildError
Preprocess failed before a prepared map could be produced.
PolygonValidationError
Static geometry or endpoint validation failure for polygonal scenes.
PreparedAnyAngleBenchmarkAdmission
Default-measurement classification for the prepared-v2 Criterion lane.
PreparedAnyAngleGridBuildError
Error returned when prepared any-angle preprocessing fails.
PreparedNavmeshBuildError
Prepared navmesh preprocess failed because the source mesh failed validation.
PreprocessedGridBuildError
Error returned when static grid preprocessing fails.
SearchOutcome
Successful search computation, separate from request validation failures.
SolverRecommendationStatus
Stability signal for a SolverPortfolioRecommendation.
SolverSurface
Named public surface recommended for a given SolverUseCase.
SolverUseCase
Problem-model bucket used by SolverPortfolio recommendations.
TRAStarWaypointDatabasePolicyProfile
Named admission / promotion / demotion parameter bundle for the curated policy lane.

Constants§

PREPARED_ANY_ANGLE_CSR_U32_INDEX_LIMIT
Maximum CSR neighbor/weight index storable in u32.
PREPARED_ANY_ANGLE_DEFAULT_BENCHMARK_NODE_BUDGET
Maximum retained-node count measured by the default prepared-v2 Criterion lane.
PREPARED_ANY_ANGLE_DIRECTED_EDGE_BUDGET
Conservative upper bound on possible directed visibility edges.
PREPARED_ANY_ANGLE_NODE_BUDGET
Maximum prepared visibility nodes supported by the v0 repeated-query lane.
PREPARED_ANY_ANGLE_RETAINED_BYTES_BUDGET
Conservative upper bound on preprocess-retained bytes (vertices + CSR).

Traits§

AnyAnglePathfinder
Online any-angle algorithm entrypoint for static blocked grids.
GridReplanner
Discrete-grid replanner: initialize once, apply cell/cost deltas, then replan.
HierarchicalGridBuilder
Preprocesses a static grid into a hierarchical search structure.
InterpolatedGridReplanner
Continuous-coordinate replanner over a discrete grid backing store.
InterpolatedMovingGoalReplanner
Interpolated replanner lane that also accepts moving-goal updates between replans.
NavmeshPathfinder
Online route search over a validated static Navmesh snapshot.
Pathfinder
Online algorithm entrypoint for static 4-connected grid search.
PolygonPathfinder
Online exact pathfinder over a static polygonal obstacle scene.
PolygonShortestPathMap
Prepared map that answers shortest-path queries from a fixed source.
PolygonShortestPathMapBuilder
Preprocesses a polygon scene into a source-rooted shortest-path map.
PreparedGridSearch
Prepared static grid that answers repeated point-to-point search requests.
PreparedHierarchicalGrid
Immutable hierarchical map that answers point-to-point grid searches.
PreparedNavmesh
Immutable prepared navmesh snapshot with fast adjacency and portal lookup.
PreparedNavmeshBuilder
Preprocesses a validated static navmesh into an immutable prepared map.
PreprocessedGridBuilder
Preprocesses a static grid into a queryable prepared map.
SearchPathCost
Path value that exposes the cost reported by its search domain.
SearchVisitStats
Search statistics that expose an algorithm-defined node-visit count.

Functions§

best_fallback_interpolated_path
Fallback path when only the start cell is reachable (degenerate partial path).
best_partial_interpolated_path
Best partial path toward an unreachable goal: route to the closest reachable cell.
interpolated_path_cost
Total cost of a continuous polyline under cost_model, if every segment is valid.
interpolated_segment_cost
Cost of one continuous segment under cost_model, if both ends map onto the grid.
query_interpolated_grid
Maps fractional start/goal onto cells and tests 4-connected reachability.

Type Aliases§

AnyAngleSearchResult
Validated result of an any-angle search.
InterpolatedSearchResult
Validation error or search outcome for the interpolated lane.
NavmeshPath
Geometric navmesh route; same continuous polyline type as polygonal free-space paths.
NavmeshSearchResult
Navmesh route return type: validation / budget Err, or found/no-path with stats.
PolygonSearchResult
Polygonal search return type: validation / budget Err, or found/no-path with stats.
SearchResult
Grid search return type: validation error, or found/no-path with stats.