# sharanmankala/collision-club architecture

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

- Interactive diagram: https://gitdiagram.com/sharanmankala/collision-club
- Repository: https://github.com/sharanmankala/collision-club

## Overview

Collision Club is a browser-based rock-paper-scissors arena game: players start and observe a match while three AI-controlled teams move, collect power-ups, and compete to be the last standing. The README also identifies a training mode; the sampled training runner uses the learning module to train and evaluate policies. Source excerpts do not show the browser-side call flow, so those runtime relationships are documented only at the level the README supports.

Main entry points: [`dist/index.html`](https://github.com/sharanmankala/collision-club/blob/main/dist/index.html) (Game Page), [`dist/agents.js`](https://github.com/sharanmankala/collision-club/blob/main/dist/agents.js) (Team Agents), [`scripts/train.mjs`](https://github.com/sharanmankala/collision-club/blob/main/scripts/train.mjs) (Training Runner), [`dist/app.js`](https://github.com/sharanmankala/collision-club/blob/main/dist/app.js) (Game Interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Arena Game"]
  node_game_page["Game Page<br/>[index.html]"]
  node_game_ui["Game Interface<br/>[app.js]"]
  node_team_agents["Team Agents<br/>[agents.js]"]
  node_arena_physics["Arena Physics<br/>[physics.js]"]
end

subgraph group_learning["Policy Training"]
  node_training_worker["Training Worker<br/>[training-worker.js]"]
  node_learning_engine["Learning Engine<br/>[learning.js]"]
  node_training_runner["Training Runner<br/>[train.mjs]"]
end

node_player(("Player"))

node_player -->|"opens"| node_game_page
node_game_page -->|"presents"| node_game_ui
node_team_agents -->|"compete in"| node_arena_physics
node_training_runner -->|"trains and evaluates"| node_learning_engine

click node_game_page "https://github.com/sharanmankala/collision-club/blob/main/dist/index.html"
click node_game_ui "https://github.com/sharanmankala/collision-club/blob/main/dist/app.js"
click node_team_agents "https://github.com/sharanmankala/collision-club/blob/main/dist/agents.js"
click node_arena_physics "https://github.com/sharanmankala/collision-club/blob/main/dist/physics.js"
click node_training_worker "https://github.com/sharanmankala/collision-club/blob/main/dist/training-worker.js"
click node_learning_engine "https://github.com/sharanmankala/collision-club/blob/main/dist/learning.js"
click node_training_runner "https://github.com/sharanmankala/collision-club/blob/main/scripts/train.mjs"

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_game_page,node_game_ui,node_team_agents,node_arena_physics toneBlue
class node_training_worker,node_learning_engine,node_training_runner toneAmber
class node_player toneIndigo
```

## Components

### Arena Game

- [Game Page](https://github.com/sharanmankala/collision-club/blob/main/dist/index.html): `dist/index.html`
- [Game Interface](https://github.com/sharanmankala/collision-club/blob/main/dist/app.js): `dist/app.js`
- [Team Agents](https://github.com/sharanmankala/collision-club/blob/main/dist/agents.js): `dist/agents.js`
- [Arena Physics](https://github.com/sharanmankala/collision-club/blob/main/dist/physics.js): `dist/physics.js`

### Policy Training

- [Training Worker](https://github.com/sharanmankala/collision-club/blob/main/dist/training-worker.js): `dist/training-worker.js`
- [Learning Engine](https://github.com/sharanmankala/collision-club/blob/main/dist/learning.js): `dist/learning.js`
- [Training Runner](https://github.com/sharanmankala/collision-club/blob/main/scripts/train.mjs): `scripts/train.mjs`

### Other components

- **Player**

## Connections

- Player → Game Page: opens (evidence: `README.md`)
- Game Page → Game Interface: presents (evidence: `README.md`)
- Team Agents → Arena Physics: compete in (evidence: `README.md`)
- Training Runner → Learning Engine: trains and evaluates (evidence: `scripts/train.mjs`)
