How holosion/ai_search works
This repository is a collection of standalone AI search and constraint-satisfaction examples, not a unified application. The common user workflow is to provide a maze or graph (or an optimization/CSP setup), run an algorithm, and inspect a path, solution, or search result. The graph keeps those independent examples separate; sampled files support the BFS, DFS, A*, greedy, uniform-cost, hill-climbing, and backtracking details. Other listed algorithms are represented at their tree-supported paths, without inferring their internal wiring.
Main entry points: backtracking.py Backtracking CSP · breadth_first.py Breadth-first search · depth.py Depth-first search · search2.py General maze DFS
Components 16
Maze Search
- Breadth-first search
Breadth_First_Search/breadth_first.py - Depth-first search
Depth_First_Search/depth.py - General maze DFS
General_Search/search2.py - Depth-limited search
Depth_First_Search/depth_limit.py
Graph Search
- A* search
A star search/A.py - A* variant
Other_Search_Algorithms/A_search.py - Greedy best-first
gready_best_search/greedy.py - Uniform-cost search
uniformcostsearch/uniform.py
Optimization
- Hill climbing
hillclimbing.py
Constraint Satisfaction
- Backtracking CSP
CSP/backtracking.py - Forward-checking CSP
CSP/forward_checking.py
Other components
- Algorithm user
- Constraint package
- Path result
- Best state
- Assignments
Connections 22
- Algorithm user → Breadth-first search: runs maze search
- Breadth-first search → Path result: returns shortest path
- Algorithm user → Depth-first search: runs maze search
- Depth-first search → Path result: returns path
- Algorithm user → General maze DFS: runs maze search
- General maze DFS → Path result: returns path
- Algorithm user → Depth-limited search: sets graph and limit
- Depth-limited search → Path result: returns path
- Algorithm user → A* search: supplies graph and heuristic
- A* search → Path result: returns path
- Algorithm user → A* variant: supplies graph and heuristic
- A* variant → Path result: returns path
- Algorithm user → Greedy best-first: supplies graph and heuristic
- Greedy best-first → Path result: returns path
- Algorithm user → Uniform-cost search: supplies weighted graph
- Uniform-cost search → Path result: returns cost
- Algorithm user → Hill climbing: sets objective and start
- Hill climbing → Best state: returns state and value
- Algorithm user → Backtracking CSP: defines variables and constraints
- Backtracking CSP → Constraint package: calls solver
- Backtracking CSP → Assignments: prints solutions
- Algorithm user → Forward-checking CSP: runs CSP example