feat(offline): DAWG cursor + move generator in TS (parity-pinned) #188
Reference in New Issue
Block a user
Delete Branch "feature/offline-movegen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase A (1/2) of PWA offline mode — the client-side move generator (the local vs_ai "robot brain"), not yet wired into the app (Phase B).
dawg.ts: step-by-step cursor (root/final/next/arcs), a faithful port of dafsatraverse.goover the reader's bitstream.generate.ts: Appel–Jacobson generator + cross-sets + counts-rack + board transpose + moveKey ranking, reusing the cursor andvalidate.tsevaluate/connected. A cross-set LetterSet is a Uint8Array, so the 33-letter Russian alphabet (index 32) is exact under JS bit ops.validate.ts: exportconnectedfor the generator's connectivity filter.backend/cmd/movegen: dev tool building small sample dictionaries + emitting golden move-generation fixtures from the real Go solver (EN + RU).dawg.cursor.test.ts(enumeration bijection) +generate.parity.test.ts(7/7 vs the Go solver: empty board, mid-game, blank, single-word rule, Russian index-32).Pure additive library code; no runtime behavior change. Local verification green: backend build/vet/gofmt/test; UI check + test:unit (430 passed) + build.