# lucasmalkowski56-glitch/worlde-solver architecture

> Architecture diagram of the GitHub repository lucasmalkowski56-glitch/worlde-solver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lucasmalkowski56-glitch/worlde-solver
- Repository: https://github.com/lucasmalkowski56-glitch/worlde-solver

## Overview

This is a Python Wordle game and solver: the terminal workflow loads word lists, accepts guesses, and returns colored feedback; the comparison workflow evaluates heuristic and entropy-based solvers against simulated games. The graph preserves the game rules, feedback, candidate filtering, both solver strategies, word loading, and evaluation. Edges are limited to calls and data flows visible in the excerpts or README; unsampled data files are represented by their enclosing directory.

Main entry points: [`play.py`](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/play.py) (Terminal play), [`wordle/evaluate.py`](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/evaluate.py) (Game evaluation), [`compare.py`](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/compare.py) (Solver comparison), [`wordle/entropy.py`](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/entropy.py) (Entropy solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and evaluation"]
  node_terminal["Terminal play<br/>[play.py]"]
  node_comparison["Solver comparison<br/>[compare.py]"]
  node_evaluation["Game evaluation<br/>[evaluate.py]"]
end

subgraph group_game["Wordle game"]
  node_word_loader["Word-list loader<br/>[words.py]"]
  node_word_data["English word lists"]
  node_game_engine["Game state<br/>[game.py]"]
  node_feedback["Feedback rules<br/>[feedback.py]"]
  node_pattern_display["Pattern display<br/>[feedback.py]"]
end

subgraph group_solvers["Solver strategies"]
  node_constraints["Candidate constraints<br/>[filter.py]"]
  node_heuristic["Heuristic solver<br/>[heuristic.py]"]
  node_entropy["Entropy solver<br/>[entropy.py]"]
  node_pattern_cache["Pattern cache<br/>[entropy.py]"]
end

node_player(("Player"))

node_player -->|"enters guesses"| node_terminal
node_terminal -->|"loads lists"| node_word_loader
node_word_loader -->|"reads words"| node_word_data
node_terminal -->|"submits guesses"| node_game_engine
node_game_engine -->|"computes feedback"| node_feedback
node_terminal -->|"formats feedback"| node_pattern_display
node_comparison -->|"loads lists"| node_word_loader
node_comparison -->|"loads or builds"| node_pattern_cache
node_entropy -->|"reads and writes"| node_pattern_cache
node_entropy -->|"builds patterns"| node_feedback
node_comparison -->|"evaluates solvers"| node_evaluation
node_evaluation -->|"requests guesses and updates"| node_heuristic
node_evaluation -->|"requests guesses and updates"| node_entropy
node_evaluation -->|"simulates games"| node_game_engine
node_heuristic -->|"filters candidates"| node_constraints
node_constraints -->|"uses color constants"| node_feedback

click node_terminal "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/play.py"
click node_comparison "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/compare.py"
click node_evaluation "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/evaluate.py"
click node_word_loader "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/words.py"
click node_word_data "https://github.com/lucasmalkowski56-glitch/worlde-solver/tree/main/data/en"
click node_game_engine "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/game.py"
click node_feedback "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/feedback.py"
click node_pattern_display "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/feedback.py"
click node_constraints "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/filter.py"
click node_heuristic "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/heuristic.py"
click node_entropy "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/entropy.py"
click node_pattern_cache "https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/entropy.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_terminal,node_comparison,node_evaluation toneBlue
class node_word_loader,node_word_data,node_game_engine,node_feedback,node_pattern_display toneAmber
class node_constraints,node_heuristic,node_entropy,node_pattern_cache toneMint
class node_player toneIndigo
```

## Components

### Entry and evaluation

- [Terminal play](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/play.py): `play.py`
- [Solver comparison](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/compare.py): `compare.py`
- [Game evaluation](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/evaluate.py): `wordle/evaluate.py`

### Wordle game

- [Word-list loader](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/words.py): `wordle/words.py`
- [English word lists](https://github.com/lucasmalkowski56-glitch/worlde-solver/tree/main/data/en): `data/en`
- [Game state](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/game.py): `wordle/game.py`
- [Feedback rules](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/feedback.py): `wordle/feedback.py`
- [Pattern display](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/feedback.py): `wordle/feedback.py`

### Solver strategies

- [Candidate constraints](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/filter.py): `wordle/filter.py`
- [Heuristic solver](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/heuristic.py): `wordle/heuristic.py`
- [Entropy solver](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/entropy.py): `wordle/entropy.py`
- [Pattern cache](https://github.com/lucasmalkowski56-glitch/worlde-solver/blob/main/wordle/entropy.py): `wordle/entropy.py`

### Other components

- **Player**

## Connections

- Player → Terminal play: enters guesses (evidence: `play.py`)
- Terminal play → Word-list loader: loads lists (evidence: `play.py`)
- Word-list loader → English word lists: reads words (evidence: `wordle/words.py`)
- Terminal play → Game state: submits guesses (evidence: `play.py`)
- Game state → Feedback rules: computes feedback (evidence: `wordle/game.py`)
- Terminal play → Pattern display: formats feedback (evidence: `play.py`)
- Solver comparison → Word-list loader: loads lists (evidence: `compare.py`)
- Solver comparison → Pattern cache: loads or builds (evidence: `compare.py`)
- Entropy solver → Pattern cache: reads and writes (evidence: `wordle/entropy.py`)
- Entropy solver → Feedback rules: builds patterns (evidence: `wordle/entropy.py`)
- Solver comparison → Game evaluation: evaluates solvers (evidence: `compare.py`)
- Game evaluation → Heuristic solver: requests guesses and updates (evidence: `wordle/evaluate.py`)
- Game evaluation → Entropy solver: requests guesses and updates (evidence: `wordle/evaluate.py`)
- Game evaluation → Game state: simulates games (evidence: `wordle/evaluate.py`)
- Heuristic solver → Candidate constraints: filters candidates (evidence: `wordle/heuristic.py`)
- Candidate constraints → Feedback rules: uses color constants (evidence: `wordle/filter.py`)
