PulseCore

Chapter 1 · Section 14

The Universe Packet

The BPT law

BPT Part 8.1 (The Packet, the Ten-Second Level and the Null Well) states the Universe Packet: U_L = (L, Γ, Π, R) ⇒ ℜ(n) ∀ n. "A universe is its level, its genesis, its Pulsecore and its rule; everything after its first pulse is replay, so the packet is small and the universe is large." L is the level, from the Rupture Rule. Γ is the genesis: "f₀, f, ⟪C⟫, a_f, the progenitor spins, mass ratio, misalignment and axis, and the null-mass ratio". Π is the Pulsecore, "the field inside the pulse before its Data Nova, one bit per pixel on the 4 × 2^L grid of the Local Pixel Count (one Zinf at level 0)". R is the rule, "stated exactly enough that two replays agree pulse for pulse". "Because the rule is deterministic, a packet is verifiable by anyone who holds it: replay it and compare the well census W(n) against the one recorded with it. That makes depth verifiable, a lineage a chain of packets each naming its parent, and the data of a universe compressible to its seed." The packet is "the Silent Well's record (Chapter 3, Part 3.10) made explicit".

The established physics

None: a file format. It uses SHA-256 (the standard hash, FIPS 180-4) and a PNG-style typed chunk layout. The pinpoint is coded as a region quadtree (standard in image coding).

The game's math

packet.js lays a file out as the magic "UD01", then chunks of 4-byte type + uint32 little-endian length + payload (chunk() packet.js:102):

  • SEED (packet.js:41): canonical JSON with fixed key order, holding level, rows, cols, rule and genesis. The genesis keys are f0, f, C, a_f, a1, a2, q, thetaDeg, axisDeg, massRatio and aniso (GENESIS_KEYS :32). Each number goes through canonicalNumber() :35, six significant figures, and anything non-finite becomes 0.
  • PINP: the pinpoint as a 2-bit quadtree (encodePinpoint() :63). 00 is all null, 11 is all lit, and 01 is mixed with four children following (NW, NE, SW, SE). 10 is invalid and the decoder rejects it. A field that is not a power of two goes at the top left of the smallest square that is (squareSide() :60). On a field 4·2^L a side the tree has L + 2 levels.
  • HEAD: free-form JSON. LIFE and LINE are optional.
  • HASH: SHA-256 over the raw SEED and PINP chunks, header included (buildPacket() :133). It is the packet's id, so the same seed gives the same id from any writer. parsePacket() :139 re-hashes and reports verified.

The four parts of BPT's packet land as follows: L in SEED's level, Γ in SEED's genesis keys, Π in PINP, and R in SEED's rule string. LIFE carries the record BPT says a replay is checked against: the novas, the wells, the mergers and the well_census.

exportPacket() app.js:3180 writes the level as round(levelOf(uni)) (the physics). The genesis card in HEAD (app.js:3186) holds depth, generation, steps (the step count), H, f₀, f, C, a_f, the spins, q, θ, axis, tilt, null mass, the old coupling fields, s, ℨ, rupture_pulses and law_progeny. The pinpoint written is the field as painted at genesis (genesisFrame0, app.js:3182).

importPacket() app.js:3235 sets the slider to seed.level. It treats the packet as a child when |depth − level| > 0.05, taking the child's depth, H, generation and steps from the genesis. Older packets that stored the step count as their level fall back on seed.level.

In the game

The packet is two buttons at the foot of the Lineage section (index.php:260): "Export .ud" ("Download this universe as a .ud packet: its genesis, Pulsecore, record and lineage") and "Import .ud" ("Open a .ud packet: replay it from its seed, or play one of its children"), with a link "what a packet is". Export downloads a file named universe-<id>-L<steps>-<first 8 hex of the hash>.ud (app.js:3223). Import loads the genesis onto the panel (the channel select shows Custom), paints the pinpoint onto the field, and shows the toast "Packet opened" (app.js:3270). The Lineage section then reports what was opened (app.js:3296): "Opened from a packet of universe #… · id <12 hex>… · verified" (or "hash did not verify"), with "· the Pulsecore was placed at the top left: its field was not this level's size" when the sizes differ, and "Start replays it from its seed, or play one of the children it closed with." A packet that closed with children lists them with Play buttons. Start replays the universe from the seed, as BPT's "everything after its first pulse is replay" says.

The scale model

The pinpoint stored is the drawn field (rows × cols), not the true level's 4·2^L field. A packet of a level 28 desktop universe holds a 256² pinpoint. The level field and the genesis are enough to rebuild the true physics, as BPT Part 8.1 intends, but the replay is the model's replay.

Where the game and the theory differ

  • BPT's Π is the Pulsecore on the 4 × 2^L grid of the true level. Past the model level the game stores the drawn field instead.
  • rupture_pulses in HEAD is uni.rupturePulses, which on a scale model is the model's 2^Lm, not the true 2^L (uni.trueRupture). A reader of the packet must recompute 2^L from the level.
  • Depth, generation, steps and H ride only in HEAD, which the hash does not cover. Two universes at the same whole level that differ only in lineage still get different ids, because their f (which carries H) is in SEED. That holds only to six figures.
  • The download name uses the step count, L${uni.gen}, not the level.
  • An imported packet's children are listed as "Child n · level x" with x the step count ch.L (app.js:3300), not the level.

Fixed numbers

Number Where What it is Kind
"UD01" (4 bytes) packet.js:30 magic METHOD (file format)
4 + 4 bytes packet.js:103–105 chunk type + uint32 LE length METHOD (file format)
2³²−1 bytes packet.js:105 largest chunk a uint32 length allows RECORD
6 packet.js:37 significant figures in SEED numbers RECORD
2 bits; 00, 01, 11 packet.js:69–75 quadtree node codes METHOD (region quadtree)
8 packet.js:49, :51, :55 bits per byte, most significant first METHOD
SHA-256 packet.js:116 the id hash METHOD (FIPS 180-4)
'binary-pulse-theory v5' packet.js:31; app.js:3187 rule string RECORD
0.05 app.js:3245 depth differs from level ⇒ child packet METHOD
8 app.js:3223 hex digits of the hash in the file name RECORD
1000 ms app.js:3225 delay before the download URL is released METHOD
4, 5, 7 (precision) app.js:1046, :3203 figures kept in LIFE and HEAD records RECORD