From 201972a3a3f02cf171569ff173f888deba728d1f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 15:13:57 +0100 Subject: [PATCH 1/4] Store each person's practice privately, with an evening streak reminder --- backend/app/app.go | 2 + backend/app/practice_test.go | 110 ++++++++++++++++++++++ backend/app/streak.go | 54 +++++++++++ backend/app/streak_test.go | 27 ++++++ backend/migrations/1762000000_practice.go | 79 ++++++++++++++++ 5 files changed, 272 insertions(+) create mode 100644 backend/app/practice_test.go create mode 100644 backend/app/streak.go create mode 100644 backend/app/streak_test.go create mode 100644 backend/migrations/1762000000_practice.go diff --git a/backend/app/app.go b/backend/app/app.go index a698e55..2a06b97 100644 --- a/backend/app/app.go +++ b/backend/app/app.go @@ -27,6 +27,8 @@ func Register(app core.App, cfg Config) { // scheduled jobs and backups follow the server's time zone (TZ) app.Cron().SetTimezone(time.Local) + registerStreakReminder(app) + app.OnServe().BindFunc(func(se *core.ServeEvent) error { se.Router.GET("/api/app/info", info) if err := registerSetupRoutes(se); err != nil { diff --git a/backend/app/practice_test.go b/backend/app/practice_test.go new file mode 100644 index 0000000..ff16267 --- /dev/null +++ b/backend/app/practice_test.go @@ -0,0 +1,110 @@ +package app_test + +import ( + "net/http" + "strings" + "testing" + + "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/tests" +) + +// addSession saves a finished lesson for a user. +func addSession(t testing.TB, a core.App, user string) *core.Record { + c, err := a.FindCollectionByNameOrId("practice_sessions") + if err != nil { + t.Fatal(err) + } + s := core.NewRecord(c) + s.Load(map[string]any{ + "user": user, "kind": "practice", "family": "series", "level": 2, "level_after": 3, + "started": "2026-11-17 10:00:00.000Z", "ended": "2026-11-17 10:04:00.000Z", + "items": []any{map[string]any{"given": 47, "correct": true, "ms": 5200}}, "result": map[string]any{"correct": 7, "answered": 8}, + }) + if err := a.Save(s); err != nil { + t.Fatal(err) + } + return s +} + +// Practice is private: each person reads and writes only their own, the owner included. +func TestPracticeIsPrivate(t *testing.T) { + session := `{"user":"BOB","kind":"test","mode":"quick","started":"2026-11-17 11:00:00.000Z","ended":"2026-11-17 11:10:00.000Z","items":[],"result":{"stanine":5}}` + cases := []struct { + name, who, method, url, body string + status int + want string + }{ + {"a member saves their own session", "bob", http.MethodPost, "/api/collections/practice_sessions/records", session, http.StatusOK, `"stanine":5`}, + {"nobody saves a session for someone else", "ada", http.MethodPost, "/api/collections/practice_sessions/records", session, http.StatusBadRequest, `"data":{}`}, + {"the owner can't list a member's sessions", "ada", http.MethodGet, "/api/collections/practice_sessions/records", "", http.StatusOK, `"totalItems":1`}, + {"a member can't open the owner's session", "bob", http.MethodGet, "/api/collections/practice_sessions/records/ADA_SESSION", "", http.StatusNotFound, `"data":{}`}, + {"a finished session can't be edited", "ada", http.MethodPatch, "/api/collections/practice_sessions/records/ADA_SESSION", `{"result":{"stanine":9}}`, http.StatusForbidden, `"data":{}`}, + {"signed-out visitors see no sessions", "", http.MethodGet, "/api/collections/practice_sessions/records", "", http.StatusOK, `"totalItems":0`}, + } + for _, c := range cases { + t.Run(c.name, func(t *testing.T) { + a := newApp(t) + ada, adaToken := addUser(t, a, "ada@example.com", "owner") + bob, bobToken := addUser(t, a, "bob@example.com", "member") + addSession(t, a, bob.Id) // the owner must not see this one + adaSession := addSession(t, a, ada.Id).Id + s := tests.ApiScenario{ + Name: c.name, + Method: c.method, + URL: strings.ReplaceAll(c.url, "ADA_SESSION", adaSession), + ExpectedStatus: c.status, + ExpectedContent: []string{c.want}, + TestAppFactory: func(testing.TB) *tests.TestApp { return a }, + } + if c.body != "" { + s.Body = strings.NewReader(strings.ReplaceAll(c.body, "BOB", bob.Id)) + } + switch c.who { + case "ada": + s.Headers = map[string]string{"Authorization": adaToken} + case "bob": + s.Headers = map[string]string{"Authorization": bobToken} + } + s.Test(t) + }) + } +} + +func TestProgressIsOnePerPerson(t *testing.T) { + a := newApp(t) + defer a.Cleanup() + ada, _ := addUser(t, a, "ada@example.com", "owner") + c, err := a.FindCollectionByNameOrId("progress") + if err != nil { + t.Fatal(err) + } + for i := range 2 { + p := core.NewRecord(c) + p.Load(map[string]any{"user": ada.Id, "xp": 10, "daily_goal": 50, "days": map[string]int{"2026-11-17": 10}}) + err := a.Save(p) + if i == 0 && err != nil { + t.Fatal(err) + } + if i == 1 && err == nil { + t.Fatal("a second progress record for the same person was saved") + } + } +} + +func TestDeletingAPersonDeletesTheirPractice(t *testing.T) { + a := newApp(t) + defer a.Cleanup() + bob, _ := addUser(t, a, "bob@example.com", "member") + addSession(t, a, bob.Id) + if err := a.Delete(bob); err != nil { + t.Fatal(err) + } + left, err := a.FindRecordsByFilter("practice_sessions", "", "", 0, 0) + if err != nil { + t.Fatal(err) + } + if len(left) != 0 { + t.Fatalf("%d sessions left after their person was deleted", len(left)) + } +} diff --git a/backend/app/streak.go b/backend/app/streak.go new file mode 100644 index 0000000..4b324d6 --- /dev/null +++ b/backend/app/streak.go @@ -0,0 +1,54 @@ +package app + +import ( + "fmt" + "time" + + "github.com/pocketbase/pocketbase/core" + + "github.com/selfhostit/reckon/jobs" + "github.com/selfhostit/reckon/push" +) + +// An evening nudge for people who turned reminders on: they practised +// yesterday but not yet today, so their streak ends at midnight. +func registerStreakReminder(app core.App) { + jobs.MustAdd(app, "streak-reminder", "0 19 * * *", func(app core.App) error { + return sendStreakReminders(app, time.Now()) + }) +} + +func sendStreakReminders(app core.App, now time.Time) error { + list, err := app.FindRecordsByFilter("progress", "reminders = true", "", 0, 0) + if err != nil { + return err + } + for _, p := range list { + var days map[string]float64 + if err := p.UnmarshalJSONField("days", &days); err != nil { + continue + } + if n := streakAtRisk(days, now); n > 0 { + push.ToUser(app, p.GetString("user"), push.Message{ + Title: fmt.Sprintf("Keep your %d-day streak", n), + Body: "One short lesson today keeps it going.", + URL: "/", + Tag: "streak", + }) + } + } + return nil +} + +// streakAtRisk is the length of the streak that ends tonight: the run of days +// with XP up to yesterday, if there is none yet today. 0 means nothing to remind. +func streakAtRisk(days map[string]float64, now time.Time) int { + if days[now.Format(time.DateOnly)] > 0 { + return 0 + } + n := 0 + for d := now.AddDate(0, 0, -1); days[d.Format(time.DateOnly)] > 0; d = d.AddDate(0, 0, -1) { + n++ + } + return n +} diff --git a/backend/app/streak_test.go b/backend/app/streak_test.go new file mode 100644 index 0000000..42a6f4a --- /dev/null +++ b/backend/app/streak_test.go @@ -0,0 +1,27 @@ +package app + +import ( + "testing" + "time" +) + +func TestStreakAtRisk(t *testing.T) { + now := time.Date(2026, 11, 17, 19, 0, 0, 0, time.Local) + cases := []struct { + name string + days map[string]float64 + want int + }{ + {"no practice ever", nil, 0}, + {"already practised today", map[string]float64{"2026-11-16": 20, "2026-11-17": 10}, 0}, + {"three days in a row up to yesterday", map[string]float64{"2026-11-14": 10, "2026-11-15": 30, "2026-11-16": 10}, 3}, + {"a gap breaks the run", map[string]float64{"2026-11-13": 10, "2026-11-15": 30, "2026-11-16": 10}, 2}, + {"last practice two days ago: the streak is already gone", map[string]float64{"2026-11-15": 30}, 0}, + {"a day with no XP doesn't count", map[string]float64{"2026-11-16": 0}, 0}, + } + for _, c := range cases { + if got := streakAtRisk(c.days, now); got != c.want { + t.Errorf("%s: got %d, want %d", c.name, got, c.want) + } + } +} diff --git a/backend/migrations/1762000000_practice.go b/backend/migrations/1762000000_practice.go new file mode 100644 index 0000000..1f63713 --- /dev/null +++ b/backend/migrations/1762000000_practice.go @@ -0,0 +1,79 @@ +package migrations + +import ( + "github.com/pocketbase/pocketbase/core" + m "github.com/pocketbase/pocketbase/migrations" + "github.com/pocketbase/pocketbase/tools/types" +) + +// Each person's practice: their levels, XP and streak ("progress", one record +// each) and every lesson and mock test they finish ("practice_sessions"). Both +// are private: nobody else, not even the owner, can read them. A finished +// session is a record of what happened, so it can't be edited, only deleted. +func init() { + m.Register(func(app core.App) error { + users, err := app.FindCollectionByNameOrId("users") + if err != nil { + return err + } + own := types.Pointer(`user = @request.auth.id`) + create := types.Pointer(`@request.auth.collectionName = "users" && @request.body.user = @request.auth.id`) + + progress := core.NewBaseCollection("progress") + progress.Fields.Add( + &core.RelationField{Name: "user", CollectionId: users.Id, Required: true, MaxSelect: 1, CascadeDelete: true}, + &core.NumberField{Name: "xp", OnlyInt: true, Min: types.Pointer(0.0), Max: types.Pointer(100_000_000.0)}, + &core.NumberField{Name: "daily_goal", OnlyInt: true, Min: types.Pointer(0.0), Max: types.Pointer(1000.0)}, + // level per question type, {"series": {"level": 3}, ...} + &core.JSONField{Name: "skills", MaxSize: 2_000}, + // XP earned per day, {"2026-11-17": 60, ...}; the web app keeps about a year + &core.JSONField{Name: "days", MaxSize: 32_000}, + // an evening notification when the streak is about to break + &core.BoolField{Name: "reminders"}, + &core.AutodateField{Name: "created", OnCreate: true}, + &core.AutodateField{Name: "updated", OnCreate: true, OnUpdate: true}, + ) + progress.AddIndex("idx_progress_user", true, "user", "") + progress.ListRule, progress.ViewRule, progress.DeleteRule = own, own, own + progress.CreateRule = create + progress.UpdateRule = types.Pointer(`user = @request.auth.id && (@request.body.user:isset = false || @request.body.user = @request.auth.id)`) + if err := app.Save(progress); err != nil { + return err + } + + sessions := core.NewBaseCollection("practice_sessions") + sessions.Fields.Add( + &core.RelationField{Name: "user", CollectionId: users.Id, Required: true, MaxSelect: 1, CascadeDelete: true}, + &core.SelectField{Name: "kind", Values: []string{"practice", "test"}, MaxSelect: 1, Required: true}, + // which skill a lesson practised (mix: all four) + &core.SelectField{Name: "family", Values: []string{"series", "grid", "shapes", "pairs", "mix"}, MaxSelect: 1}, + // a mock test's length + &core.SelectField{Name: "mode", Values: []string{"full", "quick"}, MaxSelect: 1}, + &core.NumberField{Name: "level", OnlyInt: true, Min: types.Pointer(0.0), Max: types.Pointer(9.0)}, + &core.NumberField{Name: "level_after", OnlyInt: true, Min: types.Pointer(0.0), Max: types.Pointer(9.0)}, + &core.DateField{Name: "started", Required: true}, + &core.DateField{Name: "ended", Required: true}, + // every question, the answer given, the time taken and any help used + &core.JSONField{Name: "items", MaxSize: 400_000}, + // the score: correct answers, and for a test the stanine and its margin + &core.JSONField{Name: "result", MaxSize: 4_000}, + &core.AutodateField{Name: "created", OnCreate: true}, + ) + sessions.AddIndex("idx_practice_sessions_user", false, "user, started", "") + sessions.ListRule, sessions.ViewRule, sessions.DeleteRule = own, own, own + sessions.CreateRule = create + sessions.UpdateRule = nil // superusers only + return app.Save(sessions) + }, func(app core.App) error { + for _, name := range []string{"practice_sessions", "progress"} { + c, err := app.FindCollectionByNameOrId(name) + if err != nil { + return err + } + if err := app.Delete(c); err != nil { + return err + } + } + return nil + }) +} From fc3be051874db76799759deae891722d5f6fa7e2 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 15:17:04 +0100 Subject: [PATCH 2/4] Check missed job runs before serving, so the check never outlives the app The same fix Troye has: the catch-up check ran in a goroutine that could query the database after a test app was cleaned up. --- backend/jobs/jobs.go | 28 +- web/src/lib/engine.test.ts | 123 +++ web/src/lib/engine.ts | 1860 ++++++++++++++++++++++++++++++++++++ 3 files changed, 2003 insertions(+), 8 deletions(-) create mode 100644 web/src/lib/engine.test.ts create mode 100644 web/src/lib/engine.ts diff --git a/backend/jobs/jobs.go b/backend/jobs/jobs.go index 44e15cd..65ec39c 100644 --- a/backend/jobs/jobs.go +++ b/backend/jobs/jobs.go @@ -42,7 +42,11 @@ func MustAdd(app core.App, name, cronExpr string, fn Func) { app.Cron().MustAdd(name, cronExpr, func() { Run(app, name, fn) }) app.OnServe().BindFunc(func(se *core.ServeEvent) error { - go catchUp(se.App, name, schedule, fn, time.Now()) + // checked before serving, so it never outlives the app; only a run goes + // to the background, so a slow job doesn't hold up the start + if due(se.App, name, schedule, time.Now()) { + go Run(se.App, name, fn) + } return se.Next() }) } @@ -97,15 +101,22 @@ func record(app core.App, name string, start time.Time, took time.Duration, runE return app.Save(rec) } -// catchUp runs the job if a scheduled time passed since its last run. A job -// seen for the first time is only recorded, so adding one doesn't run it. +// catchUp runs the job if a scheduled time passed since its last run. func catchUp(app core.App, name string, schedule *cron.Schedule, fn Func, now time.Time) { + if due(app, name, schedule, now) { + Run(app, name, fn) + } +} + +// due reports whether a scheduled time passed since the job's last run. A job +// seen for the first time is only recorded, so adding one doesn't run it. +func due(app core.App, name string, schedule *cron.Schedule, now time.Time) bool { rec, err := app.FindFirstRecordByData(Collection, "name", name) if err != nil { col, err := app.FindCollectionByNameOrId(Collection) if err != nil { app.Logger().Error("Jobs collection missing", "error", err) - return + return false } rec = core.NewRecord(col) rec.Set("name", name) @@ -113,13 +124,14 @@ func catchUp(app core.App, name string, schedule *cron.Schedule, fn Func, now ti if err := app.Save(rec); err != nil { app.Logger().Error("Could not record new job", "job", name, "error", err) } - return + return false } last := rec.GetDateTime("last_run").Time() - if missed(schedule, last, now) { - app.Logger().Info("Catching up on a missed job run", "job", name, "last_run", last) - Run(app, name, fn) + if !missed(schedule, last, now) { + return false } + app.Logger().Info("Catching up on a missed job run", "job", name, "last_run", last) + return true } // missed reports whether the schedule was due at any minute after last, up to diff --git a/web/src/lib/engine.test.ts b/web/src/lib/engine.test.ts new file mode 100644 index 0000000..9fd56a1 --- /dev/null +++ b/web/src/lib/engine.test.ts @@ -0,0 +1,123 @@ +import { describe, expect, it } from 'vitest'; +import { + FAMILIES, + estimate, + fmt, + makeItem, + nextAdaptive, + pCorrect, + thetaToStanine, + type Family, + type Item, + type Response, +} from './engine'; + +const families = Object.values(FAMILIES); +const SUP = '⁰¹²³⁴⁵⁶⁷⁸⁹'; + +/** Every visible number of a question, with null for the missing one. */ +function cells(it: Item) { + const v = it.view; + if (v.kind === 'series') return v.cells; + if (v.kind === 'grid') return v.cells.flat(); + if (v.kind === 'pairs') return v.pairs.flat(); + return v.figs.flatMap((f) => [...f.outer, f.centre]); +} + +/** Works out a sum such as "4 × 6 + 3 = 27" and says whether it is right. */ +function sumIsRight(line: string): boolean { + let l = line.replace(' ✓', '').replace('work backwards: ', ''); + if (l.includes('→')) l = l.split('→')[1]; + if (l.includes('?')) return true; // an equation still to solve + const [lhs, rhs] = l.split(' = '); + const expr = lhs + .replace(/×/g, '*') + .replace(/−/g, '-') + .replace(/÷/g, '/') + .replace( + /(\d)([⁰¹²³⁴⁵⁶⁷⁸⁹]+)/g, + (_, b, s: string) => `${b}**${[...s].map((c) => SUP.indexOf(c)).join('')}`, + ); + expect(expr).toMatch(/^[\d\s+\-*/()]+$/); + return Function(`return (${expr})`)() === Number(rhs.replace('−', '-')); +} + +describe('questions', () => { + for (const fam of families) { + for (let level = fam.min; level <= fam.max; level++) { + it(`${fam.id} level ${level}: whole numbers, one gap, and a solution whose sums add up`, () => { + for (let n = 0; n < 150; n++) { + const it = makeItem(fam.id, level); + const cs = cells(it); + expect(cs.filter((c) => c === null)).toHaveLength(1); + for (const c of cs) + if (c !== null) expect(Number.isInteger(c) && c >= 0 && c <= 5000).toBe(true); + expect(Number.isInteger(it.answer) && it.answer >= 0).toBe(true); + expect(it.think.length).toBeGreaterThan(2); + expect(it.nudge).not.toBe(''); + expect(JSON.stringify(it)).not.toMatch(/undefined|NaN/); + const last = it.guide[it.guide.length - 1]; + expect(last.final && last.t.includes(fmt(it.answer))).toBe(true); + for (const step of it.guide) { + for (const line of step.lines ?? []) expect(sumIsRight(line), line).toBe(true); + for (const h of step.hl ?? []) expect(h).toBeLessThan(cs.length); + } + } + }); + } + } + + it('a series shows the gaps under its boxes only when gaps are the pattern', () => { + for (let n = 0; n < 100; n++) { + const it = makeItem('series', 1); + expect(it.view.kind === 'series' && it.view.diffs).toBe(true); + expect(it.full?.length).toBe(cells(it).length); + } + }); +}); + +describe('adaptive scoring', () => { + it('starts in the middle with a wide margin', () => { + const e = estimate([]); + expect(Math.abs(e.theta)).toBeLessThan(0.01); + expect(e.se).toBeGreaterThan(0.9); + }); + + it('moves up with right answers and down with wrong ones', () => { + const hard: Response = { b: 1.4, correct: true }; + const easy: Response = { b: -1.4, correct: false }; + expect(estimate([hard, hard]).theta).toBeGreaterThan(0.5); + expect(estimate([easy, easy]).theta).toBeLessThan(-0.5); + }); + + it('finds a simulated candidate within about one stanine after 15 questions', () => { + for (const truth of [-1.5, 0, 1.5]) { + let sq = 0; + const runs = 60; + for (let r = 0; r < runs; r++) { + const responses: Response[] = []; + const history: { family: Family }[] = []; + for (let q = 0; q < 15; q++) { + const it = nextAdaptive(responses, history); + history.push(it); + responses.push({ b: it.b, correct: Math.random() < pCorrect(truth, it.b) }); + } + sq += (estimate(responses).theta - truth) ** 2; + } + // 0.6 on this scale is 1.2 stanines + expect(Math.sqrt(sq / runs)).toBeLessThan(0.6); + } + }); + + it('asks for every question type in turn', () => { + const history: { family: Family }[] = []; + for (let q = 0; q < 8; q++) history.push(nextAdaptive([], history)); + expect(new Set(history.map((h) => h.family)).size).toBe(4); + }); + + it('maps ability to the 1-9 stanine scale', () => { + expect(thetaToStanine(0)).toBe(5); + expect(thetaToStanine(-5)).toBe(1); + expect(thetaToStanine(5)).toBe(9); + }); +}); diff --git a/web/src/lib/engine.ts b/web/src/lib/engine.ts new file mode 100644 index 0000000..3132eda --- /dev/null +++ b/web/src/lib/engine.ts @@ -0,0 +1,1860 @@ +/* The question engine: generators for four kinds of numerical reasoning + question at levels 1-9, their plain-language help, and adaptive scoring + (a 2PL item response model with an EAP ability estimate). It has no + dependencies, so it is tested on its own (engine.test.ts). */ + +export type Family = 'series' | 'grid' | 'shapes' | 'pairs'; +export type Cell = number | null; +type Sym = number | string; +export type View = + | { kind: 'series'; cells: Cell[]; diffs: boolean } + | { kind: 'grid'; cells: Cell[][] } + | { kind: 'plus' | 'tri'; figs: { outer: Cell[]; centre: Cell }[] } + | { kind: 'pairs'; pairs: Cell[][] }; +/** One step of a solution walkthrough. `hl` are cell indexes to highlight (see below). */ +export interface GuideStep { + t: string; + lines?: string[]; + hl?: number[]; + gaps?: boolean; + reveal?: boolean; + final?: boolean; +} +export interface Item { + id: string; + family: Family; + level: number; + /** difficulty on the ability scale */ + b: number; + prompt: string; + view: View; + answer: number; + /** the whole series, missing number included (series only) */ + full?: number[]; + rule: string; + /** how to think about this kind of question (the hint, part 1) */ + think: string[]; + /** a pointer for this question that doesn't give the answer away (the hint, part 2) */ + nudge: string; + guide: GuideStep[]; + /** a short version of the guide, for feedback */ + steps: string[]; +} +export interface Response { + b: number; + correct: boolean; +} +type Range = [number, number]; +interface Op { + t: string; + f: (v: number) => number; +} +interface Seq { + seq: number[]; + free: number[]; + uses: (i: number) => number[]; + how: (i: number) => string; + interleaved?: boolean; +} +type SeriesKind = 'gaps' | 'ratio' | 'alt' | 'inter' | 'recur' | 'known'; +type SeriesRule = Seq & { kind: SeriesKind; rule: string; nudge: string }; +interface GridRule { + id: string; + f?: (a: number, b: number, k: number) => number; + e?: (a: Sym, b: Sym, k: number) => string; + say?: string | ((k: number) => string); + nudge?: string; + ra?: Range; + rb?: Range; + k?: boolean; + kr?: Range; +} +interface ShapeRule { + k: 'plus' | 'tri'; + f: (...v: number[]) => number; + e: (...v: Sym[]) => string; + say: string; + nudge: string; + rng: Range; + ok?: (v: number) => boolean; +} +interface PairsRule { + f: (x: number, k: number) => number; + e: (x: Sym, k: number) => string; + say: (k: number) => string; + nudge: string; + xr: Range; + kr?: Range; +} + +/* Reckon engine: item generators (levels 1-9), plain-language help, adaptive scoring (2PL IRT, EAP). + Framework-free so it can move into a Svelte/plasto app unchanged. + + Every item carries: + answer the missing number + think[] "how to think about this type" (hint, part 1) + nudge a pointer for this specific question that does not give the answer away (hint, part 2) + guide[] step-by-step solution: { t: text, lines?: [worked sums], hl?: [cell indexes], gaps?: bool, reveal?: bool } + steps[] short text version of the guide (used in feedback and review) + Cell indexes for highlights: + series i | grid r*3+c | plus figure f: outer j -> f*5+j (top,left,right,bottom), centre f*5+4 + tri figure f: corner j -> f*4+j (top,left,right), centre f*4+3 | pairs p: input p*2, output p*2+1 */ +const R = (a: number, b: number): number => a + Math.floor(Math.random() * (b - a + 1)); +const pick = (arr: readonly T[]): T => arr[Math.floor(Math.random() * arr.length)]; +export const shuffle = (arr: readonly T[]): T[] => { + const a = arr.slice(); + for (let i = a.length - 1; i > 0; i--) { + const j = R(0, i); + [a[i], a[j]] = [a[j], a[i]]; + } + return a; +}; +const distinct = (n: number, lo: number, hi: number): number[] => { + const s = new Set(); + let guard = 0; + while (s.size < n && guard++ < 500) s.add(R(lo, hi)); + return [...s]; +}; +const X = '×', + M = '−'; +const SUP = '⁰¹²³⁴⁵⁶⁷⁸⁹'; +const sup = (n: Sym): string => + String(n) + .split('') + .map((d) => SUP[+d] ?? d) + .join(''); +export const fmt = (n: number): string => (n < 0 ? M + Math.abs(n) : String(n)); +export const LEVEL_B = (lvl: number): number => (lvl - 5) * 0.7; // item difficulty on the ability (logit) scale +const range = (a: number, b: number): number[] => + Array.from({ length: b - a + 1 }, (_, i) => a + i); + +/* ================= SERIES ================= */ +// Building blocks. Each returns { seq, how(i): plain sum for box i, uses(i): boxes it is built from, free: boxes that are free starting values }. +const op = (t: string, f: (v: number) => number): Op => ({ t, f }); +const add = (d: number): Op => + d >= 0 ? op('+ ' + d, (v) => v + d) : op(M + ' ' + -d, (v) => v + d); +const mul = (k: number): Op => op(X + ' ' + k, (v) => v * k); +const div = (k: number): Op => op('÷ ' + k, (v) => v / k); +function chain(a: number, ops: Op[]): Seq { + const s = [a]; + ops.forEach((o) => s.push(o.f(s[s.length - 1]))); + return { + seq: s, + free: [0], + uses: (i) => [i - 1], + how: (i) => `${fmt(s[i - 1])} ${ops[i - 1].t} = ${fmt(s[i])}`, + }; +} +function formula( + n0: number, + len: number, + f: (n: number) => number, + txt: (n: number) => string, +): Seq { + const s = range(0, len - 1).map((i) => f(n0 + i)); + return { seq: s, free: [], uses: () => [], how: (i) => `${txt(n0 + i)} = ${fmt(s[i])}` }; +} +function recur( + init: number[], + len: number, + f: (p: number[]) => number, + txt: (p: number[]) => string, +): Seq { + // txt(prev terms array) -> expression text + const k = init.length, + s = init.slice(); + while (s.length < len) s.push(f(s.slice(-k))); + return { + seq: s, + free: range(0, k - 1), + uses: (i) => range(i - k, i - 1), + how: (i) => `${txt(s.slice(i - k, i))} = ${fmt(s[i])}`, + }; +} +function interleave(c1: Seq, c2: Seq): Seq { + const s: number[] = []; + const n = c1.seq.length + c2.seq.length; + for (let i = 0; i < n; i++) s.push(i % 2 ? c2.seq[(i - 1) / 2] : c1.seq[i / 2]); + const map = (i: number): [Seq, number, number] => (i % 2 ? [c2, (i - 1) / 2, 1] : [c1, i / 2, 0]); + return { + seq: s, + interleaved: true, + free: [...c1.free.map((j) => 2 * j), ...c2.free.map((j) => 2 * j + 1)], + uses: (i) => { + const [c, j, o] = map(i); + return c.uses(j).map((u) => 2 * u + o); + }, + how: (i) => { + const [c, j] = map(i); + return c.how(j); + }, + }; +} +const rep = (n: number, o: Op): Op[] => Array(n).fill(o); +const PRIMES = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41]; +const FIB = [1, 1, 2, 3, 5, 8, 13, 21]; +const tri = (n: number) => (n * (n + 1)) / 2; +const sq = (n: number) => `${n} ${X} ${n}`; +const cube = (n: number) => `${n} ${X} ${n} ${X} ${n}`; +const sgnTxt = (c: number) => (c > 0 ? '+ ' + c : M + ' ' + -c); + +// kind: what to look at first (drives the first solution step) +// gaps = change between neighbours, ratio = multiplying, alt = operations take turns, +// inter = two series mixed, recur = built from earlier boxes, known = a familiar series +const sr = (s: Seq, m: { kind: SeriesKind; rule: string; nudge: string }): SeriesRule => ({ + ...s, + ...m, +}); +const S: Record SeriesRule)[]> = {}; +S[1] = [ + () => { + const d = R(2, 9); + return sr(chain(R(1, 20), rep(5, add(d))), { + kind: 'gaps', + rule: `Add ${d} each time.`, + nudge: 'The numbers climb slowly and evenly. By how much each step?', + }); + }, + () => { + const d = R(2, 9); + return sr(chain(R(55, 99), rep(5, add(-d))), { + kind: 'gaps', + rule: `Take away ${d} each time.`, + nudge: 'The numbers go down evenly. By how much each step?', + }); + }, +]; +S[2] = [ + () => + sr(chain(R(1, 7), rep(5, mul(2))), { + kind: 'ratio', + rule: 'Double the number each time (× 2).', + nudge: 'Each jump is bigger than the last one. Compare each number with the one before it.', + }), + () => { + const d = R(11, 19); + return sr(chain(R(10, 60), rep(5, add(d))), { + kind: 'gaps', + rule: `Add ${d} each time.`, + nudge: 'The steps are bigger, but still even.', + }); + }, + () => { + const s0 = R(1, 3); + return sr( + chain( + R(1, 12), + range(0, 4).map((i) => add(s0 + i)), + ), + { + kind: 'gaps', + rule: `The amount added goes up by 1 each time: +${s0}, +${s0 + 1}, +${s0 + 2}, …`, + nudge: + 'Write the change between neighbours under the boxes. Do the changes themselves follow a pattern?', + }, + ); + }, +]; +S[3] = [ + () => { + const d0 = R(1, 5), + inc = R(2, 4); + return sr( + chain( + R(1, 15), + range(0, 4).map((i) => add(d0 + inc * i)), + ), + { + kind: 'gaps', + rule: `The amount added goes up by ${inc} each time: +${d0}, +${d0 + inc}, +${d0 + 2 * inc}, …`, + nudge: 'Write the change between neighbours. The changes grow in a regular way.', + }, + ); + }, + () => + sr(chain(R(1, 4), rep(5, mul(3))), { + kind: 'ratio', + rule: 'Multiply by 3 each time.', + nudge: 'The numbers grow very fast. Try dividing each number by the one before it.', + }), + () => + sr(chain(R(1, 5) * 64, rep(5, div(2))), { + kind: 'ratio', + rule: 'Halve the number each time (÷ 2).', + nudge: 'The numbers shrink quickly. Each one is a simple fraction of the one before.', + }), + () => { + const p = R(4, 9), + q = R(1, p - 1); + return sr( + chain( + R(5, 20), + range(0, 5).map((i) => (i % 2 ? add(-q) : add(p))), + ), + { + kind: 'alt', + rule: `Two steps take turns: add ${p}, then take away ${q}, again and again.`, + nudge: + 'It goes up, then down, then up… Look at the up-steps and the down-steps separately.', + }, + ); + }, +]; +S[4] = [ + () => { + const d1 = R(2, 6), + d2 = pick([-1, -2, -3, 2, 3, 4]); + return sr(interleave(chain(R(1, 10), rep(3, add(d1))), chain(R(20, 40), rep(3, add(d2)))), { + kind: 'inter', + rule: `Two series are mixed together. Boxes 1, 3, 5, 7 go ${sgnTxt(d1)} each time; boxes 2, 4, 6, 8 go ${sgnTxt(d2)} each time.`, + nudge: 'Small and large numbers alternate. Read every other box on its own.', + }); + }, + () => { + const k = R(1, 4); + return sr( + chain( + R(1, 5), + range(0, 4).map((i) => (i % 2 ? mul(2) : add(k))), + ), + { + kind: 'alt', + rule: `Two steps take turns: add ${k}, then double, again and again.`, + nudge: + 'The jumps are uneven: small, big, small, big. Maybe two different operations take turns.', + }, + ); + }, + () => { + const c = pick([1, -1, 2, 3]); + const o = op(`${X} 2 ${sgnTxt(c)}`, (v) => 2 * v + c); + return sr(chain(R(1, 5), rep(5, o)), { + kind: 'ratio', + rule: `Double the number, then ${c > 0 ? 'add ' + c : 'take away ' + -c}.`, + nudge: + 'Each number is roughly double the one before, but not exactly. What is left over each time?', + }); + }, + () => + sr( + formula(R(2, 6), 6, (n) => n * n, sq), + { + kind: 'known', + rule: 'These are square numbers: a number times itself (2 × 2, 3 × 3, 4 × 4, …).', + nudge: 'These numbers might look familiar from the multiplication tables.', + }, + ), +]; +S[5] = [ + () => { + const a = R(1, 5); + return sr( + recur( + [a, R(a, 8)], + 7, + (p) => p[0] + p[1], + (p) => `${p[0]} + ${p[1]}`, + ), + { + kind: 'recur', + rule: 'Each number is the two numbers before it added together.', + nudge: 'Look at three boxes in a row. Can you make the third from the first two?', + }, + ); + }, + () => { + const c = pick([-1, 1, 2, 3, -2]); + const n0 = c < 0 ? R(2, 5) : R(1, 5); + return sr( + formula( + n0, + 6, + (n) => n * n + c, + (n) => `${sq(n)} ${sgnTxt(c)}`, + ), + { + kind: 'known', + rule: `Square numbers ${c > 0 ? 'plus ' + c : 'minus ' + -c}: take a number times itself, then ${c > 0 ? 'add ' + c : 'take away ' + -c}.`, + nudge: + 'Each number sits just next to a well-known number from the times tables (4, 9, 16, 25, …).', + }, + ); + }, + () => { + const d = R(1, 4); + return sr( + chain( + R(1, 15), + range(0, 4).map((i) => add(d * 2 ** i)), + ), + { + kind: 'gaps', + rule: `The amount added doubles each time: +${d}, +${2 * d}, +${4 * d}, …`, + nudge: + 'Write the change between neighbours. How does each change relate to the one before?', + }, + ); + }, + () => { + const k = R(1, 5); + return sr( + chain( + R(2, 4), + range(0, 4).map((i) => (i % 2 ? add(-k) : mul(3))), + ), + { + kind: 'alt', + rule: `Two steps take turns: multiply by 3, then take away ${k}.`, + nudge: 'Big jump, small drop, big jump… Two operations take turns.', + }, + ); + }, + () => + sr( + formula(R(1, 4), 6, (n) => n ** 3, cube), + { + kind: 'known', + rule: 'These are cube numbers: a number times itself, times itself again (2 × 2 × 2, 3 × 3 × 3, …).', + nudge: + 'Fast growth from small numbers. Think of a number multiplied by itself more than once.', + }, + ), +]; +S[6] = [ + () => { + const d = R(2, 7); + return sr(interleave(chain(R(1, 4), rep(3, mul(2))), chain(R(3, 20), rep(3, add(d)))), { + kind: 'inter', + rule: `Two series are mixed together. Boxes 1, 3, 5, 7 double each time; boxes 2, 4, 6, 8 go up by ${d}.`, + nudge: 'The numbers jump around. Read every other box on its own.', + }); + }, + () => + sr( + chain( + R(1, 5), + range(0, 4).map((i) => op(`${X} 2 + ${i + 1}`, (v) => 2 * v + i + 1)), + ), + { + kind: 'ratio', + rule: 'Double the number, then add 1, then 2, then 3, … (one more each time).', + nudge: + 'Each number is a little more than double the one before. Is that "little more" changing?', + }, + ), + () => { + const k = R(1, 2); + return sr( + chain( + R(1, 20), + range(0, 4).map((i) => add((k + i) ** 2)), + ), + { + kind: 'gaps', + rule: `The amounts added are square numbers: ${range(k, k + 4) + .map((n) => n * n) + .join(', ')}.`, + nudge: 'Write the change between neighbours. Do those changes look familiar?', + }, + ); + }, + () => + sr( + chain( + R(1, 3), + range(1, 5).map((k) => mul(k)), + ), + { + kind: 'ratio', + rule: 'Multiply by 1, then by 2, then by 3, then by 4, …', + nudge: 'Divide each number by the one before it. The result changes, but in a simple way.', + }, + ), + () => { + const d0 = R(1, 3); + return sr( + chain( + R(30, 60), + range(1, 5).map((i) => add(-d0 * i)), + ), + { + kind: 'gaps', + rule: `Take away ${d0}, then ${2 * d0}, then ${3 * d0}, … (the drop grows by ${d0} each time).`, + nudge: 'The numbers fall faster and faster. Write the drops under the boxes.', + }, + ); + }, +]; +S[7] = [ + () => { + const s0 = R(0, 2); + return sr( + chain( + R(1, 20), + range(0, 4).map((i) => add(PRIMES[s0 + i])), + ), + { + kind: 'gaps', + rule: `The amounts added are prime numbers in order: ${PRIMES.slice(s0, s0 + 5).join(', ')}.`, + nudge: 'Write the change between neighbours. Those changes are a famous list of numbers.', + }, + ); + }, + () => { + const p = R(2, 6), + q = R(1, 5); + const ops = [add(p), mul(2), add(-q)]; + return sr( + chain( + R(1, 6), + range(0, 6).map((i) => ops[i % 3]), + ), + { + kind: 'alt', + rule: `Three steps repeat in a cycle: add ${p}, double, take away ${q}, then start again.`, + nudge: 'No single step works. The pattern may repeat every three steps.', + }, + ); + }, + () => { + const s0 = R(1, 3); + return sr( + chain( + R(1, 15), + range(0, 4).map((i) => add(tri(s0 + i))), + ), + { + kind: 'gaps', + rule: `The amounts added are ${range(0, 4) + .map((i) => tri(s0 + i)) + .join( + ', ', + )}, and those go up by ${s0 + 1}, ${s0 + 2}, ${s0 + 3}, … (a pattern inside the pattern).`, + nudge: 'Write the changes between neighbours, then the changes between those changes.', + }, + ); + }, + () => + sr( + recur( + [R(1, 2), R(1, 3), R(2, 4)], + 7, + (p) => p[0] + p[1] + p[2], + (p) => p.join(' + '), + ), + { + kind: 'recur', + rule: 'Each number is the three numbers before it added together.', + nudge: 'Adding the two previous numbers is not quite enough. Try more of them.', + }, + ), + () => { + const k = R(1, 3); + return sr( + chain( + R(3, 5), + range(1, 5).map((i) => op(`${X} 2 ${M} ${k * i}`, (v) => 2 * v - k * i)), + ), + { + kind: 'ratio', + rule: `Double the number, then take away ${k}, then ${2 * k}, then ${3 * k}, … (more each time).`, + nudge: 'Each number is a bit less than double the one before. Is the shortfall changing?', + }, + ); + }, +]; +S[8] = [ + () => + sr( + recur( + [R(1, 3), R(2, 3)], + 6, + (p) => p[0] * p[1], + (p) => `${p[0]} ${X} ${p[1]}`, + ), + { + kind: 'recur', + rule: 'Each number is the two numbers before it multiplied together.', + nudge: + 'Look at three boxes in a row. The third is built from the first two, but not by adding.', + }, + ), + () => + sr( + formula( + R(1, 6), + 6, + (n) => n * (n + 1), + (n) => `${n} ${X} ${n + 1}`, + ), + { + kind: 'known', + rule: 'Each number is a number times the next number up: 2 × 3, 3 × 4, 4 × 5, …', + nudge: 'Try to split each number into two factors that sit next to each other.', + }, + ), + () => { + const off = R(0, 2); + return sr( + chain( + R(1, 10), + range(0, 4).map((i) => add(FIB[off + i])), + ), + { + kind: 'gaps', + rule: `The amounts added are ${FIB.slice(off, off + 5).join(', ')}: each one is the two before it added together.`, + nudge: + 'Write the changes between neighbours. How is each change made from earlier changes?', + }, + ); + }, + () => { + const n0 = R(2, 5); + return sr( + interleave( + formula(n0, 4, (n) => n * n, sq), + chain(R(1, 3), rep(3, mul(3))), + ), + { + kind: 'inter', + rule: `Two series are mixed together. Boxes 1, 3, 5, 7 are square numbers (${n0} × ${n0}, ${n0 + 1} × ${n0 + 1}, …); boxes 2, 4, 6, 8 multiply by 3.`, + nudge: 'Read every other box on its own. Each half is a series you know.', + }, + ); + }, + () => { + const k = pick([-1, 1, 2]); + return sr( + recur( + [R(1, 4), R(2, 5)], + 7, + (p) => p[0] + p[1] + k, + (p) => `${p[0]} + ${p[1]} ${sgnTxt(k)}`, + ), + { + kind: 'recur', + rule: `Add the two numbers before it, then ${k > 0 ? 'add ' + k : 'take away ' + -k}.`, + nudge: 'Adding the two previous numbers almost works. What is the small difference?', + }, + ); + }, +]; +S[9] = [ + () => { + let d = R(2, 4); + const ops = []; + for (let i = 0; i < 5; i++) { + ops.push(add(d)); + d = 2 * d - 1; + } + return sr(chain(R(1, 10), ops), { + kind: 'gaps', + rule: `The amounts added follow their own rule: each one is double the previous one, minus 1 (${ops.map((o) => o.t.replace('+ ', '')).join(', ')}).`, + nudge: + 'Write the changes between neighbours. How is each change made from the one before it?', + }); + }, + () => + sr( + recur( + [1, R(2, 4)], + 6, + (p) => 3 * p[1] - p[0], + (p) => `3 ${X} ${p[1]} ${M} ${p[0]}`, + ), + { + kind: 'recur', + rule: 'Each number is 3 times the number before it, minus the number before that.', + nudge: + 'Each number is close to 3 times the previous one. Compare the shortfall with earlier boxes.', + }, + ), + () => + sr( + chain( + R(2, 4), + range(0, 5).map((i) => (i % 2 ? add(-(i + 1) / 2) : mul(3))), + ), + { + kind: 'alt', + rule: 'Two steps take turns: multiply by 3, then take away 1, 2, 3, … (one more each time).', + nudge: 'Big jumps and small drops take turns, and the drops are not all the same.', + }, + ), + () => + sr( + formula( + R(1, 5), + 6, + (n) => n * n * (n + 1), + (n) => `${n} ${X} ${n} ${X} ${n + 1}`, + ), + { + kind: 'known', + rule: 'Each number is a square number times the next number up: 2 × 2 × 3, 3 × 3 × 4, …', + nudge: 'Break each number into factors. A square number is hiding in each one.', + }, + ), + () => { + const d = R(3, 7); + const a = R(1, 3); + return sr( + interleave( + recur( + [a, R(2, 5)], + 5, + (p) => p[0] + p[1], + (p) => `${p[0]} + ${p[1]}`, + ), + chain(50, rep(3, add(-d))), + ), + { + kind: 'inter', + rule: `Two series are mixed together. In boxes 1, 3, 5, 7, 9 each number is the two before it (in that series) added together; boxes 2, 4, 6, 8 go down by ${d}.`, + nudge: + 'Read every other box on its own. One half goes down steadily; the other builds on itself.', + }, + ); + }, +]; + +export const THINK: Record<'series' | 'grid' | 'plus' | 'tri' | 'pairs', string[]> = { + series: [ + 'Read the row from left to right. Is it going up or down? Slowly or quickly?', + 'Slow, even steps usually mean adding or taking away. Very fast growth usually means multiplying.', + 'Write the change between each pair of neighbours under the boxes. The pattern is often hiding in those changes.', + 'If the numbers jump up and down, read every other box on its own: two series may be mixed together.', + ], + grid: [ + 'Think of each row as a little sum: the first two numbers are combined to make the third.', + 'Pick a row with no ? and try the simplest ideas first: add, take away, multiply.', + 'Whatever you find must work for every complete row. If no row rule works, try the columns instead.', + 'Then use the same rule on the row with the ?.', + ], + plus: [ + 'Every figure follows the same recipe: the four outer numbers are combined to make the centre.', + 'Start with a complete figure. Add all four outer numbers first. Is the centre bigger or smaller than that?', + 'If adding is too small, some numbers are probably multiplied. Try pairing opposite boxes: top with bottom, left with right.', + 'Check your idea on the second figure, then use it on the figure with the ?.', + ], + tri: [ + 'Every triangle follows the same recipe: the three corners are combined to make the number in the middle.', + 'Start with a complete triangle. Add the corners first. Is the middle bigger or smaller than that?', + 'If adding is too small, try multiplying two of the corners and then adding or taking away the third.', + 'Check your idea on the other triangle, then use it on the one with the ?.', + ], + pairs: [ + 'Each left number goes through the same hidden "machine" and comes out as the right number.', + 'Compare sizes: if outputs are a bit bigger, think adding. About double or triple, think multiplying. Growing much faster, think squaring (a number times itself).', + 'Test your idea on every pair, not just the first one. Many ideas work once, but only one works for all.', + 'Then put the last number through the same machine.', + ], +}; +const BACKWARDS = + 'Here the ? is one of the starting numbers, not the result. Find the rule first, then work backwards: which number would make the rule come out right?'; + +function genSeries(level: number): Omit { + let r: SeriesRule | null = null, + g = 0; + while (!r && g++ < 50) { + r = pick(S[level])(); + if (r && r.seq.some((v) => v < 0 || v > 5000 || !Number.isInteger(v))) r = null; + } + if (!r) throw new Error(`no series at level ${level}`); + const rr: SeriesRule = r; + const s = rr.seq, + n = s.length; + const allowed = range(0, n - 1).filter((i) => !rr.free.includes(i)); + let miss; + if (level <= 3) miss = n - 1; + else if (level <= 6) + miss = + Math.random() < 0.6 + ? n - 1 + : pick(allowed.filter((i) => i >= 2 && i <= n - 2).concat([n - 1])); + else miss = pick(allowed.filter((i) => i >= 2)); + const answer = s[miss]; + const cells = s.map((v, i) => (i === miss ? null : v)); + + // Solution guide + const known = (i: number) => i !== miss && !rr.uses(i).includes(miss); + const examples = allowed.filter((i) => known(i)).slice(0, 3); + const guide: GuideStep[] = []; + const first = ( + { + gaps: 'Compare each box with the one before it. Write down how much it changes:', + ratio: + 'The numbers change by more and more, so compare each box with the one before it using multiplication:', + alt: 'Write down how you get from each box to the next one:', + inter: 'The row jumps around, so read every other box on its own:', + recur: 'Look at three boxes in a row and see how the last one is made from the earlier ones:', + known: 'Compare each box with numbers you know from the times tables:', + } as Record + )[rr.kind]; + guide.push({ + t: first, + lines: examples.map((i) => rr.how(i)), + hl: [...new Set(examples.flatMap((i) => [...rr.uses(i), i]))], + gaps: rr.kind === 'gaps', + }); + guide.push({ t: 'So the pattern is: ' + lower(rr.rule), hl: [] }); + guide.push({ + t: 'Use the pattern for the ? box:', + lines: [rr.how(miss)], + hl: [...rr.uses(miss), miss], + reveal: true, + }); + const after = range(miss + 1, n - 1).find((j) => rr.uses(j).includes(miss)); + if (after !== undefined) + guide.push({ + t: 'Check: the next box in the pattern works too.', + lines: [rr.how(after) + ' ✓'], + hl: [...rr.uses(after), after], + reveal: true, + }); + guide.push({ + t: `So the missing number is ${fmt(answer)}.`, + hl: [miss], + reveal: true, + final: true, + }); + + return { + family: 'series', + level, + view: { kind: 'series', cells, diffs: rr.kind === 'gaps' }, + answer, + full: s, + rule: rr.rule, + think: THINK.series, + nudge: rr.nudge, + guide, + steps: [rr.rule, `${rr.how(miss)}, so the missing number is ${fmt(answer)}.`], + }; +} +const lower = (t: string) => t.charAt(0).toLowerCase() + t.slice(1); + +/* ================= FORMULA RULES: grids ================= */ +// f: rule, e: sum with numbers, say: plain words, nudge: pointer without the answer +const G: Record = { + 2: [ + { + id: 'add', + f: (a, b) => a + b, + e: (a, b) => `${a} + ${b}`, + say: 'add the first two numbers', + nudge: 'The third number is about the size of the first two together.', + ra: [1, 25], + rb: [1, 25], + }, + { id: 'rowsum' }, + ], + 3: [ + { + id: 'sub', + f: (a, b) => a - b, + e: (a, b) => `${a} ${M} ${b}`, + say: 'take the second number away from the first', + nudge: 'The third number is smaller than the first one. Something is being taken away.', + ra: [12, 50], + rb: [1, 11], + }, + { + id: 'add2', + f: (a, b) => a + b, + e: (a, b) => `${a} + ${b}`, + say: 'add the first two numbers', + nudge: 'The third number is about the size of the first two together.', + ra: [15, 70], + rb: [15, 70], + }, + ], + 4: [ + { + id: 'mul', + f: (a, b) => a * b, + e: (a, b) => `${a} ${X} ${b}`, + say: 'multiply the first two numbers', + nudge: 'The third number is much bigger than the first two. Think multiplication.', + ra: [2, 9], + rb: [2, 9], + }, + { id: 'colsum' }, + { + id: 'a2b', + f: (a, b) => a + 2 * b, + e: (a, b) => `${a} + 2 ${X} ${b}`, + say: 'add the first number to double the second', + nudge: + 'Adding the first two gets close but falls short. One of the numbers seems to count twice.', + ra: [1, 20], + rb: [1, 12], + }, + ], + 5: [ + { + id: 'sumx2', + f: (a, b) => (a + b) * 2, + e: (a, b) => `(${a} + ${b}) ${X} 2`, + say: 'add the first two numbers, then double the total', + nudge: 'Add the first two numbers and compare that total with the third number.', + ra: [1, 15], + rb: [1, 15], + }, + { + id: 'mulk', + k: true, + f: (a, b, k) => a * b + k, + e: (a, b, k) => `${a} ${X} ${b} + ${k}`, + say: (k) => `multiply the first two numbers, then add ${k}`, + nudge: 'Multiplying gets very close. Look at what is left over: it is the same in every row.', + ra: [2, 9], + rb: [2, 9], + }, + { + id: 'addk', + k: true, + f: (a, b, k) => a + b + k, + e: (a, b, k) => `${a} + ${b} + ${k}`, + say: (k) => `add the first two numbers, then add ${k} more`, + nudge: 'Adding gets close. Look at what is left over: it is the same in every row.', + ra: [3, 30], + rb: [3, 30], + }, + ], + 6: [ + { + id: 'sqb', + f: (a, b) => a * a + b, + e: (a, b) => `${a} ${X} ${a} + ${b}`, + say: 'multiply the first number by itself, then add the second', + nudge: + 'The first number seems to matter much more than the second. Try multiplying it by itself.', + ra: [2, 9], + rb: [1, 15], + }, + { + id: 'mulmina', + f: (a, b) => a * b - a, + e: (a, b) => `${a} ${X} ${b} ${M} ${a}`, + say: 'multiply the first two numbers, then take the first number away again', + nudge: + 'Multiplying the first two overshoots a little. Compare the overshoot with the first number.', + ra: [2, 9], + rb: [2, 9], + }, + { + id: 'diffk', + k: true, + kr: [2, 4], + f: (a, b, k) => (a - b) * k, + e: (a, b, k) => `(${a} ${M} ${b}) ${X} ${k}`, + say: (k) => `find the difference between the first two numbers, then multiply it by ${k}`, + nudge: + 'Start with the difference between the first two numbers, then compare it with the third.', + ra: [8, 20], + rb: [1, 7], + }, + ], + 7: [ + { + id: 'sqdiff', + f: (a, b) => a * a - b * b, + e: (a, b) => `${a} ${X} ${a} ${M} ${b} ${X} ${b}`, + say: 'multiply each number by itself, then take the second result away from the first', + nudge: 'Square numbers (25, 36, 49, …) are involved, with something taken away.', + ra: [5, 12], + rb: [1, 4], + }, + { + id: 'mulminsum', + f: (a, b) => a * b - (a + b), + e: (a, b) => `${a} ${X} ${b} ${M} ${a} ${M} ${b}`, + say: 'multiply the two numbers, then take both of them away', + nudge: 'Multiplying overshoots. Compare the overshoot with the two numbers.', + ra: [3, 9], + rb: [3, 9], + }, + { + id: 'mulplussum', + f: (a, b) => a * b + a + b, + e: (a, b) => `${a} ${X} ${b} + ${a} + ${b}`, + say: 'multiply the two numbers, then add both of them', + nudge: 'Multiplying falls short. Compare what is missing with the two numbers.', + ra: [2, 9], + rb: [2, 9], + }, + { + id: 'mulb1', + f: (a, b) => a * (b + 1), + e: (a, b) => `${a} ${X} (${b} + 1)`, + say: 'add 1 to the second number, then multiply by the first', + nudge: 'Multiplying the two falls short by exactly one more of the first number.', + ra: [2, 12], + rb: [2, 9], + }, + ], + 8: [ + { + id: 'sqsum', + f: (a, b) => a * a + b * b, + e: (a, b) => `${a} ${X} ${a} + ${b} ${X} ${b}`, + say: 'multiply each number by itself, then add the two results', + nudge: 'Square numbers (1, 4, 9, 16, 25, …) are involved twice.', + ra: [1, 9], + rb: [1, 9], + }, + { + id: 'sumsq', + f: (a, b) => (a + b) ** 2, + e: (a, b) => `(${a} + ${b}) ${X} (${a} + ${b})`, + say: 'add the two numbers, then multiply the total by itself', + nudge: 'All the results are square numbers (a number times itself). Which number?', + ra: [1, 7], + rb: [1, 7], + }, + { + id: 'sqminb', + f: (a, b) => a * a - b, + e: (a, b) => `${a} ${X} ${a} ${M} ${b}`, + say: 'multiply the first number by itself, then take away the second', + nudge: 'Each result is just under a square number.', + ra: [4, 12], + rb: [1, 15], + }, + { + id: 'mul2minb', + f: (a, b) => 2 * a * b - b, + e: (a, b) => `2 ${X} ${a} ${X} ${b} ${M} ${b}`, + say: 'multiply the two numbers, double that, then take away the second number', + nudge: 'Multiplying gives roughly half of the result.', + ra: [2, 9], + rb: [2, 9], + }, + ], + 9: [ + { + id: 'sqsumina', + f: (a, b) => a * a + b * b - a, + e: (a, b) => `${a} ${X} ${a} + ${b} ${X} ${b} ${M} ${a}`, + say: 'multiply each number by itself, add the results, then take away the first number', + nudge: 'Two square numbers are involved, plus a small correction.', + ra: [2, 9], + rb: [1, 8], + }, + { + id: 'aab', + f: (a, b) => a * (a + b), + e: (a, b) => `${a} ${X} (${a} + ${b})`, + say: 'add the two numbers, then multiply the total by the first number', + nudge: 'Try adding the two numbers first, and then a multiplication.', + ra: [2, 9], + rb: [1, 9], + }, + { + id: 'mulminsqb', + f: (a, b) => a * b - b * b, + e: (a, b) => `${a} ${X} ${b} ${M} ${b} ${X} ${b}`, + say: 'multiply the two numbers, then take away the second number times itself', + nudge: 'Multiplying overshoots. The overshoot depends only on the second number.', + ra: [5, 12], + rb: [1, 4], + }, + { + id: 'cubeminb', + f: (a, b) => a ** 3 - b, + e: (a, b) => `${a} ${X} ${a} ${X} ${a} ${M} ${b}`, + say: 'multiply the first number by itself twice (a cube), then take away the second', + nudge: 'Each result is just under a cube number (8, 27, 64, 125, …).', + ra: [2, 6], + rb: [1, 20], + }, + ], +}; +const sayOf = (rule: GridRule, k: number): string => + typeof rule.say === 'function' ? rule.say(k) : (rule.say ?? ''); +const cap = (t: string) => t.charAt(0).toUpperCase() + t.slice(1); + +// Solve f(..x..) = target for one unknown argument by brute force; return value if unique non-negative integer. +function solveUnique(fn: (x: number) => boolean, lo = 0, hi = 300): number | null { + const sols: number[] = []; + for (let x = lo; x <= hi; x++) + if (fn(x)) { + sols.push(x); + if (sols.length > 1) return null; + } + return sols.length === 1 ? sols[0] : null; +} +const rowIdx = (r: number) => [r * 3, r * 3 + 1, r * 3 + 2]; +const colIdx = (c: number) => [c, 3 + c, 6 + c]; + +function genGrid(level: number): Omit { + const rule = pick(G[level]); + const rows: number[][] = []; + const base = { family: 'grid' as const, level, think: THINK.grid }; + if (rule.id === 'rowsum') { + const S0 = R(20, 45); + for (let i = 0; i < 3; i++) { + const a = R(1, S0 - 10), + b = R(1, S0 - a - 1); + rows.push([a, b, S0 - a - b]); + } + const mr = R(0, 2), + mc = R(0, 2), + ans = rows[mr][mc]; + const cells = rows.map((r, i) => r.map((v, j) => (i === mr && j === mc ? null : v))); + const full = [0, 1, 2].filter((i) => i !== mr); + const known = rows[mr].filter((_, j) => j !== mc), + part = known[0] + known[1]; + const guide: GuideStep[] = [ + { + t: 'Here the rule is not "first two make the third". Add up a complete row:', + lines: [`${rows[full[0]].join(' + ')} = ${S0}`], + hl: rowIdx(full[0]), + }, + { + t: 'Do the same with the other complete row:', + lines: [`${rows[full[1]].join(' + ')} = ${S0} ✓`], + hl: rowIdx(full[1]), + }, + { t: `So every row adds up to the same total: ${S0}.`, hl: [] }, + { + t: `In the row with the ?, add the two numbers you have, then find what is missing to reach ${S0}:`, + lines: [`${known[0]} + ${known[1]} = ${part}`, `${S0} ${M} ${part} = ${ans}`], + hl: rowIdx(mr), + reveal: true, + }, + { t: `So the missing number is ${ans}.`, hl: [mr * 3 + mc], reveal: true, final: true }, + ]; + return Object.assign(base, { + view: { kind: 'grid' as const, cells }, + answer: ans, + rule: `Every row adds up to ${S0}.`, + nudge: 'Add up all three numbers in each complete row and compare the totals.', + guide, + steps: [`Every row adds up to ${S0}.`, `${S0} ${M} ${part} = ${ans}.`], + }); + } + if (rule.id === 'colsum') { + for (let i = 0; i < 2; i++) rows.push([R(2, 30), R(2, 30), R(2, 30)]); + rows.push(rows[0].map((v, j) => v + rows[1][j])); + const mr = Math.random() < 0.35 ? R(0, 1) : 2, + mc = R(0, 2), + ans = rows[mr][mc]; + const cells = rows.map((r, i) => r.map((v, j) => (i === mr && j === mc ? null : v))); + const others = [0, 1, 2].filter((c) => c !== mc); + const lastLines = + mr === 2 + ? [`${rows[0][mc]} + ${rows[1][mc]} = ${ans}`] + : [ + `${mr === 0 ? '?' : rows[0][mc]} + ${mr === 1 ? '?' : rows[1][mc]} = ${rows[2][mc]}`, + `work backwards: ${rows[2][mc]} ${M} ${rows[1 - mr][mc]} = ${ans}`, + ]; + const last = lastLines.join(', '); + const guide: GuideStep[] = [ + { + t: "Reading across the rows doesn't give a rule here, so read down the columns instead:", + lines: [`${rows[0][others[0]]} + ${rows[1][others[0]]} = ${rows[2][others[0]]}`], + hl: colIdx(others[0]), + }, + { + t: 'Check the next complete column:', + lines: [`${rows[0][others[1]]} + ${rows[1][others[1]]} = ${rows[2][others[1]]} ✓`], + hl: colIdx(others[1]), + }, + { + t: 'So in every column, the top number plus the middle number makes the bottom number.', + hl: [], + }, + { t: 'Use it on the column with the ?:', lines: lastLines, hl: colIdx(mc), reveal: true }, + { t: `So the missing number is ${ans}.`, hl: [mr * 3 + mc], reveal: true, final: true }, + ]; + return Object.assign(base, { + view: { kind: 'grid' as const, cells }, + answer: ans, + rule: 'Down each column: top + middle = bottom.', + nudge: 'No row rule fits. Try reading down the columns instead.', + guide, + steps: ['Down each column: top + middle = bottom.', last + '.'], + }); + } + const f = rule.f!, + e = rule.e!, + ra = rule.ra!, + rb = rule.rb!; + const k = rule.k ? R(...(rule.kr ?? [1, 5])) : 0; + let g = 0; + while (rows.length < 3 && g++ < 200) { + const a = R(...ra), + b = R(...rb), + c = f(a, b, k); + if (c < 0 || c > 4000 || !Number.isInteger(c)) continue; + if (rows.some((r) => r[0] === a && r[1] === b)) continue; + rows.push([a, b, c]); + } + const mr = R(0, 2); + let mc = 2; + if (level >= 6 && Math.random() < 0.45) { + const cand = R(0, 1); + const [a, b, c] = rows[mr]; + if (solveUnique((x) => (cand === 0 ? f(x, b, k) : f(a, x, k)) === c) !== null) mc = cand; + } + const ans = rows[mr][mc]; + const cells = rows.map((r, i) => r.map((v, j) => (i === mr && j === mc ? null : v))); + const full = [0, 1, 2].filter((i) => i !== mr), + say = sayOf(rule, k); + const r0 = rows[full[0]], + r1 = rows[full[1]], + m = rows[mr]; + const guide: GuideStep[] = [ + { + t: `Start with a complete row: ${r0[0]}, ${r0[1]} and ${r0[2]}. Ask yourself: how can ${r0[0]} and ${r0[1]} be combined to make ${r0[2]}?`, + hl: rowIdx(full[0]), + }, + { + t: `It works if you ${say}:`, + lines: [`${e(r0[0], r0[1], k)} = ${r0[2]}`], + hl: rowIdx(full[0]), + }, + { + t: 'Check the same rule on the other complete row:', + lines: [`${e(r1[0], r1[1], k)} = ${r1[2]} ✓`], + hl: rowIdx(full[1]), + }, + ]; + let last; + if (mc === 2) { + last = `${e(m[0], m[1], k)} = ${ans}`; + guide.push({ + t: 'Now use it on the row with the ?:', + lines: [last], + hl: rowIdx(mr), + reveal: true, + }); + } else { + const lhs = e(mc === 0 ? '?' : m[0], mc === 1 ? '?' : m[1], k); + last = `${e(mc === 0 ? ans : m[0], mc === 1 ? ans : m[1], k)} = ${m[2]}`; + guide.push({ + t: `In the row with the ?, the missing number is one of the first two, so work backwards. You need: ${lhs} = ${m[2]}.`, + hl: rowIdx(mr), + }); + guide.push({ + t: `Try numbers until it fits. ${ans} works:`, + lines: [last + ' ✓'], + hl: rowIdx(mr), + reveal: true, + }); + } + guide.push({ + t: `So the missing number is ${ans}.`, + hl: [mr * 3 + mc], + reveal: true, + final: true, + }); + return Object.assign(base, { + view: { kind: 'grid' as const, cells }, + answer: ans, + rule: `In every row: ${say}.`, + nudge: mc === 2 ? (rule.nudge ?? '') : rule.nudge + ' ' + BACKWARDS, + guide, + steps: [cap(say) + ' (in every row).', last + '.'], + }); +} + +/* ================= SHAPES: plus-shaped box clusters + triangles ================= */ +// plus: centre = f(top, left, right, bottom); tri: centre = f(top, left, right) +const P: Record = { + 3: [ + { + k: 'plus', + f: (t, l, r, b) => t + l + r + b, + e: (t, l, r, b) => `${t} + ${l} + ${r} + ${b}`, + say: 'add up all four outer numbers', + nudge: 'Start simple: what do the outer numbers add up to?', + rng: [1, 12], + }, + { + k: 'tri', + f: (a, b, c) => a + b + c, + e: (a, b, c) => `${a} + ${b} + ${c}`, + say: 'add up the three corners', + nudge: 'Start simple: what do the corners add up to?', + rng: [2, 20], + }, + ], + 4: [ + { + k: 'plus', + f: (t, l, r, b) => t + b - (l + r), + e: (t, l, r, b) => `(${t} + ${b}) ${M} (${l} + ${r})`, + say: 'add top and bottom, add left and right, then take the second total away from the first', + nudge: + 'The centre is smaller than the outer numbers together. Pair opposite boxes and compare the pairs.', + rng: [1, 20], + ok: (v) => v > 0, + }, + { + k: 'tri', + f: (a, b, c) => a + b - c, + e: (a, b, c) => `${a} + ${b} ${M} ${c}`, + say: 'add the top and left corners, then take away the right corner', + nudge: + 'The middle is smaller than all three corners together. One corner seems to be taken away.', + rng: [2, 25], + ok: (v) => v > 0, + }, + ], + 5: [ + { + k: 'plus', + f: (t, l, r, b) => t * b + l + r, + e: (t, l, r, b) => `${t} ${X} ${b} + ${l} + ${r}`, + say: 'multiply top by bottom, then add the left and right numbers', + nudge: + 'Adding everything is too small, so something is multiplied. Try the top and bottom pair.', + rng: [1, 9], + }, + { + k: 'tri', + f: (a, b, c) => a * b - c, + e: (a, b, c) => `${a} ${X} ${b} ${M} ${c}`, + say: 'multiply the top and left corners, then take away the right corner', + nudge: 'Multiplying two of the corners overshoots a little. What could bring it back down?', + rng: [2, 12], + ok: (v) => v > 0, + }, + ], + 6: [ + { + k: 'plus', + f: (t, l, r, b) => t * b - l * r, + e: (t, l, r, b) => `${t} ${X} ${b} ${M} ${l} ${X} ${r}`, + say: 'multiply top by bottom, multiply left by right, then take the second result away from the first', + nudge: + 'Pair opposite boxes and multiply each pair. Then compare the two results with the centre.', + rng: [1, 9], + ok: (v) => v > 0, + }, + { + k: 'tri', + f: (a, b, c) => (a + b) * c, + e: (a, b, c) => `(${a} + ${b}) ${X} ${c}`, + say: 'add the top and left corners, then multiply by the right corner', + nudge: 'The middle is big, so something is multiplied. Try adding two corners first.', + rng: [1, 9], + }, + ], + 7: [ + { + k: 'plus', + f: (t, l, r, b) => (t + b) * (l - r), + e: (t, l, r, b) => `(${t} + ${b}) ${X} (${l} ${M} ${r})`, + say: 'add top and bottom, find the difference between left and right, then multiply those two results', + nudge: 'Pair opposite boxes. One pair is added, the other pair gives a difference.', + rng: [1, 9], + ok: (v) => v > 0, + }, + { + k: 'tri', + f: (a, b, c) => a * b * c, + e: (a, b, c) => `${a} ${X} ${b} ${X} ${c}`, + say: 'multiply all three corners together', + nudge: 'The middle is much bigger than the corners. Think multiplication only.', + rng: [2, 7], + }, + ], + 8: [ + { + k: 'plus', + f: (t, l, r, b) => t * b + l * r, + e: (t, l, r, b) => `${t} ${X} ${b} + ${l} ${X} ${r}`, + say: 'multiply top by bottom, multiply left by right, then add the two results', + nudge: 'Pair opposite boxes and multiply each pair. Then combine the two results.', + rng: [1, 9], + }, + { + k: 'tri', + f: (a, b, c) => a * a + b * c, + e: (a, b, c) => `${a} ${X} ${a} + ${b} ${X} ${c}`, + say: 'multiply the top corner by itself, then add left times right', + nudge: 'The top corner matters more than the others. Try multiplying it by itself.', + rng: [1, 9], + }, + ], + 9: [ + { + k: 'plus', + f: (t, l, r, b) => t * t - l * r + b, + e: (t, l, r, b) => `${t} ${X} ${t} ${M} ${l} ${X} ${r} + ${b}`, + say: 'multiply the top number by itself, take away left times right, then add the bottom number', + nudge: + 'The top number plays a special role: try multiplying it by itself. Left and right work as a pair.', + rng: [1, 9], + ok: (v) => v > 0, + }, + { + k: 'tri', + f: (a, b, c) => (a - b) * (a + c), + e: (a, b, c) => `(${a} ${M} ${b}) ${X} (${a} + ${c})`, + say: 'find the difference between the top and left corners, add the top and right corners, then multiply those two results', + nudge: 'The top corner is used twice: once with the left corner and once with the right one.', + rng: [1, 12], + ok: (v) => v > 0, + }, + ], +}; +function genShapes(level: number): Omit { + const rule = pick(P[level]); + const isPlus = rule.k === 'plus', + n = isPlus ? 4 : 3, + stride = isPlus ? 5 : 4; + const figs: { outer: number[]; centre: number }[] = []; + let g = 0; + while (figs.length < 3 && g++ < 500) { + const outer = distinct(n, ...rule.rng); + if (outer.length < n) continue; + const c = rule.f(...outer); + if ((rule.ok && !rule.ok(c)) || c > 2000 || c < 0) continue; + figs.push({ outer, centre: c }); + } + const target = figs[2]; + let miss = -1; // -1 = centre + if (level >= 6 && Math.random() < 0.45) { + const idx = R(0, n - 1); + const u = solveUnique( + (x) => { + const o = target.outer.slice(); + o[idx] = x; + return rule.f(...o) === target.centre; + }, + 0, + 100, + ); + if (u !== null) miss = idx; + } + const answer = miss === -1 ? target.centre : target.outer[miss]; + const fig = (f: number) => range(f * stride, f * stride + stride - 1); + const word = isPlus ? 'outer numbers' : 'corners'; + const f0 = figs[0], + f1 = figs[1]; + const guide: GuideStep[] = [ + { + t: `Start with the first figure. The ${word} are ${f0.outer.join(', ')} and the centre is ${f0.centre}. Ask yourself: how could the ${word} make ${f0.centre}?`, + hl: fig(0), + }, + { + t: `It works if you ${rule.say}:`, + lines: [`${rule.e(...f0.outer)} = ${f0.centre}`], + hl: fig(0), + }, + { + t: 'Check the same recipe on the second figure:', + lines: [`${rule.e(...f1.outer)} = ${f1.centre} ✓`], + hl: fig(1), + }, + ]; + let last; + if (miss === -1) { + last = `${rule.e(...target.outer)} = ${answer}`; + guide.push({ t: 'Now use it on the last figure:', lines: [last], hl: fig(2), reveal: true }); + } else { + const lhs = rule.e(...target.outer.map((v, i) => (i === miss ? '?' : v))); + last = `${rule.e(...target.outer)} = ${target.centre}`; + guide.push({ + t: `In the last figure the centre is known (${target.centre}) and one of the ${word} is missing, so work backwards. You need: ${lhs} = ${target.centre}.`, + hl: fig(2), + }); + guide.push({ + t: `Try numbers until it fits. ${answer} works:`, + lines: [last + ' ✓'], + hl: fig(2), + reveal: true, + }); + } + guide.push({ + t: `So the missing number is ${answer}.`, + hl: [miss === -1 ? 2 * stride + stride - 1 : 2 * stride + miss], + reveal: true, + final: true, + }); + const view = { + kind: rule.k, + figs: figs.map((fg, i) => ({ + outer: fg.outer.map((v, j) => (i === 2 && j === miss ? null : v)), + centre: i === 2 && miss === -1 ? null : fg.centre, + })), + }; + return { + family: 'shapes', + level, + view, + answer, + rule: `Centre: ${rule.say}.`, + think: THINK[rule.k], + nudge: miss === -1 ? rule.nudge : rule.nudge + ' ' + BACKWARDS, + guide, + steps: [cap(rule.say) + '.', last + '.'], + }; +} + +/* ================= FUNCTION BOXES: x -> f(x) ================= */ +const F: Record = { + 3: [ + { + f: (x, k) => 2 * x + k, + e: (x, k) => `2 ${X} ${x} + ${k}`, + say: (k) => `double the number, then add ${k}`, + nudge: 'Each output is a bit more than double its input.', + xr: [2, 15], + kr: [1, 5], + }, + { + f: (x, k) => 3 * x - k, + e: (x, k) => `3 ${X} ${x} ${M} ${k}`, + say: (k) => `multiply by 3, then take away ${k}`, + nudge: 'Each output is a bit less than three times its input.', + xr: [2, 15], + kr: [1, 4], + }, + ], + 4: [ + { + f: (x, k) => 4 * x + k, + e: (x, k) => `4 ${X} ${x} + ${k}`, + say: (k) => `multiply by 4, then add ${k}`, + nudge: 'Each output is a bit more than four times its input.', + xr: [2, 15], + kr: [1, 6], + }, + { + f: (x) => x * x, + e: (x) => `${x} ${X} ${x}`, + say: () => 'multiply the number by itself', + nudge: 'The outputs grow much faster than the inputs. Think of the times tables.', + xr: [2, 12], + }, + { + f: (x, k) => 5 * x - k, + e: (x, k) => `5 ${X} ${x} ${M} ${k}`, + say: (k) => `multiply by 5, then take away ${k}`, + nudge: 'Each output is a bit less than five times its input.', + xr: [2, 12], + kr: [1, 6], + }, + ], + 5: [ + { + f: (x, k) => x * x + k, + e: (x, k) => `${x} ${X} ${x} + ${k}`, + say: (k) => `multiply the number by itself, then add ${k}`, + nudge: 'Each output is just above a number from the times tables: the input times itself.', + xr: [2, 11], + kr: [1, 6], + }, + { + f: (x) => x * (x + 1), + e: (x) => `${x} ${X} ${typeof x === 'number' ? x + 1 : `(${x} + 1)`}`, + say: () => 'multiply the number by the next number up', + nudge: 'The output is a bit more than the input times itself.', + xr: [2, 12], + }, + { + f: (x, k) => x * x - k, + e: (x, k) => `${x} ${X} ${x} ${M} ${k}`, + say: (k) => `multiply the number by itself, then take away ${k}`, + nudge: 'Each output is just below the input times itself.', + xr: [3, 11], + kr: [1, 5], + }, + ], + 6: [ + { + f: (x) => x * x - x, + e: (x) => `${x} ${X} ${x} ${M} ${x}`, + say: () => 'multiply the number by itself, then take the number away again', + nudge: + 'The output is a bit less than the input times itself, and the shortfall grows with the input.', + xr: [2, 12], + }, + { + f: (x, k) => 2 * x * x - k, + e: (x, k) => `2 ${X} ${x} ${X} ${x} ${M} ${k}`, + say: (k) => `multiply the number by itself, double it, then take away ${k}`, + nudge: 'The outputs are close to double the input times itself.', + xr: [2, 9], + kr: [1, 5], + }, + { + f: (x) => x ** 3, + e: (x) => `${x} ${X} ${x} ${X} ${x}`, + say: () => 'multiply the number by itself, and by itself again', + nudge: 'The outputs explode. A number multiplied by itself more than once.', + xr: [2, 8], + }, + ], + 7: [ + { + f: (x, k) => (x + k) ** 2, + e: (x, k) => `(${x} + ${k}) ${X} (${x} + ${k})`, + say: (k) => `add ${k}, then multiply the result by itself`, + nudge: + 'All the outputs are square numbers (a number times itself). Which number, compared with the input?', + xr: [1, 9], + kr: [1, 4], + }, + { + f: (x, k) => x ** 3 + k, + e: (x, k) => `${x} ${X} ${x} ${X} ${x} + ${k}`, + say: (k) => `multiply the number by itself twice, then add ${k}`, + nudge: 'The outputs are just above cube numbers (8, 27, 64, 125, …).', + xr: [2, 7], + kr: [1, 5], + }, + { + f: (x, k) => x * (x - k), + e: (x, k) => `${x} ${X} (${x} ${M} ${k})`, + say: (k) => `multiply the number by the number that is ${k} lower`, + nudge: 'The output is a bit less than the input times itself.', + xr: [5, 14], + kr: [1, 4], + }, + ], + 8: [ + { + f: (x) => x ** 3 - x, + e: (x) => `${x} ${X} ${x} ${X} ${x} ${M} ${x}`, + say: () => 'multiply the number by itself twice, then take the number away', + nudge: 'The outputs are just below cube numbers (8, 27, 64, …).', + xr: [2, 8], + }, + { + f: (x, k) => 2 ** x + k, + e: (x, k) => `2${x === '?' ? '^?' : sup(x)} + ${k}`, + say: (k) => `multiply 2 by itself that many times, then add ${k}`, + nudge: + 'The outputs roughly double every time the input goes up by one. Think of 2, 4, 8, 16, 32, …', + xr: [1, 9], + kr: [1, 5], + }, + { + f: (x) => 2 * x * x + x, + e: (x) => `2 ${X} ${x} ${X} ${x} + ${x}`, + say: () => 'multiply the number by itself, double it, then add the number', + nudge: 'The outputs are a bit more than double the input times itself.', + xr: [2, 10], + }, + ], + 9: [ + { + f: (x) => x ** 3 - x * x, + e: (x) => `${x} ${X} ${x} ${X} ${x} ${M} ${x} ${X} ${x}`, + say: () => 'multiply the number by itself twice, then take away the number times itself', + nudge: 'The outputs are below cube numbers, and the gap grows quickly.', + xr: [2, 8], + }, + { + f: (x) => (x * x + 1) * 2, + e: (x) => `(${x} ${X} ${x} + 1) ${X} 2`, + say: () => 'multiply the number by itself, add 1, then double', + nudge: 'Halve each output first. What is left looks familiar.', + xr: [2, 10], + }, + { + f: (x) => 2 ** x - x, + e: (x) => `2${x === '?' ? '^?' : sup(x)} ${M} ${x}`, + say: () => 'multiply 2 by itself that many times, then take the number away', + nudge: 'The outputs roughly double every step, minus a little. Think of 2, 4, 8, 16, 32, …', + xr: [2, 10], + }, + ], +}; +function genPairs(level: number): Omit { + const rule = pick(F[level]); + const k = rule.kr ? R(...rule.kr) : 0; + const xs = distinct(4, ...rule.xr); + const ordered = level <= 4 ? xs.sort((a, b) => a - b) : xs; + const pairs = ordered.map((x) => [x, rule.f(x, k)]); + let missIn = level >= 7 && Math.random() < 0.4; + if (missIn) { + const t = pairs[3][1]; + if (solveUnique((x) => rule.f(x, k) === t, 0, 60) === null) missIn = false; + } + const answer = missIn ? pairs[3][0] : pairs[3][1]; + const say = rule.say(k); + const pr = (p: number) => [p * 2, p * 2 + 1]; + const [p0, p1, p2, p3] = pairs; + const guide: GuideStep[] = [ + { + t: `Start with the first box: ${p0[0]} goes in and ${p0[1]} comes out. Lots of rules could do that, so keep an open mind and test every idea on the other boxes too.`, + hl: pr(0), + }, + { + t: `The rule that works for all of them: ${say}.`, + lines: [ + `${p0[0]} → ${rule.e(p0[0], k)} = ${p0[1]}`, + `${p1[0]} → ${rule.e(p1[0], k)} = ${p1[1]} ✓`, + `${p2[0]} → ${rule.e(p2[0], k)} = ${p2[1]} ✓`, + ], + hl: [...pr(0), ...pr(1), ...pr(2)], + }, + ]; + let last; + if (!missIn) { + last = `${p3[0]} → ${rule.e(p3[0], k)} = ${answer}`; + guide.push({ + t: 'Now put the last number through the same machine:', + lines: [last], + hl: pr(3), + reveal: true, + }); + } else { + last = `${answer} → ${rule.e(answer, k)} = ${p3[1]}`; + guide.push({ + t: `In the last box, the output (${p3[1]}) is known and the input is missing, so work backwards: which number would come out as ${p3[1]}?`, + hl: pr(3), + }); + guide.push({ + t: `Try numbers until it fits. ${answer} works:`, + lines: [last + ' ✓'], + hl: pr(3), + reveal: true, + }); + } + guide.push({ + t: `So the missing number is ${answer}.`, + hl: [missIn ? 6 : 7], + reveal: true, + final: true, + }); + return { + family: 'pairs', + level, + view: { + kind: 'pairs', + pairs: pairs.map((p, i) => (i < 3 ? p : missIn ? [null, p[1]] : [p[0], null])), + }, + answer, + rule: `The machine: ${say}.`, + think: THINK.pairs, + nudge: missIn ? rule.nudge + ' ' + BACKWARDS : rule.nudge, + guide, + steps: [cap(say) + '.', last + '.'], + }; +} + +/* ================= REGISTRY ================= */ +export const FAMILIES: Record< + Family, + { + id: Family; + name: string; + short: string; + min: number; + max: number; + gen: (level: number) => Omit; + blurb: string; + } +> = { + series: { + id: 'series', + name: 'Number series', + short: 'Series', + min: 1, + max: 9, + gen: genSeries, + blurb: 'Find the missing number in a row of boxes.', + }, + grid: { + id: 'grid', + name: 'Number grids', + short: 'Grids', + min: 2, + max: 9, + gen: genGrid, + blurb: 'A 3 × 3 grid where rows or columns follow one rule.', + }, + shapes: { + id: 'shapes', + name: 'Number figures', + short: 'Figures', + min: 3, + max: 9, + gen: genShapes, + blurb: 'The centre is built from the numbers around it.', + }, + pairs: { + id: 'pairs', + name: 'Function boxes', + short: 'Functions', + min: 3, + max: 9, + gen: genPairs, + blurb: 'One hidden operation turns each input into its output.', + }, +}; +const PROMPTS: Record = { + series: 'Which number replaces the question mark?', + grid: 'Which number replaces the question mark in the grid?', + shapes: 'The figures follow the same rule. Which number replaces the question mark?', + pairs: + 'Every input goes through the same hidden operation. Which number replaces the question mark?', +}; + +let uid = 0; +export function makeItem(family: Family, level: number): Item { + const fam = FAMILIES[family]; + const lvl = Math.max(fam.min, Math.min(fam.max, level)); + return { + ...fam.gen(lvl), + id: 'q' + Date.now().toString(36) + (uid++).toString(36), + b: LEVEL_B(lvl), + prompt: PROMPTS[family], + }; +} + +/* ================= ADAPTIVE SCORING (2PL IRT, EAP with N(0,1) prior) ================= */ +const A = 1.3; // discrimination +const GRID = Array.from({ length: 121 }, (_, i) => -4 + i * (8 / 120)); +export const pCorrect = (theta: number, b: number): number => 1 / (1 + Math.exp(-A * (theta - b))); +export function estimate(responses: Response[]): { theta: number; se: number } { + let w = GRID.map((t) => Math.exp((-t * t) / 2)); + for (const r of responses) + w = w.map((wi, i) => { + const p = pCorrect(GRID[i], r.b); + return wi * (r.correct ? p : 1 - p); + }); + const s = w.reduce((a, b) => a + b, 0); + const mean = w.reduce((a, wi, i) => a + wi * GRID[i], 0) / s; + const sd = Math.sqrt(w.reduce((a, wi, i) => a + wi * (GRID[i] - mean) ** 2, 0) / s); + return { theta: mean, se: sd }; +} +export const thetaToLevel = (theta: number): number => + Math.max(1, Math.min(9, Math.round(theta / 0.7 + 5))); +export const thetaToStanine = (theta: number): number => + Math.max(1, Math.min(9, Math.round(5 + 2 * theta))); +const erf = (x: number): number => { + const t = 1 / (1 + 0.3275911 * Math.abs(x)); + const y = + 1 - + ((((1.061405429 * t - 1.453152027) * t + 1.421413741) * t - 0.284496736) * t + 0.254829592) * + t * + Math.exp(-x * x); + return x >= 0 ? y : -y; +}; +export const percentile = (theta: number): number => Math.round(50 * (1 + erf(theta / Math.SQRT2))); + +/** The next question of an adaptive test: aimed at the current ability estimate, rotating question types. */ +export function nextAdaptive(responses: Response[], history: { family: Family }[]): Item { + const est = estimate(responses); + let lvl = responses.length === 0 ? 4 : thetaToLevel(est.theta); + if (responses.length > 0 && Math.random() < 0.25) lvl += pick([-1, 1]); + lvl = Math.max(1, Math.min(9, lvl)); + const recent = history.slice(-2).map((h) => h.family); + let fams = Object.values(FAMILIES).filter((f) => lvl >= f.min && !recent.includes(f.id)); + if (!fams.length) fams = Object.values(FAMILIES).filter((f) => lvl >= f.min); + const counts: Partial> = {}; + history.forEach((h) => (counts[h.family] = (counts[h.family] || 0) + 1)); + fams.sort((a, b) => (counts[a.id] || 0) - (counts[b.id] || 0)); + const least = fams.filter((f) => (counts[f.id] || 0) === (counts[fams[0].id] || 0)); + return makeItem(pick(least).id, lvl); +} From e8ea27a0930a82865bfc95a6cec27609b881e731 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 15:31:04 +0100 Subject: [PATCH 3/4] Practise numerical reasoning: lessons with hints and walkthroughs, adaptive mock tests, progress The question engine makes number series, grids, figures and function boxes at nine levels, each with a plain-language hint and a step-by-step solution. Lessons level each skill up; mock tests pick questions to match the ability shown so far and give a stanine with its margin of error. Every session is saved privately for its person. --- .github/workflows/screenshots.yml | 67 ++++ web/index.html | 7 +- web/public/icons/apple-touch-icon.png | Bin 2545 -> 2462 bytes web/public/icons/icon-192.png | Bin 6568 -> 5108 bytes web/public/icons/icon-512.png | Bin 18359 -> 14248 bytes web/public/icons/icon-maskable-512.png | Bin 8218 -> 7719 bytes web/public/icons/icon.svg | 12 +- web/public/manifest.webmanifest | 8 +- web/scripts/screenshots.mjs | 251 ++++++++++++++ web/src/App.svelte | 13 +- web/src/app.css | 141 +++++++- web/src/components/AnswerInput.svelte | 54 +++ web/src/components/Guide.svelte | 44 +++ web/src/components/Home.svelte | 122 ++++--- web/src/components/Icon.svelte | 48 +++ web/src/components/ItemView.svelte | 186 ++++++++++ web/src/components/Lesson.svelte | 452 +++++++++++++++++++++++++ web/src/components/Login.svelte | 2 +- web/src/components/Me.svelte | 161 +++++++++ web/src/components/MockTest.svelte | 196 +++++++++++ web/src/components/Progress.svelte | 290 ++++++++++++++++ web/src/components/Result.svelte | 264 +++++++++++++++ web/src/components/Review.svelte | 99 ++++++ web/src/components/Setup.svelte | 2 +- web/src/components/SkillCard.svelte | 49 +++ web/src/components/Skills.svelte | 61 ++++ web/src/components/Stanine.svelte | 27 ++ web/src/components/TestIntro.svelte | 79 +++++ web/src/components/Today.svelte | 151 +++++++++ web/src/lib/demo.ts | 15 + web/src/lib/nav.svelte.ts | 35 ++ web/src/lib/practice.svelte.ts | 171 ++++++++++ web/src/lib/practice.test.ts | 148 ++++++++ web/src/lib/practice.ts | 250 ++++++++++++++ 34 files changed, 3340 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/screenshots.yml create mode 100644 web/scripts/screenshots.mjs create mode 100644 web/src/components/AnswerInput.svelte create mode 100644 web/src/components/Guide.svelte create mode 100644 web/src/components/Icon.svelte create mode 100644 web/src/components/ItemView.svelte create mode 100644 web/src/components/Lesson.svelte create mode 100644 web/src/components/Me.svelte create mode 100644 web/src/components/MockTest.svelte create mode 100644 web/src/components/Progress.svelte create mode 100644 web/src/components/Result.svelte create mode 100644 web/src/components/Review.svelte create mode 100644 web/src/components/SkillCard.svelte create mode 100644 web/src/components/Skills.svelte create mode 100644 web/src/components/Stanine.svelte create mode 100644 web/src/components/TestIntro.svelte create mode 100644 web/src/components/Today.svelte create mode 100644 web/src/lib/demo.ts create mode 100644 web/src/lib/nav.svelte.ts create mode 100644 web/src/lib/practice.svelte.ts create mode 100644 web/src/lib/practice.test.ts create mode 100644 web/src/lib/practice.ts diff --git a/.github/workflows/screenshots.yml b/.github/workflows/screenshots.yml new file mode 100644 index 0000000..473a8d3 --- /dev/null +++ b/.github/workflows/screenshots.yml @@ -0,0 +1,67 @@ +name: Screenshots + +# Phone screenshots of the main screens, in light and dark, from a fresh app +# filled with three weeks of practice (web/scripts/screenshots.mjs). Each pull +# request gets them on the branch screenshots/, which reviews and +# the README link to; nothing is committed to the pull request itself. + +on: + pull_request: + paths: ['web/**', 'backend/**', '.github/workflows/screenshots.yml'] + +concurrency: + group: screenshots-${{ github.head_ref }} + cancel-in-progress: true + +permissions: + contents: write + +jobs: + screenshots: + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7 + with: + go-version-file: backend/go.mod + cache-dependency-path: backend/go.sum + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 + with: + node-version: 26 + cache: npm + cache-dependency-path: web/package-lock.json + - name: Build the app + run: | + (cd web && npm ci) + make build + - name: Start it with an empty database + run: | + cd dist + ./reckon serve --http=127.0.0.1:8090 --dir="$RUNNER_TEMP/pb_data" > "$RUNNER_TEMP/reckon.log" 2>&1 & + for _ in $(seq 30); do curl -fs http://127.0.0.1:8090/api/health && break; sleep 1; done + - name: Take the screenshots + working-directory: web + env: + TZ: Europe/Brussels + run: | + # the one-time code a fresh install asks for on its setup screen + export RECKON_SETUP_CODE=$(cat "$RUNNER_TEMP/pb_data/setup_code") + npm i --no-save playwright + npx playwright install --with-deps chromium + node scripts/screenshots.mjs "$RUNNER_TEMP/shots" + - name: Server log + if: failure() + run: cat "$RUNNER_TEMP/reckon.log" + - name: Publish them on screenshots/${{ github.head_ref }} + env: + BRANCH: screenshots/${{ github.head_ref }} + SHA: ${{ github.event.pull_request.head.sha }} + TOKEN: ${{ github.token }} + run: | + cd "$RUNNER_TEMP/shots" + git init -q -b "$BRANCH" + git add . + git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \ + commit -qm "Screenshots of $SHA" + git push -qf "https://x-access-token:$TOKEN@github.com/$GITHUB_REPOSITORY.git" "HEAD:refs/heads/$BRANCH" diff --git a/web/index.html b/web/index.html index 09d0240..399dd79 100644 --- a/web/index.html +++ b/web/index.html @@ -6,11 +6,14 @@ - + - reckon + Reckon
diff --git a/web/public/icons/apple-touch-icon.png b/web/public/icons/apple-touch-icon.png index bb9893a3798ebf13ad281e831dd15a6a4aa7394e..18966fe46a0a1eb8058071a253c6e00cafd88917 100644 GIT binary patch literal 2462 zcmd5;X*3&%6OZk-MN3h{5jSPE+Gy%1LJ^Hr)!ER)tS_?SrEY?z+Pdp( zOD&OgBvix^ao?ZxE$K038psZab8wh2&*I1mRjK)zyHu)D=Krc@22AK#vJZJrcXNhXH6K5bWz&?~W>I#BvE&P6T()pO%!5~I#Tx$4p#xqo~7pC&x7RQr)%<8J4= z@c$wK#oXjG9Ztu)*qge7)UdJU7dWl{>eF}jq>c@YT;DZ!+va)h0#fY z&voh`okjzT%yz*S6xI3VRZCUq3J0(0!R&pJk~*>2+cAz0CI)Egua2)dHe3nJ-gO*l zw)2^I_pb!}@;YIAu0z+>p{Fu3BYvrQxuPUeVoo%!wHTz>x8rYDix*^ z!<6R8u)xg7uqMvp^rtfusFr@P-e|)>k-nqoD5>Yh`xE4YE~mF>DIZYsd6MzUvvb86i-#W+9Go^?0QvbLEq8#P!?-UVD(8qICMBBqay}&StF3k2wp^t)wZNbwxBlF-Xo_w9d>VV zfGTEbA>AE7X%OMfiy6;Uef^YF~sJl!KXDc`n4Q4k8k2;`B7>i;Gq zdEiRjfX&u#mBZgat?qQl$qU3~MuaR(&hK%_FApu=qvruXZbyW#Lc^_)y#ujbeWw|} zU8wsip-cB#w5f4Smc({HK8Na0)V42`Rvd%JI`c zjlFg+3I#t)s!_M#Zf~WNc?9B)S5I%XjOot17XmLfMW76s>qgAS92xEBUCn+yz>9_u zCpm#Q?`F(k?sVu`t9{r|?J&9&7_a%is6GD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6r1O*|7m?|Ar9p%4E@-HAk`HOCO3JRiA}S6oSK;Swc}r%WMhXWSbC~-h{o#8ol^Db ziAXDfv3vFR&vGs|?{|5GzKvGPG@XSUJDVkO5#BFy&ZgL|t6{%Qg19mO*R8?$~cas98A3qREr zj3^-H84PS);<(~IyDc<({BF3@|62MfEd8x~@-^@$rc`fIj|U`E>u<-soSn1DxPgQg z^rvk&xC_5wm@90%h+}APceXRcrWi3hMc9lST{3TCd$_YhBP*pgv_9F{kPx^e8JQPq zkY>0PvWk1{adb#i9F7a{kU~!S!IM-^0x>5Cj;9OW1L|RCNy}QDfy4EublqnkXj+v-&kp6_zo)DkR98hIe)z~ zj;Cn@QgE^t>*lA=*KHWe^wuFeT|*BQlhM)+posE2@9X?rlx)&00*b~Sg(XIw+MB9XDcc`1r_)( z@+gF7H2sw)34~=X+Cbw@6x;oO1&=Ol?#SCtRa&e&4(~5`%xOJ**GN}VT55A~si-L8 zEtK(*!+w1?{D+YOLm;r&iW}KkW@qpE>BIddE>B!N8NvDgT|%T6O8xqCPYh{TQfIz2 f(jsGUa0|-4)vhhtJ9~F`0|Th5Xrrr?Z6p2z{%0u+ diff --git a/web/public/icons/icon-512.png b/web/public/icons/icon-512.png index e9d2090eaedaf8577fbd2fec7d10d763af6d4e7f..6c4949d1a6028b0cb040afa1b800071922031b1e 100644 GIT binary patch literal 14248 zcmeHuXH=9;u;vSh@S%VKBq+f^77!#kk_=?YIU^uQmM|c3FaaV#vLH!<#2K)jVjBVwP%TgU%kP^oPai=^R}95svMWEPkF{I-BKqFk{-1kFmu z=dHkZO|`5)A$O&#r^_=4!Aafk-ErIAF1`0?r>;bxv+FkYmiY8%M6z6#b#!bs*xCTby zVi0dxLTn<7LrlWFs^6WN*7>Ccgy|~G$Vdx%+5apkRM|5ibEAv%z&kVIwDQs{>=G1T zI}~e?xU8#V>y5Tc?|+Tv#(XL~Pnl_i4hqT$>rUnC4d^$bP4vpS(F?x`3@Rd+WGJ)a3D<3ZjQoAJU|f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2j9Jb~H-sZSH0 znf4C;N1X_TzRXN*9F`CN#aut!-t+Iij)oK@icx7`I(SX|dyR`j{l@ec*2OwM{M;gY z+E&;9yriVQJFQJ~1FN~nCmBE(pCs*G|Jc9X|G@z%<}e>_!Qv!p+!7;DXcor@(HBxG zy+a2eeT?$eE_D82FfE}9qyk-HDXuMs!6^I_C|ir$kq`d8DHU9k0;$$%9)FJ{wx!}Z zF+lB+UL%Nm%06oo9)59^Ik6 z7%P;csA-oHH1e=PtTGpcVnkisK$yy~yo3#+sedh;3}P^MFS*ygIUx~%ClZIBu;eb! zG)Kbsxu>-?W-|+-Gm#WT*+0%WJ|9QrS3C6>`_8_(KVQ<9EjA(liWxF^qs5IDwjos< z8hS1>Ra2Dn+&Ae8OD(g>`jC;Gh>10`nj-CV4mBM@^{pj$>#YwzOLc*od{1tDnm{r-UW|>(^On diff --git a/web/public/icons/icon-maskable-512.png b/web/public/icons/icon-maskable-512.png index c8ddf11a5d409f59292e67a2aed1794a26161feb..e63edd55fd44a807a03d0c5764da6e533dd0673f 100644 GIT binary patch literal 7719 zcmeHscTiJZ_wJ#nDDomGMNoob0Y&mEARva&6clMv6cG?a>4Y8#CGkZO3r(d-2}KCf zLJ!4&f`AAT=^X^5gb*Sm1W8D8&-;CM?)~mJcjnIAncrW(Z}P`Ev(L&tXRo#Pv!3v*Gz|qNThI-ba znbfJUQ0oQa$MwM8(y>#z#;#5V-!WDD6z%h@O>*;WAZKjek25_S#>d+WC_YddJZtoc z7s3ZJab38!?u?X%_fX8`GUh8s7b@oPY*wPkf$F1Ns z7Mf1a(pu`#ZrsX#A_M5kwUPM%pjRFMB1987X7pzVO3)HL#w+D9MQmuHR|?#H{CZ z{nR({Wzy##&V8JH&@QmS(Zij-Zg2nY{#Ks>FBFLw${rtK4$8rX78!;f_c*zNQ{g0i zoEyexzk`!S)a+cBL~3drT}BSqS!t@A6xt9)KdA0yJLIEwuAA(CshwqTPEg)Nx-p9L z*lx?(QL7k%#<_Lnuok05OYI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B7#BT(}5ulxDm_M_x&1V881bA!CQQpi(J*n2rahQPH?0PZ-6+J0;|jysKWV*aeGV` zCdXMG%8nV10Bt`iGbo*&1_daBQuik@d|6anKU`H@FA|*&t9e7t%EAxhe*m^;R5@E( z_Sr6vh1jWUBWD^yt;kEgVQVbDIP>KzUmf!w5Wx!^52q$jvOb%rl?@2nnqI>T|~NJ;+1#Z+T<= zJb1&>SJYB#+jx4BzyxeSb{i8?&DF!NLEd*m2LA;O;`>yVq0#<+%O>*}vAS@|wxw<4 z8^AC#ZtLT-U(JnN-n0ogstW*5egc1<{%7zXC;WRwf*P`!TkxvK?R^~h&mVyQ>~fa! I)74-93s~_0Z2$lO diff --git a/web/public/icons/icon.svg b/web/public/icons/icon.svg index ff9dafa..36a49e4 100644 --- a/web/public/icons/icon.svg +++ b/web/public/icons/icon.svg @@ -1,8 +1,8 @@ - - - - - - + + + + + + ? diff --git a/web/public/manifest.webmanifest b/web/public/manifest.webmanifest index 85ed1f4..992adae 100644 --- a/web/public/manifest.webmanifest +++ b/web/public/manifest.webmanifest @@ -1,12 +1,12 @@ { - "name": "reckon", - "short_name": "reckon", - "description": "A self-hosted app built on plasto", + "name": "Reckon", + "short_name": "Reckon", + "description": "Practise the numerical reasoning tests used in job applications", "start_url": "/", "scope": "/", "display": "standalone", "background_color": "#fafafa", - "theme_color": "#4f46e5", + "theme_color": "#047857", "icons": [ { "src": "/icons/icon-192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png" }, diff --git a/web/scripts/screenshots.mjs b/web/scripts/screenshots.mjs new file mode 100644 index 0000000..a52be4b --- /dev/null +++ b/web/scripts/screenshots.mjs @@ -0,0 +1,251 @@ +// Takes the phone screenshots for the README and pull requests, in light and +// dark, from a fresh app with three weeks of someone's practice. CI runs it +// against the built app; to run it yourself: +// +// make build && dist/reckon serve --dir=/tmp/reckon-shots & +// cd web && npm i --no-save playwright && npx playwright install chromium +// RECKON_SETUP_CODE=$(cat /tmp/reckon-shots/setup_code) node scripts/screenshots.mjs ../docs/images/screens +import { mkdirSync } from 'node:fs'; +import { chromium } from 'playwright'; +import { + estimate, + makeItem, + nextAdaptive, + pCorrect, + percentile, + thetaToStanine, +} from '../src/lib/engine.ts'; + +const base = process.env.RECKON_URL ?? 'http://127.0.0.1:8090'; +const out = process.argv[2] ?? 'screenshots'; +const email = 'sofia@example.com'; +const password = 'screenshots123'; +mkdirSync(out, { recursive: true }); + +async function api(path, { token, body, method = body ? 'POST' : 'GET' } = {}) { + const res = await fetch(base + path, { + method, + headers: { 'Content-Type': 'application/json', ...(token ? { Authorization: token } : {}) }, + body: body && JSON.stringify(body), + }); + if (!res.ok) throw new Error(`${method} ${path}: ${res.status} ${await res.text()}`); + return res.status === 204 ? null : res.json(); +} + +// Sofia is preparing for job applications: three weeks of lessons and four +// mock tests, getting better as she goes +if (process.env.RECKON_SETUP_CODE) { + await api('/api/app/setup', { + body: { name: 'Sofia', email, password, code: process.env.RECKON_SETUP_CODE }, + }); +} +const auth = await api('/api/collections/users/auth-with-password', { + body: { + identity: process.env.RECKON_EMAIL ?? email, + password: process.env.RECKON_PASSWORD ?? password, + }, +}); +const token = auth.token; +const user = auth.record.id; + +const day = (ago, hour = 19) => { + const d = new Date(); + d.setDate(d.getDate() - ago); + d.setHours(hour, 10, 0, 0); + return d; +}; +const iso = (d) => d.toISOString().replace('T', ' '); +const key = (d) => + `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`; +const families = ['series', 'grid', 'shapes', 'pairs']; +const days = {}; +let xp = 0; + +function tally(answers) { + const t = {}; + for (const a of answers) { + const f = (t[a.item.family] ??= [0, 0, 0]); + f[0]++; + if (a.correct) f[1]++; + f[2] += a.ms; + } + return t; +} + +async function save(when, session) { + const ms = session.items.reduce((n, a) => n + a.ms, 0); + await api('/api/collections/practice_sessions/records', { + token, + body: { user, started: iso(when), ended: iso(new Date(+when + ms)), ...session }, + }); +} + +for (let ago = 20; ago >= 1; ago--) { + if (ago === 12 || ago === 6) continue; // two days off + const theta = -0.6 + (20 - ago) * 0.06; + const family = families[ago % 4]; + const level = Math.min(9, 2 + Math.floor((20 - ago) / 6) + (family === 'series' ? 1 : 0)); + const items = Array.from({ length: 8 }, (_, i) => { + const item = makeItem(family, level + [-1, -1, 0, 0, 0, 0, 0, 1][i]); + const correct = Math.random() < pCorrect(theta + 0.4, item.b); + return { + item, + given: correct ? item.answer : item.answer + 1, + correct, + ms: 25_000 + Math.random() * 50_000, + }; + }); + const correct = items.filter((a) => a.correct).length; + const gained = correct * 10; + days[key(day(ago))] = gained; + xp += gained; + await save(day(ago), { + kind: 'practice', + family, + level, + level_after: correct >= 6 ? level + 1 : level, + items, + result: { correct, answered: 8, fam: tally(items), change: correct >= 6 ? 1 : 0, xp: gained }, + }); + + if ([18, 13, 8, 2].includes(ago)) { + const answers = []; + for (let q = 0; q < 15; q++) { + const item = nextAdaptive( + answers.map((a) => ({ b: a.item.b, correct: a.correct })), + answers.map((a) => a.item), + ); + const correct = Math.random() < pCorrect(theta, item.b); + answers.push({ + item, + given: correct ? item.answer : item.answer + 2, + correct, + ms: 60_000 + Math.random() * 80_000, + }); + } + const est = estimate(answers.map((a) => ({ b: a.item.b, correct: a.correct }))); + await save(day(ago, 20), { + kind: 'test', + mode: 'full', + items: answers, + result: { + correct: answers.filter((a) => a.correct).length, + answered: 15, + fam: tally(answers), + theta: est.theta, + se: est.se, + stanine: thetaToStanine(est.theta), + lo: thetaToStanine(est.theta - est.se), + hi: thetaToStanine(est.theta + est.se), + pct: percentile(est.theta), + maxLevel: Math.max(0, ...answers.filter((a) => a.correct).map((a) => a.item.level)), + }, + }); + } +} +days[key(new Date())] = 30; +await api('/api/collections/progress/records', { + token, + body: { + user, + xp: xp + 30, + daily_goal: 50, + days, + reminders: true, + skills: { series: { level: 5 }, grid: { level: 4 }, shapes: { level: 4 }, pairs: { level: 4 } }, + }, +}); + +const browser = await chromium.launch({ executablePath: process.env.CHROME || undefined }); +for (const scheme of ['light', 'dark']) { + const page = await browser.newPage({ + viewport: { width: 390, height: 844 }, + deviceScaleFactor: 2, + colorScheme: scheme, + reducedMotion: 'reduce', + }); + // a virtual clock, so answers take a realistic time + await page.clock.install(); + const think = (seconds) => page.clock.fastForward(seconds * 1000); + const shot = async (name) => { + await page.waitForTimeout(250); + await page.screenshot({ path: `${out}/${name}${scheme === 'dark' ? '-dark' : ''}.png` }); + }; + const answer = () => page.evaluate(() => window.reckonAnswer); + const typeAnswer = async (value, seconds = 35) => { + await think(seconds); + await page.getByLabel('Your answer').fill(String(value)); + await page.keyboard.press('Enter'); + }; + + // lets the script read each answer (src/lib/demo.ts) + await page.addInitScript(() => localStorage.setItem('reckon.demo', '1')); + await page.goto(base); + await page.getByLabel('Email').fill(process.env.RECKON_EMAIL ?? email); + await page.getByLabel('Password').fill(process.env.RECKON_PASSWORD ?? password); + await page.getByRole('button', { name: 'Sign in' }).click(); + await page.getByText('Your level').waitFor(); + await shot('today'); + + // a lesson: the hint, the walkthrough, a right answer and a level up + await page.goto(`${base}/#practice`); + await page.getByRole('button', { name: /Number grids/ }).click(); + await page.getByRole('button', { name: /Hint/ }).click(); + await shot('hint'); + await page.getByRole('button', { name: /Show solution/ }).click(); + await page + .getByRole('button', { name: /Next step/ }) + .first() + .click(); + await page + .getByRole('button', { name: /Next step/ }) + .first() + .click(); + // the question at the top, the newest step below it + await page.evaluate(() => scrollTo(0, 70)); + await shot('solution'); + await typeAnswer(await answer()); + await page.getByRole('button', { name: 'Continue' }).click(); + await typeAnswer(await answer()); + await shot('correct'); + for (let i = 0; i < 6; i++) { + await page.getByRole('button', { name: 'Continue' }).click(); + await typeAnswer(await answer()); + } + await page.getByRole('button', { name: 'Continue' }).click(); + await page.getByText(/unlocked/).waitFor(); + await shot('level-up'); + + if (scheme === 'light') { + // a quick mock test, answered like someone around stanine 6 + await page.goto(`${base}/#test`); + await page.getByRole('button', { name: /Quick check/ }).click(); + await page.getByRole('button', { name: /Start the quick check/ }).click(); + for (let q = 0; q < 8; q++) { + if (q === 2) { + await think(48); + await shot('mock-test'); + } + const right = await answer(); + await typeAnswer(q % 3 === 2 ? right + 3 : right, 55 + 15 * (q % 3)); + } + await page.getByText('Stanine', { exact: true }).waitFor(); + await shot('test-result'); + } + + await page.goto(`${base}/#progress`); + await page.getByText('Mock test results').waitFor(); + await shot('progress'); + + if (scheme === 'light') { + await page.locator('a[href^="#review-"]').first().click(); + await page + .getByText(/Your answer/) + .first() + .waitFor(); + await shot('review'); + } + await page.close(); +} +await browser.close(); +console.log(`Screenshots saved in ${out}`); diff --git a/web/src/App.svelte b/web/src/App.svelte index 30df85a..e69e0f7 100644 --- a/web/src/App.svelte +++ b/web/src/App.svelte @@ -1,6 +1,7 @@ {#if session.user} {#if route === '#/people' && session.isOwner} - {:else} + {:else if practice.error} +

+ + +
+ {:else if practice.loaded} {/if} {:else if error} diff --git a/web/src/app.css b/web/src/app.css index 388a61b..2bdd1e4 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -3,10 +3,47 @@ @theme { --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; /* the brand color: change these to restyle every button and link */ - --color-brand-400: var(--color-indigo-400); - --color-brand-500: var(--color-indigo-500); - --color-brand-600: var(--color-indigo-600); - --color-brand-700: var(--color-indigo-700); + --color-brand-400: var(--color-emerald-400); + --color-brand-500: var(--color-emerald-500); + /* buttons use 600 with white text: emerald-700 keeps that readable (WCAG AA) */ + --color-brand-600: var(--color-emerald-700); + --color-brand-700: var(--color-emerald-800); +} + +/* Colors the question pictures and feedback use, for light and dark */ +:root { + --ok: var(--color-emerald-600); + --ok-soft: var(--color-emerald-50); + --ok-ink: var(--color-emerald-800); + --bad: var(--color-red-600); + --bad-soft: var(--color-red-50); + --help: var(--color-blue-600); + --help-soft: var(--color-blue-50); + --hint: var(--color-amber-500); + --hint-soft: var(--color-amber-50); + --box: var(--color-white); + --box-line: var(--color-zinc-300); + --box-centre: var(--color-zinc-100); + --ink: var(--color-zinc-900); + --muted: var(--color-zinc-500); +} +@media (prefers-color-scheme: dark) { + :root { + --ok: var(--color-emerald-400); + --ok-soft: color-mix(in oklab, var(--color-emerald-500) 18%, transparent); + --ok-ink: var(--color-emerald-300); + --bad: var(--color-red-400); + --bad-soft: color-mix(in oklab, var(--color-red-500) 18%, transparent); + --help: var(--color-blue-400); + --help-soft: color-mix(in oklab, var(--color-blue-500) 18%, transparent); + --hint: var(--color-amber-400); + --hint-soft: color-mix(in oklab, var(--color-amber-500) 14%, transparent); + --box: var(--color-zinc-900); + --box-line: var(--color-zinc-600); + --box-centre: var(--color-zinc-800); + --ink: var(--color-zinc-100); + --muted: var(--color-zinc-400); + } } @layer base { @@ -34,17 +71,109 @@ } @utility btn { - @apply inline-flex items-center justify-center rounded-xl px-4 py-3 font-semibold transition disabled:opacity-50; + @apply inline-flex items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition disabled:opacity-50; } @layer components { .btn-primary { - @apply btn bg-brand-600 text-white shadow-sm hover:bg-brand-700 active:bg-brand-700; + @apply btn bg-brand-600 text-white shadow-[0_3px_0_var(--color-emerald-900)] hover:bg-brand-700 active:translate-y-0.5 active:shadow-none; } .btn-secondary { @apply btn border border-zinc-300 bg-white hover:bg-zinc-100 dark:border-zinc-700 dark:bg-zinc-900 dark:hover:bg-zinc-800; } + .btn-bad { + @apply btn bg-red-600 text-white shadow-[0_3px_0_var(--color-red-800)] active:translate-y-0.5 active:shadow-none; + } + .btn-help { + @apply btn bg-blue-600 text-white shadow-[0_3px_0_var(--color-blue-800)] active:translate-y-0.5 active:shadow-none; + } .card { @apply rounded-2xl border border-zinc-200 bg-white p-5 dark:border-zinc-800 dark:bg-zinc-900; } + /* answers to pick from; add .chosen to the picked one */ + .choice { + @apply flex flex-col items-start gap-0.5 rounded-xl border-2 border-zinc-200 bg-white px-4 py-3 text-left transition dark:border-zinc-800 dark:bg-zinc-900; + } + .chosen { + @apply border-brand-600 bg-brand-600/5 dark:border-brand-400; + } + .eyebrow { + @apply text-xs font-bold tracking-wider text-zinc-500 uppercase dark:text-zinc-400; + } + .badge { + @apply inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-bold tracking-wide uppercase; + } + .kpi { + @apply rounded-xl bg-zinc-100 px-3 py-2 dark:bg-zinc-800; + } + .kpi b { + @apply block text-xl tabular-nums; + } + .kpi span { + @apply text-xs text-zinc-500 dark:text-zinc-400; + } + + /* the numbers of a question */ + .bx { + @apply relative grid aspect-square min-w-0 place-items-center rounded-xl border-2 font-semibold tabular-nums; + border-color: var(--box-line); + background: var(--box); + font-size: clamp(16px, 4.4vw, 24px); + } + .bx.q { + @apply border-dashed; + border-color: var(--ok); + color: var(--ok); + background: var(--ok-soft); + animation: pulse-ring 2s ease-in-out infinite; + } + .bx.c { + background: var(--box-centre); + border-color: var(--muted); + } + .bx.hl { + border-color: var(--help); + background: var(--help-soft); + box-shadow: 0 0 0 3px color-mix(in oklab, var(--help) 25%, transparent); + } + .bx.is-ok { + border-color: var(--ok); + background: var(--ok-soft); + color: var(--ok-ink); + animation: none; + } + .bx.is-bad { + border-color: var(--bad); + background: var(--bad-soft); + color: var(--bad); + animation: none; + } + .bx.is-help { + border-color: var(--help); + background: var(--help-soft); + color: var(--help); + animation: none; + border-style: solid; + } +} + +@keyframes pulse-ring { + 50% { + box-shadow: 0 0 0 5px color-mix(in oklab, var(--ok) 20%, transparent); + } +} +@keyframes rise { + from { + opacity: 0; + transform: translateY(6px); + } +} +.rise { + animation: rise 0.22s ease-out; +} +@media (prefers-reduced-motion: reduce) { + .bx.q, + .rise { + animation: none; + } } diff --git a/web/src/components/AnswerInput.svelte b/web/src/components/AnswerInput.svelte new file mode 100644 index 0000000..eb0661a --- /dev/null +++ b/web/src/components/AnswerInput.svelte @@ -0,0 +1,54 @@ + + +
+ + { + if (e.key === 'Enter') { + // this Enter submits; it must not also reach the "Enter = Continue" shortcut + e.preventDefault(); + e.stopPropagation(); + if (valid(value)) onsubmit(); + } + }} + class="!m-0 min-w-0 flex-1 !rounded-none !border-0 !bg-transparent !p-0 text-2xl font-semibold tabular-nums !shadow-none !ring-0" + inputmode="numeric" + autocomplete="off" + enterkeyhint="go" + placeholder="Your answer" + /> + +
diff --git a/web/src/components/Guide.svelte b/web/src/components/Guide.svelte new file mode 100644 index 0000000..35b021a --- /dev/null +++ b/web/src/components/Guide.svelte @@ -0,0 +1,44 @@ + + +
    + {#each steps.slice(0, upto) as s, i (i)} + {@const current = i === upto - 1 && !all} +
  1. + + {#if s.final}{:else}{i + 1}{/if} + +
    +

    {s.t}

    + {#if s.lines?.length} +
    + {#each s.lines as line (line)} + {line} + {/each} +
    + {/if} +
    +
  2. + {/each} +
diff --git a/web/src/components/Home.svelte b/web/src/components/Home.svelte index 1f3bc10..f57432b 100644 --- a/web/src/components/Home.svelte +++ b/web/src/components/Home.svelte @@ -1,50 +1,84 @@ - -
-
-

Hi {user.name || user.email}

- -
+ // The signed-in app: tabs, each with its own #address so Back works, and the + // full-screen lesson, test and result on top of them (lib/nav.svelte.ts). + const tabs: { id: string; label: string; icon: IconName }[] = [ + { id: 'today', label: 'Today', icon: 'today' }, + { id: 'practice', label: 'Practice', icon: 'practice' }, + { id: 'test', label: 'Mock test', icon: 'test' }, + { id: 'progress', label: 'Progress', icon: 'progress' }, + { id: 'me', label: 'Me', icon: 'me' }, + ]; -
-

Your app starts here

-

- Edit web/src/components/Home.svelte and save. -

-
+ const fromHash = () => location.hash.slice(1); + let hash = $state(fromHash()); + const review = $derived(hash.startsWith('review-') ? hash.slice(7) : ''); + const tab = $derived(review ? 'progress' : (tabs.find((t) => t.id === hash)?.id ?? 'today')); - {#if install.canPrompt} -
-

Install this app for quick access from your home screen.

- -
- {:else if install.needsIosSteps} -
-

To install this app, tap Share in Safari, then Add to Home Screen.

-
- {/if} - - + onMount(() => { + const onHash = () => { + hash = fromHash(); + // Back from a lesson or result returns to the tabs + if (nav.screen.name !== 'tabs') nav.screen = { name: 'tabs' }; + }; + addEventListener('hashchange', onHash); + return () => removeEventListener('hashchange', onHash); + }); + - +{#if nav.screen.name === 'lesson'} + {#key nav.screen}{/key} +{:else if nav.screen.name === 'test'} + +{:else if nav.screen.name === 'result'} + {#key nav.screen.id}{/key} +{:else} +
+
+ {#if review} + {#key review}{/key} + {:else if tab === 'today'} + + {:else if tab === 'practice'} + + {:else if tab === 'test'} + + {:else if tab === 'progress'} + + {:else} + + {/if} +
- {#await version then v} - {#if v}

Version {v}

{/if} - {/await} -
+ + +{/if} diff --git a/web/src/components/Icon.svelte b/web/src/components/Icon.svelte new file mode 100644 index 0000000..3aec68d --- /dev/null +++ b/web/src/components/Icon.svelte @@ -0,0 +1,48 @@ + + + + + diff --git a/web/src/components/ItemView.svelte b/web/src/components/ItemView.svelte new file mode 100644 index 0000000..d46ff15 --- /dev/null +++ b/web/src/components/ItemView.svelte @@ -0,0 +1,186 @@ + + +{#snippet box(c: Cell, i: number, extra = '')} + {#if c === null} + {#if reveal} +
{fmt(reveal.answer)}
+ {:else} +
?
+ {/if} + {:else} +
{fmt(c)}
+ {/if} +{/snippet} + +{#if v.kind === 'series'} + {@const cols = `grid-template-columns: repeat(${v.cells.length}, minmax(0, 64px))`} +
+
+ {#each v.cells as c, i (i)}{@render box(c, i)}{/each} +
+ {#if gapRow} +
+ {#each gapRow as d, i (i)} + {d === null ? '?' : (d >= 0 ? '+' : '−') + Math.abs(d)} + {/each} + +
+ {/if} +
+{:else if v.kind === 'grid'} +
+ {#each v.cells.flat() as c, i (i)}{@render box(c, i, 'text-[clamp(17px,4.5vw,26px)]')}{/each} +
+{:else if v.kind === 'plus'} +
+ {#each v.figs as f, k (k)} + {@const B = k * 5} +
+
+ {@render box(f.outer[0], B, 'rounded-lg text-[clamp(13px,3.2vw,18px)]')} +
+ {@render box(f.outer[1], B + 1, 'rounded-lg text-[clamp(13px,3.2vw,18px)]')} + {@render box(f.centre, B + 4, 'c rounded-lg text-[clamp(13px,3.2vw,18px)]')} + {@render box(f.outer[2], B + 2, 'rounded-lg text-[clamp(13px,3.2vw,18px)]')} +
+ {@render box(f.outer[3], B + 3, 'rounded-lg text-[clamp(13px,3.2vw,18px)]')} +
+
+ {/each} +
+{:else if v.kind === 'tri'} +
+ {#each v.figs as f, k (k)} + {@const B = k * 4} + {@const lit = [0, 1, 2, 3].some((j) => hl.has(B + j))} + + + {#each [[80, 30], [20, 128], [140, 128]] as [x, y], j (j)} + {@const c = f.outer[j]} + {@const missing = c === null} + {@const col = missing + ? reveal + ? colors[reveal.state] + : 'var(--ok)' + : hl.has(B + j) + ? 'var(--help)' + : 'var(--box-line)'} + + {missing ? (reveal ? fmt(reveal.answer) : '?') : fmt(c)} + {/each} + {#if f.centre === null} + {@const col = reveal ? colors[reveal.state] : 'var(--ok)'} + + {reveal ? fmt(reveal.answer) : '?'} + {:else} + {fmt(f.centre)} + {/if} + + {/each} +
+{:else if v.kind === 'pairs'} +
+ {#each v.pairs as [x, y], k (k)} +
+ {@render box(x, k * 2)} + + {@render box(y, k * 2 + 1)} +
+ {/each} +
+{/if} diff --git a/web/src/components/Lesson.svelte b/web/src/components/Lesson.svelte new file mode 100644 index 0000000..f205d44 --- /dev/null +++ b/web/src/components/Lesson.svelte @@ -0,0 +1,452 @@ + + +
+
+ +
+ {#each plan as _, i (i)} + {@const a = answers[i]} + + {/each} +
+
+ +
+
+ {FAMILIES[item.family].short} · level {item.level} + {#if isChallenge}Challenge{/if} +
+

{item.prompt}

+ +
+ s.gaps) + ? revealed + ? 'full' + : 'partial' + : null} + /> +
+ + {#if phase === 'ask'} +
+ + +
+

+ {#if sol} + A question solved with the walkthrough gives no XP and doesn't count towards levelling up, + but it's how you learn the trick. + {:else if hinted} + Using the hint halves the XP for this question (+5). + {:else} + Try it yourself first: a right answer with no help earns +10 XP. + {/if} +

+ {/if} + + {#if hinted && phase === 'ask'} + {#if sol} +
+ +

Hint: {item.nudge}

+
+ {:else} +
+

+ How to think about it +

+
    + {#each item.think as t (t)}
  1. {t}
  2. {/each} +
+

+ For this question: + {item.nudge} +

+
+ {/if} + {/if} + + {#if sol} +
+

+ + {phase === 'feedback' ? "Here's how it works" : "Let's solve it together"} + {Math.min(sol, steps.length)} / {steps.length} +

+ + {#if sol < steps.length} +
+ + +
+ {:else if phase === 'ask'} +

+ Now type {fmt(item.answer)} in the answer box and press + Check. +

+ {/if} +
+ {/if} +
+ + {#if phase === 'ask'} +
+
+ check()} autofocus={!sol} /> + + +
+
+ {:else} + {@const state = earned(last) ? 'ok' : last.correct ? 'help' : 'bad'} +
+
+
+ +
+

+ {#if state === 'ok'}{praise}{:else if state === 'help'}That's it. Solved with the + walkthrough.{:else if last.given === null}Skipped. The answer is {fmt( + item.answer, + )}{:else}Not quite. The answer is {fmt(item.answer)}{/if} +

+

+ {[ + secs(last.ms), + last.solved ? 'solution used' : last.hinted ? 'hint used' : '', + xpFor(last) ? `+${xpFor(last)} XP` : '', + ] + .filter(Boolean) + .join(' · ')} +

+
+
+ {#if !sol} +
    + {#each item.steps as s, i (i)}
  • {s}
  • {/each} +
+ {/if} + {#if saveError}{/if} +
+ {#if !last.correct && sol < steps.length} + + {/if} + +
+
+
+ {/if} +
+ +{#if confirmLeave} + +{/if} diff --git a/web/src/components/Login.svelte b/web/src/components/Login.svelte index d4f4a44..01fd144 100644 --- a/web/src/components/Login.svelte +++ b/web/src/components/Login.svelte @@ -24,7 +24,7 @@
- +