Add on-device web client
This commit is contained in:
@@ -10,8 +10,8 @@ The current implementation starts with the classic two-player card game:
|
||||
- random, discard-only, and safe-heuristic bots
|
||||
- core rule, scoring, mask, env, canonical-state, bot, and GUI smoke tests
|
||||
|
||||
Training code, Deep CFR, learned-policy evaluation, GUI, and web client are
|
||||
intentionally outside the first port.
|
||||
Training code, Deep CFR, learned-policy evaluation, desktop GUI, and an
|
||||
on-device web client now live alongside the original rules port.
|
||||
|
||||
## Development
|
||||
|
||||
@@ -34,6 +34,24 @@ uv run lost-cities-classic-gui --mode pvc --bot safe-heuristic
|
||||
|
||||
The GUI uses the in-process Cython game engine.
|
||||
|
||||
## On-device Web Client
|
||||
|
||||
The `web/` app runs its TypeScript rules engine and exported JAX PPO policy
|
||||
entirely in the browser. It prefers WebGPU and falls back to WebAssembly.
|
||||
|
||||
Export a local Orbax checkpoint and start Vite:
|
||||
|
||||
```bash
|
||||
uv run --with onnx scripts/export_jax_ppo_onnx.py \
|
||||
--checkpoint /path/to/checkpoint \
|
||||
--output web/public/models/jax-ppo.onnx
|
||||
cd web
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
See [web/README.md](web/README.md) for tests and model parity tooling.
|
||||
|
||||
## JAX Rules Engine
|
||||
|
||||
`lost_cities_jax` is a standalone pure rules simulator for one two-player
|
||||
|
||||
Reference in New Issue
Block a user