# aicyraa/alpha-beta-pruning architecture

> Architecture diagram of the GitHub repository aicyraa/alpha-beta-pruning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aicyraa/alpha-beta-pruning
- Repository: https://github.com/aicyraa/alpha-beta-pruning

## Overview

This is a small TypeScript tic-tac-toe game engine. The entry point creates a game and submits a fixed sequence of human moves; each strike updates the board, checks the result, and—if play continues—selects and applies an AI move using minimax. The engine also exposes status and reset methods. The README is empty, so this map is based on the sampled source; the fixed-move entry point is not a separate interactive interface.

Main entry points: [`src/lib/game.ts`](https://github.com/aicyraa/alpha-beta-pruning/blob/main/src/lib/game.ts) (Game Engine), [`src/index.ts`](https://github.com/aicyraa/alpha-beta-pruning/blob/main/src/index.ts) (Move Demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_entry["Move Demo<br/>[index.ts]"]
node_game["Game Engine<br/>[game.ts]"]
node_strategy["Minimax AI<br/>[game.ts]"]

node_entry -->|"creates and strikes"| node_game
node_game -->|"selects AI move"| node_strategy

click node_entry "https://github.com/aicyraa/alpha-beta-pruning/blob/main/src/index.ts"
click node_game "https://github.com/aicyraa/alpha-beta-pruning/blob/main/src/lib/game.ts"
click node_strategy "https://github.com/aicyraa/alpha-beta-pruning/blob/main/src/lib/game.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_entry,node_game,node_strategy toneTeal
```

## Components

### Other components

- [Move Demo](https://github.com/aicyraa/alpha-beta-pruning/blob/main/src/index.ts): `src/index.ts`
- [Game Engine](https://github.com/aicyraa/alpha-beta-pruning/blob/main/src/lib/game.ts): `src/lib/game.ts`
- [Minimax AI](https://github.com/aicyraa/alpha-beta-pruning/blob/main/src/lib/game.ts): `src/lib/game.ts`

## Connections

- Move Demo → Game Engine: creates and strikes (evidence: `src/index.ts`)
- Game Engine → Minimax AI: selects AI move (evidence: `src/lib/game.ts`)
