--- title: Ai Training Simulator emoji: 🧠 colorFrom: blue colorTo: green sdk: gradio sdk_version: 6.16.0 python_version: '3.13' app_file: app.py pinned: false license: mit short_description: Idle/strategy game --- # AI Training Simulator **Build Small Hackathon 2026 — Chapter Two (Adventure in Thousand Token Wood)** A browser strategy/idle game where you manage a fake AI startup. ## How it works - Start with **$100** - Buy upgrades (model size, dataset size/quality, architecture, hardware) - Click **Train Model** — cost and reward are simulated based on your upgrade combination - The chat interface uses **SmolLM2-360M-Instruct running entirely in your browser** via transformers.js - Low quality → high temperature → incoherent word salad - Upgrade your stack → temperature drops → coherent output - Unlock **Cloud Inference** for recurring revenue ## Badges targeted - 🔌 Off the Grid — no cloud APIs, model runs client-side - 🎨 Off-Brand — fully custom UI (no default Gradio look) ## Files | File | Purpose | |------|---------| | `app.py` | Gradio app + HTML game UI + action handler | | `state.py` | Pure Python game logic (train, upgrade, cloud) | | `game_config.py` | **All balance numbers** — edit this to tune the game | | `requirements.txt` | Only `gradio` needed (model runs in browser) | ## Customising / balancing Everything tunable is in `game_config.py`: - `STARTING_MONEY` — how much the player starts with - `UPGRADES` — levels, costs, quality scores per upgrade - `BASE_TRAIN_COST` / multiplier tables — training run economics - `BASE_REWARD` + `QUALITY_EXPONENT` — reward curve shape - `REWARD_NOISE_PCT` — variance per run - `CLOUD_*` constants — cloud inference economics - `CHAT_TEMP_*` — how temperature maps to model quality Author: Martico2432