Ajeya95 commited on
Commit
00d1372
·
verified ·
1 Parent(s): 99aabb6

Polish README and document Codex-assisted build

Browse files
Files changed (1) hide show
  1. README.md +79 -56
README.md CHANGED
@@ -19,61 +19,83 @@ tags:
19
  - best-agent
20
  - best-demo
21
  - openai
 
 
 
 
 
22
  ---
23
 
24
  # LifeChoice Simulator
25
 
26
- LifeChoice Simulator turns a difficult real-life dilemma into a short, consequential future you can play through. It is designed for reflection, not prediction or advice.
27
 
28
  ![Architecture](docs/architecture.svg)
29
 
30
  ## Live Demo
31
 
32
- - Hugging Face Space target: `build-small-hackathon/LifeChoice-Simulator` (organization authorization pending)
 
33
  - Public demo video: [watch the 22-second walkthrough](https://github.com/Ajey95/LifeChoice-Simulator-Hackathon/raw/main/docs/lifechoice-demo.mp4)
34
- - Agent build trace: [LifeChoice Simulator trace dataset](https://huggingface.co/datasets/build-small-hackathon/lifechoice-simulator-trace)
35
- - Social post: publishing pending
36
 
37
- The repository includes a longer [demo script](docs/demo-script.md) and [social post draft](docs/social-post.md) ready for public publishing.
38
 
39
- ## Why It Is Not Just a Chatbot
 
 
 
 
40
 
41
  A chatbot responds turn by turn with prose. LifeChoice runs a stateful simulation engine:
42
 
43
  - Every choice changes five deterministic metrics.
44
  - Choices create durable facts, obligations, and closed options.
45
- - Later scenes must respect those causal records and metric thresholds.
46
  - Earlier choices return through three cascade moments.
47
  - The visual environment changes among `thriving`, `stable`, and `struggling`.
 
48
  - A bounded context packet prevents token growth across the simulation.
49
  - The final report is computed from actual behavior, not a conversational impression.
50
 
51
- The language model enriches bounded decision nodes. It does not own arithmetic, state transitions, safety limits, or simulation completion.
52
 
53
  ## Product Design
54
 
55
- LifeChoice is designed around fast entry, bounded generation, and consequences that remain visible:
56
 
57
  | Capability | Design |
58
  |---|---|
59
- | Fast onboarding | Dilemma, path, one concrete calibration answer, and one persona selection |
60
  | Immediate play | The opening node is deterministic and available without model latency |
61
  | Efficient generation | One future node is enriched at a time and prefetched in the background |
62
  | Bounded context | Last 3 choices, 8 facts, 5 obligations, and 5 closed options only |
63
- | Stable characters | Characters remain static session data |
64
  | Consistent world state | Threshold facts and narrative validation enforce visible pressure |
65
- | Meaningful choices | Every choice mutates causal facts, obligations, closed options, and metrics |
66
- | Persona continuity | Reactions appear at opening, nodes 1/3/5/7, and critical thresholds |
67
  | Delayed consequences | Small echo at node 2, major consequence at node 5, final payoff at node 7 |
68
- | Reactive visuals | Environment image and metric panel update after every decision |
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  ## Model Compliance
71
 
72
- Only one model is configured:
73
 
74
  | Model | Parameters | Purpose |
75
  |---|---:|---|
76
- | [`Qwen/Qwen2.5-7B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) | 7.616B | Optional bounded node enrichment |
77
 
78
  Hugging Face repository metadata reports `7,615,616,512` parameters. No secondary model is configured, and no model at or above 32B is used. If hosted inference is unavailable, the simulation uses deterministic authored nodes and remains fully playable.
79
 
@@ -83,16 +105,6 @@ Run the compliance test:
83
  pytest tests/test_model_compliance.py
84
  ```
85
 
86
- ## Architecture
87
-
88
- 1. Gradio captures a dilemma, chosen path, one calibration fact, and persona.
89
- 2. The engine returns an immediate deterministic opening scene.
90
- 3. A background worker optionally enriches future nodes with the 7B model.
91
- 4. The deterministic state engine applies deltas and updates the causal ledger.
92
- 5. Narrative validation rejects generated scenes that contradict critical metrics.
93
- 6. The environment derives its visual state from all five metrics.
94
- 7. Cascades and the final report use the causal ledger.
95
-
96
  ## Safety
97
 
98
  LifeChoice is a reflective simulation, not medical, legal, financial, mental-health, or career advice. Its futures are fictional hypotheses rather than predictions. Users should not enter secrets or sensitive personal data. High-stakes decisions should be discussed with qualified people who understand the real situation.
@@ -104,9 +116,40 @@ Safety controls include:
104
  - Strict model-output schema validation
105
  - Deterministic fallback for outages or invalid output
106
  - No autonomous real-world action
107
- - No recommendation of a correct path
108
  - Explicit uncertainty and disclaimer text in the UI
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  ## Tech Stack
111
 
112
  - Python 3.10+
@@ -128,17 +171,6 @@ python app.py
128
 
129
  `HF_TOKEN` is optional. Without it, deterministic fallback content is used.
130
 
131
- ### Deploy The Organization Space
132
-
133
- Authenticate specifically as `Ajeya95`, with write permission in `build-small-hackathon`, then run:
134
-
135
- ```bash
136
- hf auth login
137
- python scripts/deploy_space.py
138
- ```
139
-
140
- The deployment script checks both the username and organization role before creating or updating the public Space.
141
-
142
  ## Tests
143
 
144
  ```bash
@@ -147,27 +179,18 @@ pytest -q
147
 
148
  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.
149
 
150
- ## Hackathon Categories
151
-
152
- - Thousand Token Wood
153
- - Best Agent
154
- - Best Demo
155
- - OpenAI Prize
156
-
157
- ## Bonus Badges
158
-
159
- - Off-Brand: custom game-style Gradio frontend instead of default Gradio presentation
160
- - Field Notes: project README, architecture notes, demo script, compliance checklist, and screenshots
161
- - Sharing is Caring: public [agent build trace dataset](https://huggingface.co/datasets/build-small-hackathon/lifechoice-simulator-trace)
162
 
163
- This submission does not claim Tiny Titan, OpenBMB, NVIDIA, Modal credits, Off the Grid, Well-Tuned, or Llama Champion.
164
 
165
- ## Built With Codex
 
 
166
 
167
- Codex built the simulation architecture, Gradio interface, tests, documentation, and deployment workflow. Codex-attributed commits use:
168
 
169
  ```text
170
- Author: Codex <codex@openai.com>
171
  ```
172
 
173
  ## Screenshots
@@ -186,6 +209,6 @@ Author: Codex <codex@openai.com>
186
 
187
  ## Submission Status
188
 
189
- Code, tests, Space metadata, model compliance, safety documentation, architecture, and publishing assets are included. Public URL fields are updated only after the authenticated GitHub repository, Hugging Face organization Space, video, and social post exist.
190
 
191
- See the dated [compliance checklist](docs/compliance-checklist.md) for requirement-by-requirement evidence and external blockers.
 
19
  - best-agent
20
  - best-demo
21
  - openai
22
+ - track:wood
23
+ - sponsor:openai
24
+ - achievement:offbrand
25
+ - achievement:sharing
26
+ - achievement:fieldnotes
27
  ---
28
 
29
  # LifeChoice Simulator
30
 
31
+ LifeChoice Simulator turns a difficult real-life dilemma into a short, consequential future that a user can play through. It is built for reflection, not prediction or advice: the app shows how tradeoffs can compound across money, fulfillment, social validation, stress, and family pressure.
32
 
33
  ![Architecture](docs/architecture.svg)
34
 
35
  ## Live Demo
36
 
37
+ - Live Space: [build-small-hackathon/LifeChoice-Simulator](https://huggingface.co/spaces/build-small-hackathon/LifeChoice-Simulator)
38
+ - Agent build trace: [lifechoice-simulator-trace](https://huggingface.co/datasets/build-small-hackathon/lifechoice-simulator-trace)
39
  - Public demo video: [watch the 22-second walkthrough](https://github.com/Ajey95/LifeChoice-Simulator-Hackathon/raw/main/docs/lifechoice-demo.mp4)
40
+ - Social post draft: [docs/social-post.md](docs/social-post.md)
41
+ - Demo script: [docs/demo-script.md](docs/demo-script.md)
42
 
43
+ ## What It Does
44
 
45
+ The user enters a fork in the road, chooses one path to simulate, adds one real constraint, and selects a persona voice. LifeChoice then runs an eight-node future where every decision changes the state of the world and creates durable consequences.
46
+
47
+ Unlike a normal chatbot, the model does not own the simulation. The deterministic engine owns arithmetic, state transitions, facts, obligations, closed options, cascade moments, safety boundaries, and the final report. The language model is used only for optional bounded node enrichment.
48
+
49
+ ## Why It Is Not Just A Chatbot
50
 
51
  A chatbot responds turn by turn with prose. LifeChoice runs a stateful simulation engine:
52
 
53
  - Every choice changes five deterministic metrics.
54
  - Choices create durable facts, obligations, and closed options.
55
+ - Later scenes must respect causal records and metric thresholds.
56
  - Earlier choices return through three cascade moments.
57
  - The visual environment changes among `thriving`, `stable`, and `struggling`.
58
+ - The player sprite changes among `neutral`, `stressed`, and `confident`.
59
  - A bounded context packet prevents token growth across the simulation.
60
  - The final report is computed from actual behavior, not a conversational impression.
61
 
62
+ The model enriches bounded decision nodes. It does not control scoring, state transitions, safety limits, or simulation completion.
63
 
64
  ## Product Design
65
 
66
+ LifeChoice is designed around fast entry, bounded generation, and visible consequences.
67
 
68
  | Capability | Design |
69
  |---|---|
70
+ | Fast onboarding | Dilemma, path selection, one calibration answer, and persona selection |
71
  | Immediate play | The opening node is deterministic and available without model latency |
72
  | Efficient generation | One future node is enriched at a time and prefetched in the background |
73
  | Bounded context | Last 3 choices, 8 facts, 5 obligations, and 5 closed options only |
74
+ | Stable characters | Characters remain static session data, not regenerated every turn |
75
  | Consistent world state | Threshold facts and narrative validation enforce visible pressure |
76
+ | Meaningful choices | Every choice mutates facts, obligations, closed options, and metrics |
77
+ | Persona continuity | Reactions appear at opening, selected later nodes, and critical thresholds |
78
  | Delayed consequences | Small echo at node 2, major consequence at node 5, final payoff at node 7 |
79
+ | Reactive visuals | Environment image, metric panel, and sprite expression update after decisions |
80
+
81
+ ## Architecture
82
+
83
+ 1. Gradio captures a dilemma, chosen path, calibration fact, and persona.
84
+ 2. The engine returns an immediate deterministic opening scene.
85
+ 3. A background worker optionally enriches future nodes with the 7B model.
86
+ 4. The deterministic state engine applies deltas and updates the causal ledger.
87
+ 5. Narrative validation rejects generated scenes that contradict critical metrics.
88
+ 6. The environment derives its visual state from all five metrics.
89
+ 7. Persona reactions and cascade events reuse the causal ledger.
90
+ 8. The final report summarizes observed behavior inside the simulation.
91
 
92
  ## Model Compliance
93
 
94
+ Only one model is configured.
95
 
96
  | Model | Parameters | Purpose |
97
  |---|---:|---|
98
+ | [`Qwen/Qwen2.5-7B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) | 7.616B | Optional bounded decision-node enrichment |
99
 
100
  Hugging Face repository metadata reports `7,615,616,512` parameters. No secondary model is configured, and no model at or above 32B is used. If hosted inference is unavailable, the simulation uses deterministic authored nodes and remains fully playable.
101
 
 
105
  pytest tests/test_model_compliance.py
106
  ```
107
 
 
 
 
 
 
 
 
 
 
 
108
  ## Safety
109
 
110
  LifeChoice is a reflective simulation, not medical, legal, financial, mental-health, or career advice. Its futures are fictional hypotheses rather than predictions. Users should not enter secrets or sensitive personal data. High-stakes decisions should be discussed with qualified people who understand the real situation.
 
116
  - Strict model-output schema validation
117
  - Deterministic fallback for outages or invalid output
118
  - No autonomous real-world action
119
+ - No recommendation of a "correct" path
120
  - Explicit uncertainty and disclaimer text in the UI
121
 
122
+ ## Built With Codex
123
+
124
+ This submission was developed with Codex as an implementation partner, not just as a code autocomplete tool. Codex was used across product design, architecture, implementation, verification, documentation, and deployment preparation.
125
+
126
+ Codex helped turn the initial hackathon concept into a production-shaped system:
127
+
128
+ - Converted the idea into a modular simulation architecture with deterministic state ownership.
129
+ - Implemented the Gradio application, custom interface, scenario rendering, persona panel, sprite state, metrics, and report view.
130
+ - Designed the causal ledger model: facts, obligations, closed options, recent choices, and delayed cascade moments.
131
+ - Added bounded LLM integration through Hugging Face `InferenceClient` while preserving deterministic fallback behavior.
132
+ - Built validation logic so generated scenes cannot ignore critical stress, money, or family thresholds.
133
+ - Created compliance artifacts for model-size limits, safety posture, architecture, screenshots, demo flow, and submission evidence.
134
+ - Verified live Space access, runtime state, repository files, world-state transitions, and character-state transitions.
135
+ - Published a public agent build trace for transparency and the `Sharing is Caring` badge.
136
+
137
+ The workflow stayed human-directed: the project owner selected the product direction, reviewed behavior in the running Space, chose badge claims, and guided final submission positioning. Codex handled implementation details, consistency checks, and documentation polish so the build could move from prototype to submission-ready artifact quickly.
138
+
139
+ Codex-attributed commits use:
140
+
141
+ ```text
142
+ Author: Codex <codex@openai.com>
143
+ ```
144
+
145
+ ## Bonus Badges
146
+
147
+ - **Off-Brand**: custom game-style Gradio frontend instead of default Gradio presentation.
148
+ - **Field Notes**: README, architecture diagram, demo script, compliance checklist, screenshots, and submission notes.
149
+ - **Sharing is Caring**: public [agent build trace dataset](https://huggingface.co/datasets/build-small-hackathon/lifechoice-simulator-trace) with 26 event rows.
150
+
151
+ This submission does not claim Tiny Titan, OpenBMB, NVIDIA, Modal credits, Off the Grid, Well-Tuned, or Llama Champion.
152
+
153
  ## Tech Stack
154
 
155
  - Python 3.10+
 
171
 
172
  `HF_TOKEN` is optional. Without it, deterministic fallback content is used.
173
 
 
 
 
 
 
 
 
 
 
 
 
174
  ## Tests
175
 
176
  ```bash
 
179
 
180
  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.
181
 
182
+ ## Deployment
 
 
 
 
 
 
 
 
 
 
 
183
 
184
+ Authenticate as an account with write permission in `build-small-hackathon`, then upload the Space files to:
185
 
186
+ ```text
187
+ build-small-hackathon/LifeChoice-Simulator
188
+ ```
189
 
190
+ The current public Space is available at:
191
 
192
  ```text
193
+ https://huggingface.co/spaces/build-small-hackathon/LifeChoice-Simulator
194
  ```
195
 
196
  ## Screenshots
 
209
 
210
  ## Submission Status
211
 
212
+ Code, Space metadata, model compliance, safety documentation, architecture, screenshots, demo script, public trace dataset, and badge evidence are included.
213
 
214
+ See the dated [compliance checklist](docs/compliance-checklist.md) for requirement-by-requirement evidence.