# monadewidar/theseus-a-graph-traversal-maze-solver architecture

> Architecture diagram of the GitHub repository monadewidar/theseus-a-graph-traversal-maze-solver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/monadewidar/theseus-a-graph-traversal-maze-solver
- Repository: https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver

## Overview

Theseus is a desktop, interactive maze-search visualizer. A user generates or edits a weighted grid, selects BFS, DFS, Dijkstra, or A*, and watches the search advance step by step; the app also reports search statistics and can compare all four algorithms. The graph separates interaction, maze modeling, generation, and search. Several UI details and the search setup are in unsampled portions of main.py, so those links rely on the README’s product description rather than inspected call sites.

Main entry points: [`main.py`](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py) (Application controller), [`Algorithms.py`](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Algorithms.py) (Search algorithms), [`Grid.py`](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Grid.py) (Grid and cells), [`Maze_Generation.py`](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Maze_Generation.py) (Maze carving)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Desktop interaction"]
  node_app["Application controller<br/>[main.py]"]
  node_maze_editor["Maze editing<br/>[main.py]"]
  node_search_animation["Search animation<br/>[main.py]"]
  node_statistics["Search statistics<br/>[main.py]"]
  node_comparison["Algorithm comparison<br/>[main.py]"]
end

subgraph group_model["Maze model"]
  node_grid["Grid and cells<br/>[Grid.py]"]
end

subgraph group_generation["Maze generation"]
  node_maze_generator["Maze carving<br/>[Maze_Generation.py]"]
  node_weight_placement["Weight placement<br/>[Maze_Generation.py]"]
end

subgraph group_search["Path search"]
  node_algorithms["Search algorithms<br/>[Algorithms.py]"]
  node_path_cost["Path cost<br/>[Algorithms.py]"]
end

node_user(("Maze solver user"))

node_user -->|"operates"| node_app
node_app -->|"generates maze"| node_maze_generator
node_app -->|"adds weights"| node_weight_placement
node_app -->|"manages grid"| node_grid
node_app -->|"edits maze"| node_maze_editor
node_app -->|"advances search"| node_search_animation
node_app -->|"runs searches"| node_algorithms
node_app -->|"compares algorithms"| node_comparison
node_search_animation -->|"reports progress"| node_statistics
node_comparison -->|"runs each"| node_algorithms
node_comparison -->|"reports results"| node_statistics
node_maze_generator -->|"carves cells"| node_grid
node_weight_placement -->|"sets cell costs"| node_grid
node_algorithms -->|"reads neighbors"| node_grid
node_algorithms -->|"reconstructs path"| node_path_cost
node_app -->|"calculates path cost"| node_path_cost

click node_app "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py"
click node_maze_editor "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py"
click node_search_animation "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py"
click node_statistics "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py"
click node_comparison "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py"
click node_grid "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Grid.py"
click node_maze_generator "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Maze_Generation.py"
click node_weight_placement "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Maze_Generation.py"
click node_algorithms "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Algorithms.py"
click node_path_cost "https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Algorithms.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_maze_editor,node_search_animation,node_statistics,node_comparison,node_user toneBlue
class node_grid toneAmber
class node_maze_generator,node_weight_placement toneMint
class node_algorithms,node_path_cost toneRose
```

## Components

### Desktop interaction

- [Application controller](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py): `main.py`
- [Maze editing](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py): `main.py`
- [Search animation](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py): `main.py`
- [Search statistics](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py): `main.py`
- [Algorithm comparison](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/main.py): `main.py`

### Maze model

- [Grid and cells](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Grid.py): `Grid.py`

### Maze generation

- [Maze carving](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Maze_Generation.py): `Maze_Generation.py`
- [Weight placement](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Maze_Generation.py): `Maze_Generation.py`

### Path search

- [Search algorithms](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Algorithms.py): `Algorithms.py`
- [Path cost](https://github.com/monadewidar/theseus-a-graph-traversal-maze-solver/blob/master/Algorithms.py): `Algorithms.py`

### Other components

- **Maze solver user**

## Connections

- Maze solver user → Application controller: operates (evidence: `README.md`)
- Application controller → Maze carving: generates maze (evidence: `main.py`)
- Application controller → Weight placement: adds weights (evidence: `main.py`)
- Application controller → Grid and cells: manages grid (evidence: `main.py`)
- Application controller → Maze editing: edits maze (evidence: `README.md`)
- Application controller → Search animation: advances search (evidence: `main.py`)
- Application controller → Search algorithms: runs searches (evidence: `README.md`)
- Application controller → Algorithm comparison: compares algorithms (evidence: `README.md`)
- Search animation → Search statistics: reports progress (evidence: `README.md`)
- Algorithm comparison → Search algorithms: runs each (evidence: `main.py`)
- Algorithm comparison → Search statistics: reports results (evidence: `README.md`)
- Maze carving → Grid and cells: carves cells (evidence: `Maze_Generation.py`)
- Weight placement → Grid and cells: sets cell costs (evidence: `Maze_Generation.py`)
- Search algorithms → Grid and cells: reads neighbors (evidence: `Algorithms.py`)
- Search algorithms → Path cost: reconstructs path (evidence: `Algorithms.py`)
- Application controller → Path cost: calculates path cost (evidence: `README.md`)
