Refocus README for Thousand Token Wood track
Browse files
README.md
CHANGED
|
@@ -28,87 +28,72 @@ tags:
|
|
| 28 |
|
| 29 |
# LifeChoice Simulator
|
| 30 |
|
| 31 |
-
LifeChoice Simulator
|
|
|
|
|
|
|
| 32 |
|
| 33 |

|
| 34 |
|
| 35 |
-
## Live
|
| 36 |
|
| 37 |
- Live Space: [build-small-hackathon/LifeChoice-Simulator](https://huggingface.co/spaces/build-small-hackathon/LifeChoice-Simulator)
|
| 38 |
-
-
|
| 39 |
-
- Public
|
| 40 |
-
- Social post
|
| 41 |
-
- Demo script: [docs/demo-script.md](docs/demo-script.md)
|
| 42 |
-
|
| 43 |
-
## Record A Demo
|
| 44 |
-
|
| 45 |
-
The submission includes a demo recording plan so judges can evaluate the app even if live API limits, model latency, or runtime availability affect the Space during review.
|
| 46 |
-
|
| 47 |
- Demo script: [docs/demo-script.md](docs/demo-script.md)
|
| 48 |
-
-
|
| 49 |
-
- Suggested length: 45-90 seconds
|
| 50 |
-
- Required coverage: setup flow, first deterministic scene, at least one committed choice, metric changes, world/character state, and final report or cascade if time allows
|
| 51 |
-
|
| 52 |
-
The demo should make the core product claim visible: LifeChoice is a stateful causal simulation with deterministic consequences, not a one-shot advice chatbot.
|
| 53 |
|
| 54 |
-
##
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
- Social post script: [docs/social-post.md](docs/social-post.md)
|
| 59 |
-
- Live Space: [build-small-hackathon/LifeChoice-Simulator](https://huggingface.co/spaces/build-small-hackathon/LifeChoice-Simulator)
|
| 60 |
-
- Public trace dataset: [lifechoice-simulator-trace](https://huggingface.co/datasets/build-small-hackathon/lifechoice-simulator-trace)
|
| 61 |
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
##
|
| 65 |
|
| 66 |
-
The
|
| 67 |
|
| 68 |
-
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
| 75 |
-
- Choices create durable facts, obligations, and closed options.
|
| 76 |
-
- Later scenes must respect causal records and metric thresholds.
|
| 77 |
-
- Earlier choices return through three cascade moments.
|
| 78 |
-
- The visual environment changes among `thriving`, `stable`, and `struggling`.
|
| 79 |
-
- The player sprite changes among `neutral`, `stressed`, and `confident`.
|
| 80 |
-
- A bounded context packet prevents token growth across the simulation.
|
| 81 |
-
- The final report is computed from actual behavior, not a conversational impression.
|
| 82 |
|
| 83 |
-
The LLM
|
| 84 |
|
| 85 |
-
|
| 86 |
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
-
|
| 90 |
-
|---|---|
|
| 91 |
-
| Fast onboarding | Dilemma, path selection, one calibration answer, and persona selection |
|
| 92 |
-
| Immediate play | The opening node is deterministic and available without model latency |
|
| 93 |
-
| Efficient generation | One future node is generated at a time and prefetched in the background |
|
| 94 |
-
| Bounded context | Last 3 choices, 8 facts, 5 obligations, and 5 closed options only |
|
| 95 |
-
| Stable characters | Characters remain static session data, not regenerated every turn |
|
| 96 |
-
| Consistent world state | Threshold facts and narrative validation enforce visible pressure |
|
| 97 |
-
| Meaningful choices | Every choice mutates facts, obligations, closed options, and metrics |
|
| 98 |
-
| Persona continuity | Reactions appear at opening, selected later nodes, and critical thresholds |
|
| 99 |
-
| Delayed consequences | Small echo at node 2, major consequence at node 5, final payoff at node 7 |
|
| 100 |
-
| Reactive visuals | Environment image, metric panel, and sprite expression update after decisions |
|
| 101 |
|
| 102 |
## Architecture
|
| 103 |
|
| 104 |
-
1. Gradio captures
|
| 105 |
-
2. The
|
| 106 |
-
3. A background worker
|
| 107 |
-
4. The
|
| 108 |
-
5. Narrative validation
|
| 109 |
-
6. The
|
| 110 |
-
7.
|
| 111 |
-
8. The final report summarizes
|
| 112 |
|
| 113 |
## Model Compliance
|
| 114 |
|
|
@@ -118,44 +103,50 @@ Only one model is configured.
|
|
| 118 |
|---|---:|---|
|
| 119 |
| [`Qwen/Qwen2.5-7B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) | 7.616B | Bounded adaptive scenario generation |
|
| 120 |
|
| 121 |
-
Hugging Face
|
| 122 |
|
| 123 |
-
|
| 124 |
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
|
| 129 |
## Safety
|
| 130 |
|
| 131 |
-
LifeChoice is
|
| 132 |
|
| 133 |
Safety controls include:
|
| 134 |
|
| 135 |
-
-
|
| 136 |
-
-
|
| 137 |
-
-
|
| 138 |
-
-
|
| 139 |
-
-
|
| 140 |
-
-
|
| 141 |
-
-
|
| 142 |
|
| 143 |
## Built With Codex
|
| 144 |
|
| 145 |
-
|
| 146 |
|
| 147 |
-
Codex
|
| 148 |
|
| 149 |
-
-
|
| 150 |
-
-
|
| 151 |
-
-
|
| 152 |
-
-
|
| 153 |
-
-
|
| 154 |
-
-
|
| 155 |
-
-
|
| 156 |
-
-
|
| 157 |
|
| 158 |
-
The workflow stayed human-directed: the project owner
|
| 159 |
|
| 160 |
Codex-attributed commits use:
|
| 161 |
|
|
@@ -165,54 +156,22 @@ Author: Codex <codex@openai.com>
|
|
| 165 |
|
| 166 |
## Bonus Badges
|
| 167 |
|
| 168 |
-
- **Off-Brand**: custom game-style Gradio frontend instead of default Gradio
|
| 169 |
- **Field Notes**: README, architecture diagram, demo script, compliance checklist, screenshots, and submission notes.
|
| 170 |
- **Sharing is Caring**: public [agent build trace dataset](https://huggingface.co/datasets/build-small-hackathon/lifechoice-simulator-trace) with 26 event rows.
|
| 171 |
|
| 172 |
This submission does not claim Tiny Titan, OpenBMB, NVIDIA, Modal credits, Off the Grid, Well-Tuned, or Llama Champion.
|
| 173 |
|
| 174 |
-
##
|
| 175 |
|
| 176 |
- Python 3.10+
|
| 177 |
- Gradio 5
|
| 178 |
- Hugging Face Hub `InferenceClient`
|
| 179 |
-
- `Qwen/Qwen2.5-7B-Instruct`
|
| 180 |
- Thread-pool prefetching
|
| 181 |
-
-
|
| 182 |
- Pixel-art environment assets
|
| 183 |
-
|
| 184 |
-
## Run Locally
|
| 185 |
-
|
| 186 |
-
```bash
|
| 187 |
-
python -m venv .venv
|
| 188 |
-
.\.venv\Scripts\activate
|
| 189 |
-
pip install -r requirements.txt
|
| 190 |
-
python app.py
|
| 191 |
-
```
|
| 192 |
-
|
| 193 |
-
`HF_TOKEN` should be configured for the submitted experience. The fallback path exists only to avoid a blank demo during outages; it is not the intended model-driven product mode.
|
| 194 |
-
|
| 195 |
-
## Tests
|
| 196 |
-
|
| 197 |
-
```bash
|
| 198 |
-
pytest -q
|
| 199 |
-
```
|
| 200 |
-
|
| 201 |
-
The suite covers model-size compliance, bounded context, branch divergence, world-state clamping, state-to-narrative consistency, cascades, persona cadence, and metric-driven environment changes.
|
| 202 |
-
|
| 203 |
-
## Deployment
|
| 204 |
-
|
| 205 |
-
Authenticate as an account with write permission in `build-small-hackathon`, then upload the Space files to:
|
| 206 |
-
|
| 207 |
-
```text
|
| 208 |
-
build-small-hackathon/LifeChoice-Simulator
|
| 209 |
-
```
|
| 210 |
-
|
| 211 |
-
The current public Space is available at:
|
| 212 |
-
|
| 213 |
-
```text
|
| 214 |
-
https://huggingface.co/spaces/build-small-hackathon/LifeChoice-Simulator
|
| 215 |
-
```
|
| 216 |
|
| 217 |
## Screenshots
|
| 218 |
|
|
@@ -228,8 +187,6 @@ https://huggingface.co/spaces/build-small-hackathon/LifeChoice-Simulator
|
|
| 228 |
|
| 229 |

|
| 230 |
|
| 231 |
-
## Submission
|
| 232 |
-
|
| 233 |
-
Code, Space metadata, model compliance, safety documentation, architecture, screenshots, demo script, public trace dataset, and badge evidence are included.
|
| 234 |
|
| 235 |
-
|
|
|
|
| 28 |
|
| 29 |
# LifeChoice Simulator
|
| 30 |
|
| 31 |
+
LifeChoice Simulator is an LLM-powered interactive future game for the **Thousand Token Wood** track. It turns a real fork in the road into a strange, playable eight-node future where choices change the world, the character, the pressure, and the ending report.
|
| 32 |
+
|
| 33 |
+
The experience sits between a text-adventure dungeon master, a decision simulator, and a pocket-sized alternate-life RPG. A 7B model dreams up adaptive scenarios; deterministic game state keeps those dreams consequential.
|
| 34 |
|
| 35 |

|
| 36 |
|
| 37 |
+
## Live Links
|
| 38 |
|
| 39 |
- Live Space: [build-small-hackathon/LifeChoice-Simulator](https://huggingface.co/spaces/build-small-hackathon/LifeChoice-Simulator)
|
| 40 |
+
- Demo video: [22-second walkthrough](https://github.com/Ajey95/LifeChoice-Simulator-Hackathon/raw/main/docs/lifechoice-demo.mp4)
|
| 41 |
+
- Public build trace: [lifechoice-simulator-trace](https://huggingface.co/datasets/build-small-hackathon/lifechoice-simulator-trace)
|
| 42 |
+
- Social post script: [docs/social-post.md](docs/social-post.md)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
- Demo script: [docs/demo-script.md](docs/demo-script.md)
|
| 44 |
+
- Compliance checklist: [docs/compliance-checklist.md](docs/compliance-checklist.md)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
## Thousand Token Wood Fit
|
| 47 |
|
| 48 |
+
LifeChoice is built for the whimsical track: a playful, AI-native interaction that lets a small model wander somewhere stranger than a normal productivity app.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
| Track Signal | How LifeChoice Fits |
|
| 51 |
+
|---|---|
|
| 52 |
+
| Interactive AI game | Eight playable decision nodes, persistent stats, branching consequences, persona reactions, and final report |
|
| 53 |
+
| Out-of-the-box entertainment | A serious life dilemma becomes an alternate-future game with pixel-art scenes and a reactive character |
|
| 54 |
+
| Small model imagination | `Qwen/Qwen2.5-7B-Instruct` generates bounded future scenarios from the user's fork, pressure, and past choices |
|
| 55 |
+
| Text-adventure energy | The model acts like a constrained future narrator while the state engine remembers what the player did |
|
| 56 |
+
| Delightful presentation | Custom Gradio UI, cinematic scenario cards, world-state badges, metric bars, and pixel-art backgrounds |
|
| 57 |
|
| 58 |
+
## Experience
|
| 59 |
|
| 60 |
+
The player enters a dilemma such as `MTech vs Software Job`, chooses one path to enter, adds the pressure that makes the decision real, and selects a voice that follows them through the simulation.
|
| 61 |
|
| 62 |
+
Each turn combines:
|
| 63 |
|
| 64 |
+
- an LLM-generated scenario constrained by the current causal state
|
| 65 |
+
- three consequential choices
|
| 66 |
+
- five changing metrics: financial security, fulfillment, validation, stress, and family satisfaction
|
| 67 |
+
- durable facts, obligations, and closed options
|
| 68 |
+
- a reactive world state: `stable`, `thriving`, or `struggling`
|
| 69 |
+
- a character expression: `neutral`, `stressed`, or `confident`
|
| 70 |
|
| 71 |
+
The result is not a prediction engine and not an advice bot. It is a playable mirror: a fictional system for feeling how tradeoffs compound.
|
| 72 |
|
| 73 |
+
## AI Role
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
The LLM is central to the project. It generates the adaptive future scenarios that make each run feel personal to the player's dilemma, chosen path, calibration pressure, and earlier decisions.
|
| 76 |
|
| 77 |
+
The deterministic layer gives the model a game board:
|
| 78 |
|
| 79 |
+
- state transitions and metric arithmetic
|
| 80 |
+
- causal memory through facts, obligations, and closed options
|
| 81 |
+
- narrative validation for stress, money, and family-pressure thresholds
|
| 82 |
+
- fallback resilience during model outages
|
| 83 |
+
- final report generation from the recorded causal ledger
|
| 84 |
|
| 85 |
+
This split keeps the app AI-native without turning it into an unconstrained chat transcript.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
## Architecture
|
| 88 |
|
| 89 |
+
1. Gradio captures the dilemma, chosen path, calibration fact, and persona.
|
| 90 |
+
2. The first scene appears immediately to keep the game responsive.
|
| 91 |
+
3. A background worker prepares future scenario nodes with the 7B model.
|
| 92 |
+
4. The state engine applies choice deltas and updates the causal ledger.
|
| 93 |
+
5. Narrative validation keeps generated scenes aligned with critical metrics.
|
| 94 |
+
6. The visual environment updates from all five metrics.
|
| 95 |
+
7. Earlier decisions return through cascade moments.
|
| 96 |
+
8. The final report summarizes the observed playthrough.
|
| 97 |
|
| 98 |
## Model Compliance
|
| 99 |
|
|
|
|
| 103 |
|---|---:|---|
|
| 104 |
| [`Qwen/Qwen2.5-7B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) | 7.616B | Bounded adaptive scenario generation |
|
| 105 |
|
| 106 |
+
Hugging Face model metadata reports `7,615,616,512` parameters. No secondary model is configured, and no model at or above 32B is used. Deterministic authored content exists only as a resilience path if inference is unavailable; the submitted product experience is centered on model-generated scenarios.
|
| 107 |
|
| 108 |
+
## Product Design
|
| 109 |
|
| 110 |
+
| Capability | Design |
|
| 111 |
+
|---|---|
|
| 112 |
+
| Fast start | The game opens without waiting on model latency |
|
| 113 |
+
| Adaptive scenario loop | Later nodes are generated by the 7B model from bounded causal context |
|
| 114 |
+
| Bounded memory | Recent choices, facts, obligations, and closed options are carried forward |
|
| 115 |
+
| Consequential choices | Every decision mutates metrics and the causal ledger |
|
| 116 |
+
| Delayed consequences | Prior decisions return at cascade moments instead of disappearing |
|
| 117 |
+
| Reactive visuals | Backgrounds, metrics, world label, and sprite expression change with state |
|
| 118 |
+
| Final report | The ending is computed from what happened in the playthrough |
|
| 119 |
|
| 120 |
## Safety
|
| 121 |
|
| 122 |
+
LifeChoice is framed as reflective fiction. It does not provide medical, legal, financial, mental-health, or career advice, and it does not claim to predict the user's future.
|
| 123 |
|
| 124 |
Safety controls include:
|
| 125 |
|
| 126 |
+
- bounded model context
|
| 127 |
+
- strict generated-node schema validation
|
| 128 |
+
- deterministic metric arithmetic
|
| 129 |
+
- no autonomous real-world actions
|
| 130 |
+
- no recommendation of a single correct path
|
| 131 |
+
- visible disclaimer text in the UI
|
| 132 |
+
- final report grounded in the simulated ledger, not external claims
|
| 133 |
|
| 134 |
## Built With Codex
|
| 135 |
|
| 136 |
+
Codex was used as an implementation partner across product design, architecture, code, validation, documentation, and deployment polish.
|
| 137 |
|
| 138 |
+
Codex contributed to:
|
| 139 |
|
| 140 |
+
- translating the hackathon concept into a modular LLM-powered simulation architecture
|
| 141 |
+
- implementing the Gradio interface, custom game UI, scenario cards, metric panel, persona panel, sprite state, and final report view
|
| 142 |
+
- designing the causal ledger with facts, obligations, closed options, recent choices, and delayed cascade moments
|
| 143 |
+
- integrating Hugging Face `InferenceClient` for bounded 7B scenario generation
|
| 144 |
+
- adding validation so generated scenes respect critical stress, money, and family thresholds
|
| 145 |
+
- documenting model compliance, safety posture, architecture, screenshots, demo flow, and badge evidence
|
| 146 |
+
- verifying live Space access, runtime metadata, world-state transitions, and character-state transitions
|
| 147 |
+
- publishing the public agent build trace for transparency
|
| 148 |
|
| 149 |
+
The workflow stayed human-directed: the project owner shaped the concept, evaluated the running Space, selected badge claims, and guided final submission positioning. Codex handled implementation depth, consistency checks, and documentation polish.
|
| 150 |
|
| 151 |
Codex-attributed commits use:
|
| 152 |
|
|
|
|
| 156 |
|
| 157 |
## Bonus Badges
|
| 158 |
|
| 159 |
+
- **Off-Brand**: custom game-style Gradio frontend instead of the default Gradio look.
|
| 160 |
- **Field Notes**: README, architecture diagram, demo script, compliance checklist, screenshots, and submission notes.
|
| 161 |
- **Sharing is Caring**: public [agent build trace dataset](https://huggingface.co/datasets/build-small-hackathon/lifechoice-simulator-trace) with 26 event rows.
|
| 162 |
|
| 163 |
This submission does not claim Tiny Titan, OpenBMB, NVIDIA, Modal credits, Off the Grid, Well-Tuned, or Llama Champion.
|
| 164 |
|
| 165 |
+
## Technical Snapshot
|
| 166 |
|
| 167 |
- Python 3.10+
|
| 168 |
- Gradio 5
|
| 169 |
- Hugging Face Hub `InferenceClient`
|
| 170 |
+
- `Qwen/Qwen2.5-7B-Instruct` at 7.616B parameters
|
| 171 |
- Thread-pool prefetching
|
| 172 |
+
- Deterministic state engine
|
| 173 |
- Pixel-art environment assets
|
| 174 |
+
- Public Hugging Face Space deployment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
|
| 176 |
## Screenshots
|
| 177 |
|
|
|
|
| 187 |
|
| 188 |

|
| 189 |
|
| 190 |
+
## Submission Evidence
|
|
|
|
|
|
|
| 191 |
|
| 192 |
+
Code, Space metadata, model compliance, safety documentation, architecture, screenshots, demo script, public trace dataset, social post script, and badge evidence are included in the repository.
|