v0.1.0 — Initial release
First public release of PATHOS — a problem-centric library of classical AI search algorithms for Python.
You declare your problem's structure (via decorator hooks on a Space); the auto-solver picks the most powerful compatible algorithm. No machine learning — pure search.
Highlights
Anytime delivery by default. space.solver().solve() runs a cascade [GreedyBestFirst → WeightedAStar(5,3,2,1.5) → AStar], keeping the best incumbent across phases. Optimal if the budget allows; best-effort otherwise — never not_found when a feasible path exists. Default budget is 1 hour; set solver(timeout=…) to bound it tighter.
Cooperative cancellation across every algorithm. A lightweight CancelToken is checked inside the main loop of every metaheuristic and path-search algorithm. Set a timeout on a GeneticAlgorithm and you get the best individual seen so far when time runs out — not not_found.
Three execution modes:
mode="auto"(default) — anytime cascade.mode="exact"— single-shot admissible algorithm (pre-cascade behaviour).mode="approximate"— single-shot bounded-suboptimal A* variant.
Quality bound exposed. SearchResult.epsilon distinguishes proven-optimal (1.0) from ε-bounded (>1.0) from unbounded (inf). result.optimal is the derived convenience boolean.
Coverage
- Uninformed: BFS, DFS, IDDFS, UCS
- Informed: A*, IDA*, WeightedA*, BidirectionalA*, GreedyBestFirst
- Meta: AnytimeAStar (the cascade above, registered as a normal
Algorithm) - Local search: HillClimbing, TabuSearch, LocalBeamSearch
- Evolutionary / Metaheuristic: SimulatedAnnealing, GeneticAlgorithm, DifferentialEvolution, ParticleSwarm
- Adversarial: Minimax, AlphaBeta, Negamax, MCTS
- CSP: Backtracking, ForwardChecking, MinConflicts
Specialized spaces: GraphSpace, CSPSpace, TourSpace, GameSpace.
Installation
pip install pathos-aiPython 3.11+. MIT license.
Documentation
- Site: https://uhgia.org/pathos/
- Guides: Modes & Anytime delivery · Cancel-token protocol
- API reference: https://uhgia.org/pathos/api/algorithms/