Status: done (2026-11-16) Priority: 2 Size: M Arch: talk Phase: implement Design ref: design.md, People, households and family records (Traits, talk and stories: The twelve traits; How a trait is passed on); Customs and culture (A culture’s values); docs/architecture/target-v2.md, section 4.4 (Persons); backlog/VB-186.md Goal: The twelve traits Kim decided on 3 November replace the five uniform stand-ins: values from those who raised a child and from its culture, temperament and aptitudes partly from its parents by birth, a hungry childhood paid for in body and wits. Each culture holds the mean of its people’s values, read from them and never set. No rule reads a new trait yet: this task is the state, the passing on, the labels and the door. Acceptance criteria:
sim/traits (made by VB-254 for its five stand-ins) owns pawn.traits: twelve numbers in 0.02 to 0.98, in the order of TRAITS.names (generosity, piety, ambition, honour; sociability, temper, diligence, openness; body, hands, husbandry, wits), read only through Traits.of(st, pawn, name). The five stand-ins and pawn.diligence become these (one home; an old save keeps the values it has and draws the rest). @state, src/owners.json, invariants in tests/lib/invariants.js (twelve finite numbers within the bounds, for the living and the dead), the save.design.md, How a trait is passed on): mean + b × (the two parents' mean − mean) + chance, the chance normal with spread TRAITS.sd × √(1 − b²/2), drawn from the stream traits. TRAITS in src/sim/rules.js, each with its meaning: sd 0.15, b 0.45 (temperament), 0.5 (aptitudes), 0.6 (values), setAge 15, lean { body: 0.2, wits: 0.1, days: 96 }.lean.body and lean.wits times min(1, the child’s hungry days / lean.days). The hungry days are one number a child, pawn.leanDays, counted where its household’s hunger is already written for its members (hunger of 0.5 or more), and dropped at 15.design.md, Customs and culture, A culture’s values): culture.values, four means, 0.5 but honour 0.6 for Old Nordic; founders and placed pawns draw from it with spread sd. At the culture’s yearly reckoning it becomes the mean of its living adults’ values, in the walk the reckoning already makes; a culture that splits takes its own adults’ mean at once. sim/saves.js keeps it; an old save starts at the archetype’s.Traits.labelsOf(st, pawn) gives the words of design.md’s table for traits under 0.345 or over 0.655 (TRAITS.label); the pawn panel shows them and no number. The page reads through the Sim API. A screenshot under docs/img/.node tools/same.js --base REF differs only by the draws of the stream traits; say which leaves differ. Where VB-254’s stand-ins were uniform and are now normal, report its numbers (hungry household-days by the head’s skill in thirds, populous small, 30 years, seeds 3, 7, 11, 42) before and after.tests/tiny.js, tests/lib/probe.js), with fix on the stream: a child of two high parents lies between them and the mean; the spread of 2,000 children of random pairs is within 0.14 to 0.16 for each group; a child raised in another house takes its values from that house and its temperament from its birth parents; a hungry childhood lowers body and wits and nothing else; a split culture’s mean is its members’.Notes:
design.md, People, Traits, talk and stories. VB-254 was running the same night and makes src/sim/traits.js and Traits.of; this task waits for it and builds on what it left (if VB-254 ended without the module, make it here, as VB-254’s first criterion describes).src/sim/traits.js, src/sim/births.js, src/culture.js, src/sim/society.js, src/sim/saves.js and the pawn panel: not beside VB-475 or VB-476, which draw from the same stream.Noted by VB-186, 15 November 2026.
sim/traits exists) but open on its numbers, so the wait is dropped: this task needed its code, not its close.src/sim/traits.js now holds the twelve traits: pawn.traits, twelve numbers to a thousandth in [0.02, 0.98], in the order of TRAITS.names (src/sim/rules.js: sd, b by group, setAge, lean {body, wits, days, hunger 0.5}, bounds, label, culture.oldNordic). One function passes a trait on (Traits.pass: mean + b × (parents’ mean − mean) + sd × √(1 − b²/2) × z); z is the inverse normal of one uniform of the stream traits (Acklam), so a birth always draws twelve, a 15th birthday four, a placed pawn twelve, whatever the values (and fix 0.5 is no chance). Traits.born (from sim/births, after the child joins its household): from its father and mother by birth, values around its culture’s means; a parent not on record counts as the mean. Traits.setAtAge (from sim/lifecycle’s dailyLife, in the walk that already rolls the age over: one comparison a living pawn): the values again from the holder and the holder’s spouse of the household it lives in (one alone, or the culture’s means if none), and body and wits lowered by lean × min(1, leanDays / 96); pawn.leanDays is then null. Traits.hungryDay (from sim/hunger’s loop that writes each member’s hunger): one more day where the child’s own hunger is 0.5 or more. seedTraits (at seed, and at every load) gives every pawn without the twelve, living or dead, a draw from its culture’s distribution in id order, keeping an old save’s five stand-ins (by their old order) or VB-249’s diligence, clamped; and leanDays 0 to a living child, null otherwise. A culture’s values: culture.values {generosity, piety, ambition, honour}, made by Culture.makeCulture (the archetype’s, given by sim/society’s initCulture, or the parent’s); cultureYear sets them to the mean of its living adults (age 15 and over) in its walk of each village’s members, now over every village of the culture (those whose meeting did not sit too); split takes the new culture’s own adults’ at once; both through the hook addValues (sim/traits, given by sim/society’s hooks), so culture.js stays trait-blind. sim/saves: an old save’s cultures start at Old Nordic’s. Traits.labelsOf(st, id) gives the words of design.md’s table (honour and openness by sex); Sim.traitLabels; the pawn card shows them as one line, no number (src/page/words.js). @state lines (pawn.traits, pawn.leanDays, culture.values), src/owners.json (pawn.leanDays: sim/traits; culture.values: culture), invariants (every pawn’s twelve within the bounds, leanDays null or a whole number; every culture’s four values within the bounds).decision note): a hungry day is the child’s own hunger at 0.5 or more, not its household’s mean; the mistress is the holder’s spouse living in the household; the inverse-normal draw (one draw a trait); an old save’s uniform stand-ins are kept as they are (clamped), only the seven missing drawn; a culture’s values are reckoned over all its villages, met or not.tests/traits.js (fast tier) rewritten for the twelve: the twelve for every pawn and the invariants; pass neutral with spread 0.15 over 4,000 draws, by the equation with fix 0.5, within the bounds; the spread of 2,000 children of random pairs per group (values 0.6 b around 0.6, temperament, aptitudes: all within 0.14 to 0.16); a child of two high parents (0.9, 0.8) between them and the mean by the equation; a child moved to another house sets its values at 15 from that house’s holder and mistress and keeps its birth temperament and aptitudes; 48 hungry days take 0.1 from body and 0.05 from wits and nothing else (against the same child fed); set only once; a culture’s yearly mean and a split’s own adults’ mean, and a child there drawn around it; the labels; an old save (five stand-ins, no leanDays, no culture values) loads with the five kept. tests/lib/heads.js and tests/head.js set a skill-less head at the bound 0.02, not 0; tests/green.js makes its heads plan by the template (templateHeads): with the new draws a head’s fields took the tile the test had chosen for the green before the meeting (tile 138 became a field of household 4), which is the test’s timing, not the green’s rule.node tools/same.js --base d6d274f (founders and heirs, tiny, seeds 7 and 42, 2 years): at seeding the leaves that differ are pawns[*].traits, pawns[*].leanDays (also seen through cenv.people), cenv.cultures[0].values, rng.traits, and the heads’ plans.households.*.head.bias and the targets the bias sets (drawn from the same stream after the traits, and on skill). From year 1 everything differs: VB-254’s rules (a head’s skill from wits and husbandry, its planning day from diligence) read the three re-drawn traits, so households plan differently. No rule reads a new trait.| seed | hungry before -> after | living before -> after | before, by third (low / mid / high) | after, by third |
|---|---|---|---|---|
| 3 | 17 -> 31 | 557 -> 603 | 0.23 / 0.12 / 0.08 (17,396 / 67,124 / 59,840) | 0 / 0.31 / 0.06 (1,564 / 90,012 / 51,947) |
| 7 | 24 -> 10 | 594 -> 629 | 0 / 0.29 / 0.09 (12,861 / 66,187 / 55,169) | 0 / 0.12 / 0 (1,527 / 82,398 / 44,752) |
| 11 | 33 -> 28 | 534 -> 577 | 0.25 / 0.37 / 0.06 (12,168 / 73,322 / 53,797) | 0 / 0.24 / 0.14 (1,389 / 83,228 / 58,621) |
| 42 | 5 -> 9 | 702 -> 697 | 0.07 / 0.05 / 0 (13,741 / 77,304 / 63,989) | 0 / 0.06 / 0.05 (1,750 / 92,658 / 54,961) |
The mean of hungry household-days is 19.75 before and 19.5 after: neutral on average. Living ends higher at three seeds of four. Hunger stays under 0.03% of household-days, so a few households move it; households are not measurably better or worse off. What moved is the spread of heads: the mean of two normal traits has a spread of 0.106 where the uniform stand-ins’ had 0.204, so the lowest third (skill under 0.33, a head that only reacts) falls from about 9% of household-days to about 1%, and almost every head projects to the season’s end. VB-254’s horizon thresholds (0.33, 0.67) were set against the uniform stand-ins; left for the tuning run (tuning note). Culture values after 30 years (one culture each): honour 0.589, 0.637, 0.603, 0.581 from 0.6; the other three within 0.04 of 0.5. Each trait’s mean among the living at year 30 is within 0.035 of its start.
dailyLife’s existing walk and one a fed member in the meal’s existing loop; the culture’s mean adds four sums an adult in the reckoning’s own yearly walk, which now also covers villages whose meeting did not sit (one membersOf a village a year). No new pass, no counter. Save: 96 bytes a pawn for traits and leanDays against 40 before (populous small seed 7 at the start: 33,599 against 14,151 bytes of 2,154,440 against 2,134,797, +0.9%); the 30-year saves were 11.30 to 13.99 MB before and 11.56 to 13.35 MB after, the populations differing.node tests/run.js verify --verbose, after merging the run’s branch): 9 out, the same nine as on the run’s branch tip (counters/heirRank, counters/roundRank, scaling.frontTile, scaling.heirRank, scaling.helpBid 1.157 there and 1.154 here, scaling.roundPairs, scaling.roundRank, scaling.roundWalk, scaling.takeInWeighed); counters/pastureTiles is in here (4.619 against 4.812; 4.863 on d6d274f), moved by the heads’ new draws, not by a rule of this task.npm test and npm run verify pass; node tests/smoke.js and node tests/browser.js pass. Screenshot: docs/img/vb519-trait-words.jpg (Tiny populous seed 7, a holder’s card: “Sociable, mild, set in his ways, deft”).of parents (2 at birth, where a parent not on record counts as the mean; at 15, the raisers counted: one alone is the whole mean, none is b 0). The reviewer’s algebra holds: a lone raiser counted twice gave a fixed point of 1.28 sd² (spread 0.17) and none narrowed the spread to 0.82 sd²; two parents were already stationary. tests/traits.js checks the spread of 4,000 children within 0.0075 of 0.15 for a birth with one parent known, two raisers, one, none, and over eight generations raised by one. No rule reads a value trait (only diligence, wits and husbandry are read), and the draws’ count is unchanged, so the run is otherwise as before: tools/same.js --base c9ec54e is the same on founders and heirs (seeds 7, 42, tiny, 15 years); the numbers above stand (the populous check is below).tools/same.js --base c9ec54e --scenario populous --map small --seeds 3,7 --years 15 differs only in pawns (and cenv, whose people are the pawns and whose values are their mean): from year 4, up to 99 leaves by year 15, the values of children set at 15 with one raiser or none. Every other entry (households, plans, agents, stores, the world) is the same each year, so the hungry household-days, the living at year 30 and the spread of skill reported above stand without retaking. After merging the run’s branch (VB-581, VB-331): npm run verify 114/114, 8 targets out.tests/heirs.js called the stand-ins’ Traits.draw, now gone: the B3 check sets every living pawn’s twelve traits to 0.5 directly before startHeads (skill 0.5 and bias 1 as before; crops 3/4/4, 3/3/3, 3/3/3, 3/3/3 at seeds 3, 7, 11, 42). tests/notable.js (“its history tells the move once”, VB-099): at heirs 7 Gunnar now becomes the enemy of a neighbour the hour he moves into his cottage (a pair touched as the opinion, under the new compatibility, crosses the line); the check now leaves out the opinion bands (enemy, closeFriend) at that hour and still asserts the move is told once, as cottage.