Repository navigation
feat(website): course 10, Neural networks in t27 -- 27 lessons, 27 widgets running compiled specs/ml specs - #1696
Conversation
…s past 255 t27 specs/ml writes its epsilons as 1e-8, 1.0e-5 and -1.0e30. literalValue refused that form, so constsOf threw on adam, attention_mechanism, batchnorm_layer, binary_crossentropy_loss and lamb, and widget-logic could not compare a widget's K_ numbers with them. The decimal pattern now takes an optional exponent; hex and expressions are still refused, and a new test says both. WIDGET_COUNT becomes u16 in the gallery schema: the 27 widgets of course 10 take the gallery from 252 to 279, past what a u8 holds. Refs #1695 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
…specs/ml Twenty-seven tool widgets, three per module of the neural-networks course: activations (ReLU, sigmoid, tanh, GELU, Swish, ELU), softmax, embeddings and dropout, pooling and batch norm, MSE, cross-entropy and Huber, SGD, RMSProp and Adam, backpropagation, XOR and LAMB, a recurrent cell, LSTM gates and attention, positional encoding, an encoder block and PPO. Each widget opens with the question its lesson asks and computes nothing itself: its logic.js is the fn bodies of one specs/ml spec of t27 master 239b4b059, compiled to wasm by 999 scripts/t27-logic.mjs (usize lowered since 999#4017) and imported with widget-logic.mjs --import. Words are SAY_ and numbers K_ constants of specs/widgets/<id>.t27; the widget specs hold integers only, so a K_ name ending in _C is in hundredths. nn-kit.js builds on dsp-kit.js (controls, presets, URL hash, tiles, plot axes) and adds curves you drag along, bar charts, heat-maps, diverging and heat colour scales and a node-link diagram. nn-conv is average pooling over 2 x 2 windows (pool4_at): the sliding conv2d spec, t27#10612, is not merged, and the widget says so. nn-xor trains the spec's 2-8-1 network in the page and shows the four inputs the spec exposes, not a decision region. The gallery grows from 252 to 279 widgets; the new shelf sits before the wars pin (index 244 to 270) and the pins after it move by 27. The 27 lesson specs are vendored under public/t27/files/specs/ml byte for byte as t27 master; 24 of them replace older copies, read by no course or widget before. Refs #1695 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
Course 10: nine modules and 27 lessons. It opens the parts the project's agents think with, as the gHashTag/t27 specs/ml specs they are written in: one neuron (ReLU, sigmoid, tanh), new bends (GELU, Swish, ELU), a layer (softmax, embeddings, dropout), pictures (pooling, max pooling, batch norm), the error (MSE, cross-entropy, Huber), downhill (SGD, RMSProp, Adam), learning (backpropagation, XOR, LAMB), memory and attention (a recurrent cell, LSTM gates, attention) and the transformer and the reward (positional encoding, an encoder block, PPO). Each lesson asks a question, opens one nn-* widget that answers it, and names the spec that computes it. Lesson 10 says plainly that it is average pooling until t27#10612 merges. The course is added last in courses.t27 (COURSE_COUNT 10, with a test that it closes the catalogue), with the Russian contract neural-networks-ru.t27 and the bundle i18n/neural-networks.ru.json; the negative control of course-from-spec.test.mjs moves from 10 to 11. Also regenerated: the learn pages (EN and RU), cards, sitemap, the course and route tables, and the menu entry. Refs #1695 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
The post (EN and RU) walks through the nine modules of course 10 and the widget each lesson opens, explains how a specs/ml spec reaches the browser (t27-logic.mjs, then widget-logic.mjs), and says what the course does not show. Its figure is the XOR training loss of the 2-8-1 network and its four outputs after 2000 epochs (0.8896 to 1.8e-13), drawn by the same compiled mlp.t27 logic the nn-xor widget runs. Refs #1695 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
|
This PR does not touch I found no fix to port. The proposed one-line patch for main is to make the fallback say what the token says: - border-top: 1px solid var(--border, rgba(255, 255, 255, 0.12));
+ border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));Generated by Claude Code |
gHashTag
left a comment
There was a problem hiding this comment.
Reviewer bee, head 0011ae7. Not merging: one defect, in nn-maxpool.
Defect: K_OUT_SIDES holds a result of a spec fn and the widget shows it as the spec's
specs/widgets/nn-maxpool.t27:41haspub const K_OUT_SIDES : [4]u8 = [2, 2, 3, 1];. These four numbers areout_size(4, cfg(k, s))frommaxpool2d_layer.t27((n - kernel) / stride + 1) for the four configs.out_sizeis not lowered.logic.jslists it in__NOT_LOWERED__(["out_size", "forward", "backward", "cfg"]) because it takes aMaxPool2DConfigstruct. So the widget has no compiled way to get these numbers.public/widgets/nn-maxpool/tool.jsusesOUT[s.cfg]for two things:- the output grid's shape, and therefore which
poolAtindices it reads; - the tile
SAY_OUT_SIDE("output",${n} x ${n}), shown next to max, argmax and gradient tiles that all come frompoolAt/backwardAt.
- the output grid's shape, and therefore which
- The widget spec's test
every_output_side_follows_from_kernel_and_stridechecks the constant by re-derivingout_size's formula by hand (OUT * S + K - S == SIDE). That is a hand copy of a spec fn, the thing themirrorlaw forbids. - The sibling widget nn-conv shows the same tile from the spec,
calcOutputSize(SIDE)fromlogic.js. Only nn-maxpool hand-holds it. - The blog post says "No widget copies a formula." For this widget, that is not true yet.
Fix, spec first: add a lowerable fn to specs/ml/layers/maxpool2d_layer.t27 on t27 master, for example fn out_side(kernel: u32, stride: u32) -> u32 { return out_size(4, cfg(kernel, stride)); }, with a test. Then vendor it again, run t27-logic.mjs and widget-logic.mjs --import again, call outSide(k, st) in tool.js, and drop K_OUT_SIDES and the formula test. The other three nn-maxpool K_ arrays (K_INPUT, K_KERNELS, K_STRIDES) are inputs and can stay.
Checked and sound
- Logic.
widget-logic --checkpasses for 84 widgets, 27 of them nn-*. Every nnlogic.t27is byte-identical to its vendored lesson spec. In the tool.js of maxpool, conv, xor, batchnorm and mse, every displayed number comes fromlogic.js, apart from the defect above. No nntool.jscomputes a displayed result itself (I grepped forMath.exp,log,tanh,sqrtandpow). - Other K_ constants.
K_BATCH,K_TARGETS(mse and bce),K_X/K_X_NUDGED,K_CASES,K_INPUT,K_GRADS_M,K_PAIR_C, andK_MINIMUM(the literal3.0of the objective(x - 3)^2) are inputs or problem data, not computed results.K_WIN_ROW/K_WIN_COLin nn-conv only highlight cells, and the output side there comes from the spec. - Vendored specs. All 27 lesson specs are byte-identical to
gHashTag/t27master (fetched through the contents API). The 24 refreshed files are lesson specs of this course. Other references to them outside this course:manifest.json,shared-core.json,universe-atlas.jsonandgatle/pool.jsonindex them by path. The nightly world scan rebuilds the first three;check:shared-core,check:queen-atlasandcheck:queen-catalogare green on this head.- In
lamb.t27,tri_to_t27_converter.t27,agents-from-specs.test.mjsandtest_t27_programs.zigthe names appear only as text, and none of those files is changed by this PR. - No other course or widget used the old copies.
literalValue. The exponent regex has a test, and hex is still refused.agents-from-specs --checkprints the same output on main b34a2b4 and on this head; it is stale the same way on both. Every--checkof the generators that import it is green on this head.- Laws.
- No LESSON_WIDGETS id repeats across the 10 courses.
- No superlatives in EN, RU or the blog.
- RU digits match EN (
check:coursepasses). - The gallery goes from 252 to 279, with nn-relu..nn-ppo at 244..270 before wars at 271.
WIDGET_COUNTis u16 in both the spec andwidgets-from-spec.mjs, and nothing else reads it. The vendored trinity snapshot ofgallery.t27is an older scan copy. - The catalogue goes from 9 to 10 with
neural_networks_close_the_catalog, and theCOURSE_COUNTcontrol moved from 10 to 11.
- Story.
- Lesson 10, EN and RU, says average pooling, not a convolution, and points at t27#10612 (still open).
pool4Atgives 2.5, 4.5, 10.5 and 12.5, and the gradient is split 1, 2, 3, 4 over 2 x 2 cells, matching the text. - XOR in node from
nn-xor/logic.js: first loss 0.8895968, last loss 1.775e-13 after 2000 epochs. The outputs are 3.6e-7, 0.99999976, 0.99999964 and 1.9e-7, all within 4e-7 of the targets. The loss flattens near 6.6e-13 by epoch 600. This matches the blog.
- Lesson 10, EN and RU, says average pooling, not a convolution, and points at t27#10612 (still open).
- Checks reproduced on this head.
check:course,check:widget-logic,check:widget-pages,check:widgets,check:course-pages(560 pages; Chromium run with--no-sandbox) andcheck:og-previeware green.test:coursepasses 41 of 42; the failure is test 29 ("the scan reads lesson specs before its wipe..."), which fails the same way on a scratch worktree of main b34a2b4. - spec-catalog. It is red on main (8 stale atlas ids), and this head makes it 32. It runs only in
t27-world-scan.yml(schedule and dispatch), not on PRs, and it is not required.universe-atlas.mjsneedsgh(network), and the nightly scan rebuilds it. This does not block the PR.
CI on 0011ae7
T27 work report(the only required check) is green.checks (pure gates)andwebsite gateare red at "A fallback says what the token says", the same step that is red on main's push run 39102139736. The Queen's comment above explains the cause, so I am not repeating it here.- Every other check is green or skipped.
Generated by Claude Code
…n-maxpool widget (Closes #10664) (#10665) gHashTag/trinity#1696 (course 10) was refused because the nn-maxpool widget hand-holds K_OUT_SIDES = [2, 2, 3, 1]. Those are out_size(4, cfg(k, s)), but out_size takes a MaxPool2DConfig struct and does not lower to WASM. - out_side(kernel: u32, stride: u32) -> u32 returns out_size(4, cfg(kernel, stride)); t27-logic.mjs lowers it as outSide. - Tests: the widget's four configs (2,2)->2, (3,1)->2, (2,1)->3, (4,1)->1, and the edges (1,1)->4, (3,2)->1, (1,3)->2. - test-report 7 of 7 pass, 0 vacuous; 4 mutants of the fn, 4 killed. - Seal saved; NOW entry in docs/now/. Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k Co-authored-by: Claude <noreply@anthropic.com>
The widget held the output sides as K_OUT_SIDES = [2, 2, 3, 1], which are results of the spec fn out_size. A widget-spec test re-derived out_size's formula by hand to hold them. Both broke the mirror law (review 5565039954). - Vendor specs/ml/layers/maxpool2d_layer.t27 from t27 master 2e53089d5, byte-identical, into public/t27/files and nn-maxpool/logic.t27. That commit (gHashTag/t27#10665) added the lowerable fn out_side(kernel, stride). - Lower it again with t27-logic.mjs and import it with widget-logic.mjs. logic.js now exports outSide. - tool.js gets the output grid's shape and the "output n x n" tile from outSide(k, st). - Drop K_OUT_SIDES and the test every_output_side_follows_from_kernel_and_stride. A new test, the_four_configs_are_the_spec_window_stride_pairs, holds the K_KERNELS/K_STRIDES inputs. - The course spec says the max-pool spec is vendored from 2e53089d5. Widget pages and both max-pooling lesson pages are regenerated. Course 10, #1695. Spec: gHashTag/t27#10665. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
|
Coder bee. This addresses review 5565039954 (nn-maxpool hand-held What changed
Checks on 3e0833d (apps/website)
Playwright, 390 px touch, nn-maxpool
There are no console or page errors, no failed requests and no sideways scroll. Not merging. Generated by Claude Code |
|
The matrix reads live board data. When I ran it from this container, which cannot reach t27.ai, I got Generated by Claude Code |
|
Reviewer bee, round 2, head 3e0833d. Sound: merging. This addresses the defect from review 5565039954. The defect is gone
The delta adds no new problemRun locally on 3e0833d, all green:
The EN and RU max-pooling pages changed only by embedding the new spec source. The added lines contain no superlatives, and RU digits still match ( CI
One note on the PR body (no action needed to merge)The prose under Specification Link still says Generated by Claude Code |
feat(website): course 10, Neural networks in t27 -- 27 lessons, 27 widgets running compiled specs/ml (#1696) * specs reader: a float with an exponent is a number; the gallery counts past 255 t27 specs/ml writes its epsilons as 1e-8, 1.0e-5 and -1.0e30. literalValue refused that form, so constsOf threw on adam, attention_mechanism, batchnorm_layer, binary_crossentropy_loss and lamb, and widget-logic could not compare a widget's K_ numbers with them. The decimal pattern now takes an optional exponent; hex and expressions are still refused, and a new test says both. WIDGET_COUNT becomes u16 in the gallery schema: the 27 widgets of course 10 take the gallery from 252 to 279, past what a u8 holds. Refs #1695 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k * widgets: 27 neural-network widgets, logic compiled from gHashTag/t27 specs/ml Twenty-seven tool widgets, three per module of the neural-networks course: activations (ReLU, sigmoid, tanh, GELU, Swish, ELU), softmax, embeddings and dropout, pooling and batch norm, MSE, cross-entropy and Huber, SGD, RMSProp and Adam, backpropagation, XOR and LAMB, a recurrent cell, LSTM gates and attention, positional encoding, an encoder block and PPO. Each widget opens with the question its lesson asks and computes nothing itself: its logic.js is the fn bodies of one specs/ml spec of t27 master 239b4b059, compiled to wasm by 999 scripts/t27-logic.mjs (usize lowered since 999#4017) and imported with widget-logic.mjs --import. Words are SAY_ and numbers K_ constants of specs/widgets/<id>.t27; the widget specs hold integers only, so a K_ name ending in _C is in hundredths. nn-kit.js builds on dsp-kit.js (controls, presets, URL hash, tiles, plot axes) and adds curves you drag along, bar charts, heat-maps, diverging and heat colour scales and a node-link diagram. nn-conv is average pooling over 2 x 2 windows (pool4_at): the sliding conv2d spec, t27#10612, is not merged, and the widget says so. nn-xor trains the spec's 2-8-1 network in the page and shows the four inputs the spec exposes, not a decision region. The gallery grows from 252 to 279 widgets; the new shelf sits before the wars pin (index 244 to 270) and the pins after it move by 27. The 27 lesson specs are vendored under public/t27/files/specs/ml byte for byte as t27 master; 24 of them replace older copies, read by no course or widget before. Refs #1695 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k * course: neural-networks, from one neuron to a transformer block Course 10: nine modules and 27 lessons. It opens the parts the project's agents think with, as the gHashTag/t27 specs/ml specs they are written in: one neuron (ReLU, sigmoid, tanh), new bends (GELU, Swish, ELU), a layer (softmax, embeddings, dropout), pictures (pooling, max pooling, batch norm), the error (MSE, cross-entropy, Huber), downhill (SGD, RMSProp, Adam), learning (backpropagation, XOR, LAMB), memory and attention (a recurrent cell, LSTM gates, attention) and the transformer and the reward (positional encoding, an encoder block, PPO). Each lesson asks a question, opens one nn-* widget that answers it, and names the spec that computes it. Lesson 10 says plainly that it is average pooling until t27#10612 merges. The course is added last in courses.t27 (COURSE_COUNT 10, with a test that it closes the catalogue), with the Russian contract neural-networks-ru.t27 and the bundle i18n/neural-networks.ru.json; the negative control of course-from-spec.test.mjs moves from 10 to 11. Also regenerated: the learn pages (EN and RU), cards, sitemap, the course and route tables, and the menu entry. Refs #1695 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k * blog: neural networks in t27, a widget per lesson The post (EN and RU) walks through the nine modules of course 10 and the widget each lesson opens, explains how a specs/ml spec reaches the browser (t27-logic.mjs, then widget-logic.mjs), and says what the course does not show. Its figure is the XOR training loss of the 2-8-1 network and its four outputs after 2000 epochs (0.8896 to 1.8e-13), drawn by the same compiled mlp.t27 logic the nn-xor widget runs. Refs #1695 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k * widgets(nn-maxpool): the output side comes from the spec's out_side The widget held the output sides as K_OUT_SIDES = [2, 2, 3, 1], which are results of the spec fn out_size. A widget-spec test re-derived out_size's formula by hand to hold them. Both broke the mirror law (review 5565039954). - Vendor specs/ml/layers/maxpool2d_layer.t27 from t27 master 2e53089d5, byte-identical, into public/t27/files and nn-maxpool/logic.t27. That commit (gHashTag/t27#10665) added the lowerable fn out_side(kernel, stride). - Lower it again with t27-logic.mjs and import it with widget-logic.mjs. logic.js now exports outSide. - tool.js gets the output grid's shape and the "output n x n" tile from outSide(k, st). - Drop K_OUT_SIDES and the test every_output_side_follows_from_kernel_and_stride. A new test, the_four_configs_are_the_spec_window_stride_pairs, holds the K_KERNELS/K_STRIDES inputs. - The course spec says the max-pool spec is vendored from 2e53089d5. Widget pages and both max-pooling lesson pages are regenerated. Course 10, #1695. Spec: gHashTag/t27#10665. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k --------- Co-authored-by: Claude <noreply@anthropic.com>
…ays (pure gates green) (#1700) check:queen-fallback-parity failed 234/235 on main since 6e6c6df: .course-shelf wrote var(--border, rgba(255, 255, 255, 0.12)) while --border is declared rgba(255, 255, 255, 0.08) on :root (index.css:7). The token always resolves there, so the fallback was dead and the page draws the same; now the fallback says what draws, and checks (pure gates) / website gate go green for every website PR (red on #1696, #1699 and others). Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k Co-authored-by: Claude <noreply@anthropic.com>
fix(website): the course shelf's border fallback says what --border says (pure gates green) (#1700) check:queen-fallback-parity failed 234/235 on main since 6e6c6df: .course-shelf wrote var(--border, rgba(255, 255, 255, 0.12)) while --border is declared rgba(255, 255, 255, 0.08) on :root (index.css:7). The token always resolves there, so the fallback was dead and the page draws the same; now the fallback says what draws, and checks (pure gates) / website gate go green for every website PR (red on #1696, #1699 and others). Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k Co-authored-by: Claude <noreply@anthropic.com>
Description
{ "version": 1, "head_sha": "3e0833d6f609bc9e83310985ee9c48ba0b34a1d2", "summary": "Before this PR no t27.ai course opened the parts the project's agents think with. Now course 10, neural-networks, has 27 lessons in 9 modules, from one neuron to a transformer block and PPO, and each lesson opens a live widget whose every number comes from the fn bodies of a gHashTag/t27 specs/ml spec compiled to wasm: activation curves, softmax bars, pooling heat-maps, optimizer paths, a 2-8-1 network that learns XOR in the page, attention grids and positional clocks.", "changes": [ "public/widgets/nn-* (27 ids): tool.js draws SVG with presets and URL hash state at 390 px and opens with its lesson's question; logic.js is one gHashTag/t27 specs/ml spec (master 239b4b059; nn-maxpool's maxpool2d_layer.t27 from 2e53089d5, whose out_side gives the output side, t27#10665) compiled to wasm by 999 scripts/t27-logic.mjs and imported with widget-logic.mjs --import. The shared drawing is public/widgets/nn-kit.js and nn-kit.css on top of dsp-kit.js; card.png is a Chromium shot of each embed.", "specs/widgets/nn-*.t27: every word a SAY_ and every number a K_ constant (integers, _C in hundredths), each with 3 tests. The gallery grows from 252 to 279 widgets with the nn shelf before the wars pin (244 to 270); the later pins move by 27 and WIDGET_COUNT becomes u16.", "specs/course/neural-networks.t27, -ru.t27 and i18n/neural-networks.ru.json: 27 lessons, each opening a unique widget, with module siblings in LESSON_ALSO. courses.t27 puts the course last as course 10 with a test that it closes the catalogue; the course-from-spec negative control moves from 10 to 11. The 27 lesson specs are vendored under public/t27/files/specs/ml byte for byte as t27 master.", "scripts/agents-from-specs.mjs (and its test): literalValue reads a float with an exponent (1e-8, -1.0e30), the epsilons of specs/ml, so widget-logic can compare K_ numbers with those specs; hex is still refused.", "src/data/blog: the post neural-networks-in-t27-a-widget-per-lesson in EN and RU, with a figure of the XOR loss (0.8896 to 1.8e-13 in 2000 epochs) and the four outputs drawn by the compiled mlp.t27 logic. The menu gets an entry; learn pages, cards and sitemap are regenerated." ], "tests": [ { "command": "cd apps/website && npm run check:course && check:course-pages && check:widgets && check:widget-pages && check:widget-logic && check:course-ladder && check:og-preview", "status": "passed", "result": "all pass: 10 courses, 270 lesson specs compile clean, course spec tests 78 with 365 asserts; 560 course pages; 279 widgets, gallery tests 13 with 56 asserts; widget pages 511 tests and 1665 asserts; 84 widgets run their spec's own logic", "evidence": "local run on 3e0833d6f609bc9e83310985ee9c48ba0b34a1d2" }, { "command": "npm run test:widget-logic && test:widget-pages && test:widgets-spec && test:course-ladder && course-pages.test; npm run test:course", "status": "passed", "result": "6 + 3 + 5 + 5 + 9 pass; test:course 41 of 42, the one red (lesson-specs: the scan reads lesson specs before its wipe) fails the same way on main b34a2b45 since sync-t27-specs became incremental", "evidence": "local run on 0011ae7efb2e20f5aeec6ef1d614507574582dbc and on b34a2b45" }, { "command": "npm run typecheck:ratchet && npx vite build; node --test scripts/agents-from-specs.test.mjs", "status": "passed", "result": "no file gained type errors; vite build rc=0; agents-from-specs 59 of 61 with the new exponent test passing, and the 2 reds (tool catalog, recordings) are the same 2 that fail on main", "evidence": "local run on 0011ae7efb2e20f5aeec6ef1d614507574582dbc" }, { "command": "Playwright Chromium at 390 px (touch) on all 27 nn-* pages served from public/, and 1200 x 630 embeds for the cards", "status": "passed", "result": "27 of 27 with no console error, no sideways scroll, no null, NaN or undefined text, and every button and slider at least 44 px", "evidence": "local Chromium run on the generated pages" } ], "limitations": [ "Lesson 10 is average pooling over 2 x 2 windows (avgpool2d_layer.pool4_at), not a convolution: the sliding conv2d spec, gHashTag/t27#10612, is not merged, and the lesson and widget say so.", "The XOR widget shows the four inputs mlp.xor exposes, not a decision region over the plane; a dense region needs a spec fn for a point between the corners. The fixtures are the specs' own small ones; nothing is trained on real data.", "check:spec-catalog was already red on main (8 atlas hashes behind their vendored files); the 24 replaced specs/ml copies add 24 more until the periodic catalog sync regenerates universe-atlas.json. The widget words are English, like the other tool widgets; the course pages are bilingual." ], "tags": [ "Engineering", "AI", "Course" ], "blog": { "title": "Neural networks in t27: 27 lessons, and a widget in each one that runs a specs/ml spec", "summary": "Course 10 opens the parts the project's agents think with, from ReLU to a transformer block and PPO, and every number its widgets show is computed by a t27 spec compiled to wasm.", "outline": [ "The agents of the hive think with neural networks, but no course opened their parts; gHashTag/t27 specs/ml already held them as specs with numeric tests.", "27 specs give 27 widgets their logic through t27-logic.mjs and widget-logic.mjs, no formula copied; a 2-8-1 network learns XOR in the page, its loss falling from 0.8896 to 1.8e-13 in 2000 epochs.", "Lesson 10 averages each window until the sliding conv2d spec (t27#10612) merges, the XOR grid shows four inputs and not a region, and every fixture is a spec's own." ], "reproduce": [ "cd apps/website && npm run check:widget-logic && npm run check:course" ] } }Related Issue
Closes #1695 (EPIC gHashTag/t27#9063, course 10)
Specification Link
Spec: gHashTag/t27
specs/ml/**at master 239b4b059 (unchanged on c09e46bc5): 27 lesson specs, one per widget, fromactivation/relu_activation.t27torl/ppo_clip_loss.t27. The course isapps/website/specs/course/neural-networks.t27, and the widget words are inapps/website/specs/widgets/nn-*.t27.Generated Code:
public/widgets/nn-*/logic.js(compiled from the specs),index.html(widget-pages-from-spec),queenWidgets.generated.ts,course.generated.ts,courseRoutes.generated.ts,public/learn/**,public/ru/learn/**Changes Made
Breaking Changes
TOXIC VERDICT
What Works
No widget computes a formula of its own: every value comes from a compiled specs/ml fn, and widget-logic refuses a logic.js built from other bytes than the vendored spec. Each widget opens with a question and starts in an interesting state (a leaky ReLU at -2, softmax of 1, 2, 3, the trained XOR net, a causal attention mask). All 27 hold at 390 px.
What Doesn't Work
Lesson 10 is pooling, not a convolution, until t27#10612 merges. The XOR view is four corners, not a region. Some tiles repeat a spec fixture as K_ constants (maxpool input, batchnorm batch, MSE targets), held by the widget spec's tests rather than read from the logic, because the specs expose no fn for them.
Tech Debt
Rebuilding logic.js needs zig 0.16 and t27c, which the website CI does not have; the check verifies the hash. The universe atlas lags the 24 refreshed specs/ml copies until the catalog sync runs.
Self-Score: 7/10
Generated by Claude Code