# chnzyx/auto_simulated_universe architecture

> Architecture diagram of the GitHub repository chnzyx/auto_simulated_universe, 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/chnzyx/auto_simulated_universe
- Repository: https://github.com/chnzyx/auto_simulated_universe

## Overview

Auto_Simulated_Universe automates Honkai: Star Rail’s Simulated Universe through the game UI. The primary workflow is selecting an automation mode, recognizing on-screen state, and driving the game toward a run’s completion. It includes separate divergent and standard modes, plus Forgotten Hall automation, calibration, and map updates. The README and sampled files establish the GUI dispatch and OCR entry points; details of the unsampled run loops and their internal stage-by-stage behavior are not represented.

Main entry points: [`utils/gui/choose.py`](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/gui/choose.py) (GUI), [`simul.py`](https://github.com/chnzyx/auto_simulated_universe/blob/main/simul.py) (Simulated Universe), [`diver.py`](https://github.com/chnzyx/auto_simulated_universe/blob/main/diver.py) (Divergent Universe), [`utils/onnxocr/onnx_paddleocr.py`](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/onnxocr/onnx_paddleocr.py) (ONNX OCR engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_gui["GUI<br/>[choose.py]"]
  node_abyss_ui["Forgotten Hall UI<br/>[abyss.py]"]
end

subgraph group_automation["Run automation"]
  node_diver["Divergent Universe<br/>[diver.py]"]
  node_simul["Simulated Universe<br/>[simul.py]"]
  node_abyss["Forgotten Hall automation<br/>[abyss.py]"]
  node_diver_config["Divergent settings<br/>[config.py]"]
  node_simul_config["Standard settings<br/>[config.py]"]
  node_action_data["Action data<br/>[default.json]"]
end

subgraph group_vision["Screen recognition"]
  node_screen["Screen capture<br/>[screenshot.py]"]
  node_diver_ocr["Divergent OCR<br/>[ocr.py]"]
  node_simul_ocr["Standard OCR<br/>[ocr.py]"]
  node_onnx_ocr["ONNX OCR engine<br/>[onnx_paddleocr.py]"]
  node_ocr_models["OCR models<br/>[v3_det.onnx]"]
end

subgraph group_support["Supporting features"]
  node_calibration["Camera calibration<br/>[align_angle.py]"]
  node_map_update["Map updates<br/>[update_map.py]"]
  node_map_assets["Map images"]
  node_notifications["Run notifications<br/>[notif.py]"]
end

node_user(("User"))
node_game["Honkai: Star Rail"]

node_user -->|"configures and starts"| node_gui
node_gui -->|"starts mode"| node_diver
node_gui -->|"starts mode"| node_simul
node_gui -->|"opens view"| node_abyss_ui
node_abyss_ui -->|"starts automation"| node_abyss
node_gui -->|"reads settings"| node_diver_config
node_gui -->|"reads settings"| node_simul_config
node_diver -->|"uses recognition"| node_diver_ocr
node_simul -->|"uses recognition"| node_simul_ocr
node_diver_ocr -->|"recognizes text"| node_onnx_ocr
node_simul_ocr -->|"recognizes text"| node_onnx_ocr
node_onnx_ocr -->|"loads model"| node_ocr_models
node_user -->|"plays through UI"| node_game
node_diver -->|"automates UI"| node_game
node_simul -->|"automates UI"| node_game
node_abyss -->|"automates UI"| node_game
node_user -->|"requests calibration"| node_calibration
node_gui -->|"offers map update"| node_map_update
node_map_update -->|"updates files"| node_map_assets
node_gui -->|"announces exit"| node_notifications
node_simul -.->|"reads actions"| node_action_data

click node_gui "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/gui/choose.py"
click node_abyss_ui "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/gui/abyss.py"
click node_diver "https://github.com/chnzyx/auto_simulated_universe/blob/main/diver.py"
click node_simul "https://github.com/chnzyx/auto_simulated_universe/blob/main/simul.py"
click node_abyss "https://github.com/chnzyx/auto_simulated_universe/blob/main/abyss.py"
click node_diver_config "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/diver/config.py"
click node_simul_config "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/simul/config.py"
click node_action_data "https://github.com/chnzyx/auto_simulated_universe/blob/main/actions/default.json"
click node_screen "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/screenshot.py"
click node_diver_ocr "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/diver/ocr.py"
click node_simul_ocr "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/simul/ocr.py"
click node_onnx_ocr "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/onnxocr/onnx_paddleocr.py"
click node_ocr_models "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/models/v3_det.onnx"
click node_calibration "https://github.com/chnzyx/auto_simulated_universe/blob/main/align_angle.py"
click node_map_update "https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/simul/update_map.py"
click node_map_assets "https://github.com/chnzyx/auto_simulated_universe/tree/main/imgs/maps"
click node_notifications "https://github.com/chnzyx/auto_simulated_universe/blob/main/notif.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_gui,node_abyss_ui,node_user toneBlue
class node_diver,node_simul,node_abyss,node_diver_config,node_simul_config,node_action_data toneAmber
class node_screen,node_diver_ocr,node_simul_ocr,node_onnx_ocr,node_ocr_models toneMint
class node_calibration,node_map_update,node_map_assets,node_notifications toneRose
class node_game toneIndigo
```

## Components

### User interface

- [GUI](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/gui/choose.py): `utils/gui/choose.py`
- [Forgotten Hall UI](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/gui/abyss.py): `utils/gui/abyss.py`

### Run automation

- [Divergent Universe](https://github.com/chnzyx/auto_simulated_universe/blob/main/diver.py): `diver.py`
- [Simulated Universe](https://github.com/chnzyx/auto_simulated_universe/blob/main/simul.py): `simul.py`
- [Forgotten Hall automation](https://github.com/chnzyx/auto_simulated_universe/blob/main/abyss.py): `abyss.py`
- [Divergent settings](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/diver/config.py): `utils/diver/config.py`
- [Standard settings](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/simul/config.py): `utils/simul/config.py`
- [Action data](https://github.com/chnzyx/auto_simulated_universe/blob/main/actions/default.json): `actions/default.json`

### Screen recognition

- [Screen capture](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/screenshot.py): `utils/screenshot.py`
- [Divergent OCR](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/diver/ocr.py): `utils/diver/ocr.py`
- [Standard OCR](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/simul/ocr.py): `utils/simul/ocr.py`
- [ONNX OCR engine](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/onnxocr/onnx_paddleocr.py): `utils/onnxocr/onnx_paddleocr.py`
- [OCR models](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/models/v3_det.onnx): `utils/models/v3_det.onnx`

### Supporting features

- [Camera calibration](https://github.com/chnzyx/auto_simulated_universe/blob/main/align_angle.py): `align_angle.py`
- [Map updates](https://github.com/chnzyx/auto_simulated_universe/blob/main/utils/simul/update_map.py): `utils/simul/update_map.py`
- [Map images](https://github.com/chnzyx/auto_simulated_universe/tree/main/imgs/maps): `imgs/maps`
- [Run notifications](https://github.com/chnzyx/auto_simulated_universe/blob/main/notif.py): `notif.py`

### Other components

- **User**
- **Honkai: Star Rail**

## Connections

- User → GUI: configures and starts
- GUI → Divergent Universe: starts mode
- GUI → Simulated Universe: starts mode
- GUI → Forgotten Hall UI: opens view
- Forgotten Hall UI → Forgotten Hall automation: starts automation
- GUI → Divergent settings: reads settings
- GUI → Standard settings: reads settings
- Divergent Universe → Divergent OCR: uses recognition
- Simulated Universe → Standard OCR: uses recognition
- Divergent OCR → ONNX OCR engine: recognizes text
- Standard OCR → ONNX OCR engine: recognizes text
- ONNX OCR engine → OCR models: loads model
- User → Honkai: Star Rail: plays through UI
- Divergent Universe → Honkai: Star Rail: automates UI
- Simulated Universe → Honkai: Star Rail: automates UI
- Forgotten Hall automation → Honkai: Star Rail: automates UI
- User → Camera calibration: requests calibration
- GUI → Map updates: offers map update
- Map updates → Map images: updates files
- GUI → Run notifications: announces exit
- Simulated Universe → Action data: reads actions
