# rodak123/wordle-arena architecture

> Architecture diagram of the GitHub repository rodak123/wordle-arena, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rodak123/wordle-arena
- Repository: https://github.com/rodak123/wordle-arena

## Overview

Wordle Bot Arena runs a set of solver bots against a chosen solution, compares their results, and produces a visual and textual report, optionally delivered to Discord. The main entry points cover today’s puzzle, a random puzzle, or a specified word; a cron entry point schedules recurring runs. Solver implementations share a base class that validates guesses, evaluates feedback, and records timing and outcomes. The README also documents custom bots and the included solver variants. Links reflect shown calls and README capabilities; unsampled benchmark and scheduling internals are represented only where their paths are explicit.

Main entry points: [`src/daily.ts`](https://github.com/rodak123/wordle-arena/blob/main/src/daily.ts) (Daily run), [`src/random.ts`](https://github.com/rodak123/wordle-arena/blob/main/src/random.ts) (Random run), [`src/word.ts`](https://github.com/rodak123/wordle-arena/blob/main/src/word.ts) (Specified-word run), [`src/bots/bots.ts`](https://github.com/rodak123/wordle-arena/blob/main/src/bots/bots.ts) (Bot registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runs["Arena Runs"]
  node_daily["Daily run<br/>[daily.ts]"]
  node_random["Random run<br/>[random.ts]"]
  node_customword["Specified-word run<br/>[word.ts]"]
  node_scheduler["Daily scheduler<br/>[dailyCron.ts]"]
  node_runner["Bot runner<br/>[WordleBotRunner.ts]"]
end

subgraph group_solvers["Solver Bots"]
  node_botregistry["Bot registry<br/>[bots.ts]"]
  node_solverbase["Solver lifecycle<br/>[ASolverBot.ts]"]
  node_randomsolver["Random solver<br/>[RandomSolverBot.ts]"]
  node_cheater["Cheating solver<br/>[CheatingBot.ts]"]
  node_horsle["Horsle solver<br/>[HorsleBot.ts]"]
  node_pattern["Pattern solver<br/>[PatternBot.ts]"]
  node_lookup["Lookup solver<br/>[LookupTableBot.ts]"]
end

subgraph group_wordle["Wordle Engine"]
  node_wordle["Puzzle and feedback<br/>[Wordle.ts]"]
  node_wordlist["Allowed word list<br/>[wordle-list.json]"]
end

subgraph group_results["Results and Delivery"]
  node_resultmodel["Bot outcomes<br/>[BotResult.ts]"]
  node_report["Text report<br/>[ResultsReport.ts]"]
  node_overview["Overview image<br/>[OverviewImage.ts]"]
  node_imageoutput["Image output<br/>[OutputImage.ts]"]
  node_discord["Discord webhooks<br/>[DiscordBot.ts]"]
end

subgraph group_benchmark["Benchmarks"]
  node_benchmark["Benchmark run<br/>[benchmark.ts]"]
  node_benchmarkimage["Benchmark image<br/>[BenchmarkImage.ts]"]
end

node_user(("Arena operator"))
node_discordservice(("Discord"))

node_user -->|"starts"| node_daily
node_user -->|"starts"| node_random
node_user -->|"starts"| node_customword
node_scheduler -.->|"schedules"| node_daily
node_daily -->|"loads daily"| node_wordle
node_random -->|"loads random"| node_wordle
node_customword -->|"sets solution"| node_wordle
node_daily -->|"creates bots"| node_botregistry
node_random -->|"creates bots"| node_botregistry
node_customword -->|"creates bots"| node_botregistry
node_botregistry -->|"instantiates"| node_randomsolver
node_botregistry -->|"instantiates"| node_cheater
node_botregistry -->|"instantiates"| node_horsle
node_botregistry -->|"instantiates"| node_pattern
node_botregistry -->|"instantiates"| node_lookup
node_daily -->|"runs bots"| node_runner
node_random -->|"runs bots"| node_runner
node_customword -->|"runs bots"| node_runner
node_runner -->|"invokes solve"| node_solverbase
node_solverbase -->|"validates and scores"| node_wordle
node_solverbase -->|"builds outcome"| node_resultmodel
node_wordle -->|"loads words"| node_wordlist
node_runner -->|"provides results"| node_daily
node_runner -->|"provides results"| node_random
node_runner -->|"provides results"| node_customword
node_daily -->|"generates report"| node_report
node_random -->|"generates report"| node_report
node_customword -->|"generates report"| node_report
node_daily -->|"generates image"| node_overview
node_random -->|"generates image"| node_overview
node_customword -->|"generates image"| node_overview
node_overview -->|"sets image"| node_imageoutput
node_daily -->|"sends report"| node_discord
node_random -->|"sends report"| node_discord
node_customword -->|"sends report"| node_discord
node_discord -->|"posts webhook"| node_discordservice
node_benchmark -.->|"generates benchmark"| node_benchmarkimage
node_benchmarkimage -->|"uses output"| node_imageoutput

click node_daily "https://github.com/rodak123/wordle-arena/blob/main/src/daily.ts"
click node_random "https://github.com/rodak123/wordle-arena/blob/main/src/random.ts"
click node_customword "https://github.com/rodak123/wordle-arena/blob/main/src/word.ts"
click node_scheduler "https://github.com/rodak123/wordle-arena/blob/main/src/dailyCron.ts"
click node_botregistry "https://github.com/rodak123/wordle-arena/blob/main/src/bots/bots.ts"
click node_solverbase "https://github.com/rodak123/wordle-arena/blob/main/src/core/bot/ASolverBot.ts"
click node_randomsolver "https://github.com/rodak123/wordle-arena/blob/main/src/bots/randomBot/RandomSolverBot.ts"
click node_cheater "https://github.com/rodak123/wordle-arena/blob/main/src/bots/cheatingBot/CheatingBot.ts"
click node_horsle "https://github.com/rodak123/wordle-arena/blob/main/src/bots/horsleBot/HorsleBot.ts"
click node_pattern "https://github.com/rodak123/wordle-arena/blob/main/src/bots/patternBot/PatternBot.ts"
click node_lookup "https://github.com/rodak123/wordle-arena/blob/main/src/bots/lookupTableBot/LookupTableBot.ts"
click node_wordle "https://github.com/rodak123/wordle-arena/blob/main/src/core/nytimes/Wordle.ts"
click node_wordlist "https://github.com/rodak123/wordle-arena/blob/main/src/data/wordle-list.json"
click node_runner "https://github.com/rodak123/wordle-arena/blob/main/src/core/WordleBotRunner.ts"
click node_resultmodel "https://github.com/rodak123/wordle-arena/blob/main/src/core/bot/BotResult.ts"
click node_report "https://github.com/rodak123/wordle-arena/blob/main/src/core/utils/ResultsReport.ts"
click node_overview "https://github.com/rodak123/wordle-arena/blob/main/src/core/canvas/overviewImage/OverviewImage.ts"
click node_imageoutput "https://github.com/rodak123/wordle-arena/blob/main/src/core/canvas/OutputImage.ts"
click node_discord "https://github.com/rodak123/wordle-arena/blob/main/src/core/discord/DiscordBot.ts"
click node_benchmark "https://github.com/rodak123/wordle-arena/blob/main/src/benchmark.ts"
click node_benchmarkimage "https://github.com/rodak123/wordle-arena/blob/main/src/core/canvas/benchmarkImage/BenchmarkImage.ts"

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_daily,node_random,node_customword,node_scheduler,node_runner toneBlue
class node_botregistry,node_solverbase,node_randomsolver,node_cheater,node_horsle,node_pattern,node_lookup toneAmber
class node_wordle,node_wordlist toneMint
class node_resultmodel,node_report,node_overview,node_imageoutput,node_discord toneRose
class node_benchmark,node_benchmarkimage,node_user,node_discordservice toneIndigo
```

## Components

### Arena Runs

- [Daily run](https://github.com/rodak123/wordle-arena/blob/main/src/daily.ts): `src/daily.ts`
- [Random run](https://github.com/rodak123/wordle-arena/blob/main/src/random.ts): `src/random.ts`
- [Specified-word run](https://github.com/rodak123/wordle-arena/blob/main/src/word.ts): `src/word.ts`
- [Daily scheduler](https://github.com/rodak123/wordle-arena/blob/main/src/dailyCron.ts): `src/dailyCron.ts`
- [Bot runner](https://github.com/rodak123/wordle-arena/blob/main/src/core/WordleBotRunner.ts): `src/core/WordleBotRunner.ts`

### Solver Bots

- [Bot registry](https://github.com/rodak123/wordle-arena/blob/main/src/bots/bots.ts): `src/bots/bots.ts`
- [Solver lifecycle](https://github.com/rodak123/wordle-arena/blob/main/src/core/bot/ASolverBot.ts): `src/core/bot/ASolverBot.ts`
- [Random solver](https://github.com/rodak123/wordle-arena/blob/main/src/bots/randomBot/RandomSolverBot.ts): `src/bots/randomBot/RandomSolverBot.ts`
- [Cheating solver](https://github.com/rodak123/wordle-arena/blob/main/src/bots/cheatingBot/CheatingBot.ts): `src/bots/cheatingBot/CheatingBot.ts`
- [Horsle solver](https://github.com/rodak123/wordle-arena/blob/main/src/bots/horsleBot/HorsleBot.ts): `src/bots/horsleBot/HorsleBot.ts`
- [Pattern solver](https://github.com/rodak123/wordle-arena/blob/main/src/bots/patternBot/PatternBot.ts): `src/bots/patternBot/PatternBot.ts`
- [Lookup solver](https://github.com/rodak123/wordle-arena/blob/main/src/bots/lookupTableBot/LookupTableBot.ts): `src/bots/lookupTableBot/LookupTableBot.ts`

### Wordle Engine

- [Puzzle and feedback](https://github.com/rodak123/wordle-arena/blob/main/src/core/nytimes/Wordle.ts): `src/core/nytimes/Wordle.ts`
- [Allowed word list](https://github.com/rodak123/wordle-arena/blob/main/src/data/wordle-list.json): `src/data/wordle-list.json`

### Results and Delivery

- [Bot outcomes](https://github.com/rodak123/wordle-arena/blob/main/src/core/bot/BotResult.ts): `src/core/bot/BotResult.ts`
- [Text report](https://github.com/rodak123/wordle-arena/blob/main/src/core/utils/ResultsReport.ts): `src/core/utils/ResultsReport.ts`
- [Overview image](https://github.com/rodak123/wordle-arena/blob/main/src/core/canvas/overviewImage/OverviewImage.ts): `src/core/canvas/overviewImage/OverviewImage.ts`
- [Image output](https://github.com/rodak123/wordle-arena/blob/main/src/core/canvas/OutputImage.ts): `src/core/canvas/OutputImage.ts`
- [Discord webhooks](https://github.com/rodak123/wordle-arena/blob/main/src/core/discord/DiscordBot.ts): `src/core/discord/DiscordBot.ts`

### Benchmarks

- [Benchmark run](https://github.com/rodak123/wordle-arena/blob/main/src/benchmark.ts): `src/benchmark.ts`
- [Benchmark image](https://github.com/rodak123/wordle-arena/blob/main/src/core/canvas/benchmarkImage/BenchmarkImage.ts): `src/core/canvas/benchmarkImage/BenchmarkImage.ts`

### Other components

- **Arena operator**
- **Discord**

## Connections

- Arena operator → Daily run: starts (evidence: `README.md`)
- Arena operator → Random run: starts (evidence: `README.md`)
- Arena operator → Specified-word run: starts (evidence: `README.md`)
- Daily scheduler → Daily run: schedules (evidence: `src/dailyCron.ts`)
- Daily run → Puzzle and feedback: loads daily (evidence: `src/daily.ts`)
- Random run → Puzzle and feedback: loads random (evidence: `src/random.ts`)
- Specified-word run → Puzzle and feedback: sets solution (evidence: `src/word.ts`)
- Daily run → Bot registry: creates bots (evidence: `src/daily.ts`)
- Random run → Bot registry: creates bots (evidence: `src/random.ts`)
- Specified-word run → Bot registry: creates bots (evidence: `src/word.ts`)
- Bot registry → Random solver: instantiates (evidence: `src/bots/bots.ts`)
- Bot registry → Cheating solver: instantiates (evidence: `src/bots/bots.ts`)
- Bot registry → Horsle solver: instantiates (evidence: `src/bots/bots.ts`)
- Bot registry → Pattern solver: instantiates (evidence: `src/bots/bots.ts`)
- Bot registry → Lookup solver: instantiates (evidence: `src/bots/bots.ts`)
- Daily run → Bot runner: runs bots (evidence: `src/daily.ts`)
- Random run → Bot runner: runs bots (evidence: `src/random.ts`)
- Specified-word run → Bot runner: runs bots (evidence: `src/word.ts`)
- Bot runner → Solver lifecycle: invokes solve (evidence: `src/core/WordleBotRunner.ts`)
- Solver lifecycle → Puzzle and feedback: validates and scores (evidence: `src/core/bot/ASolverBot.ts`)
- Solver lifecycle → Bot outcomes: builds outcome (evidence: `src/core/bot/ASolverBot.ts`)
- Puzzle and feedback → Allowed word list: loads words (evidence: `src/core/nytimes/Wordle.ts`)
- Bot runner → Daily run: provides results (evidence: `src/daily.ts`)
- Bot runner → Random run: provides results (evidence: `src/random.ts`)
- Bot runner → Specified-word run: provides results (evidence: `src/word.ts`)
- Daily run → Text report: generates report (evidence: `src/daily.ts`)
- Random run → Text report: generates report (evidence: `src/random.ts`)
- Specified-word run → Text report: generates report (evidence: `src/word.ts`)
- Daily run → Overview image: generates image (evidence: `src/daily.ts`)
- Random run → Overview image: generates image (evidence: `src/random.ts`)
- Specified-word run → Overview image: generates image (evidence: `src/word.ts`)
- Overview image → Image output: sets image (evidence: `src/core/canvas/overviewImage/OverviewImage.ts`)
- Daily run → Discord webhooks: sends report (evidence: `src/daily.ts`)
- Random run → Discord webhooks: sends report (evidence: `src/random.ts`)
- Specified-word run → Discord webhooks: sends report (evidence: `src/word.ts`)
- Discord webhooks → Discord: posts webhook (evidence: `src/core/discord/DiscordBot.ts`)
- Benchmark run → Benchmark image: generates benchmark (evidence: `src/core/canvas/benchmarkImage/BenchmarkImage.ts`)
- Benchmark image → Image output: uses output (evidence: `src/core/canvas/benchmarkImage/BenchmarkImage.ts`)
