# cwalkene/wuwa-gachasim architecture

> Architecture diagram of the GitHub repository cwalkene/wuwa-gachasim, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cwalkene/wuwa-gachasim
- Repository: https://github.com/cwalkene/wuwa-gachasim

## Overview

A single-file Wuthering Waves gacha-planning simulator: the user sets desired character chains and weapon count, and the program estimates required pulls via Monte Carlo simulation, accounting for pity, banner outcomes, and coral exchanges, then presents distributions. All repository code resides in one Python file. The README documents user configuration and the optimal pull strategy; excerpts show parallel simulation and chart construction, but omit some surrounding orchestration, so uncertain call links are not shown.

Main entry points: [`ww_GachaSimulator.py`](https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py) (Parallel simulation)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Planner"))
node_inputs["Plan and roster"]
node_workflow["Simulation workflow"]
node_pull_model["Banner pull model"]
node_coral["Coral exchange"]
node_monte_carlo["Parallel simulation"]
node_distribution["Pull distributions"]
node_charts["Result charts"]

node_user -->|"sets targets"| node_workflow
node_user -->|"provides roster"| node_inputs
node_inputs -->|"configures"| node_workflow
node_workflow -->|"runs simulations"| node_monte_carlo
node_monte_carlo -->|"simulates pulls"| node_pull_model
node_monte_carlo -->|"applies exchanges"| node_coral
node_monte_carlo -->|"returns outcomes"| node_distribution
node_workflow -->|"builds charts"| node_charts
node_distribution -->|"supplies frequencies"| node_charts

click node_workflow "https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py"
click node_pull_model "https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py"
click node_coral "https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py"
click node_monte_carlo "https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py"
click node_distribution "https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py"
click node_charts "https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.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_user,node_inputs,node_pull_model toneIndigo
class node_workflow,node_coral,node_monte_carlo,node_distribution,node_charts toneTeal
```

## Components

### Other components

- **Planner**
- **Plan and roster**
- [Simulation workflow](https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py): `ww_GachaSimulator.py`
- [Banner pull model](https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py): `ww_GachaSimulator.py`
- [Coral exchange](https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py): `ww_GachaSimulator.py`
- [Parallel simulation](https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py): `ww_GachaSimulator.py`
- [Pull distributions](https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py): `ww_GachaSimulator.py`
- [Result charts](https://github.com/cwalkene/wuwa-gachasim/blob/main/ww_GachaSimulator.py): `ww_GachaSimulator.py`

## Connections

- Planner → Simulation workflow: sets targets
- Planner → Plan and roster: provides roster
- Plan and roster → Simulation workflow: configures
- Simulation workflow → Parallel simulation: runs simulations
- Parallel simulation → Banner pull model: simulates pulls
- Parallel simulation → Coral exchange: applies exchanges
- Parallel simulation → Pull distributions: returns outcomes
- Simulation workflow → Result charts: builds charts
- Pull distributions → Result charts: supplies frequencies
