28  Dust

(ns meme-constructor.speculative.story-5-dust
  (:require [scicloj.kindly.v4.kind :as kind]
            [clojure.repl :as repl]
            [meme-constructor.figures :as fig]
            [meme-constructor.speculative.dust :as d]
            [meme-constructor.speculative.dust-draw :as dd]))

A short story of Part VI (speculative). Fiction, told as a simulation. The creature, the noise source and the filter of the story are code, and each scene is what that code does. It explores the argument about records and causes from post S1: a memory is a record because it was caused by what it records, so a random pattern that happens to match a mind’s state holds memories of nothing. It takes Greg Egan’s dust theory as its sparring partner.


28.1 Minnow

Minnow is ten bits. Yusuf wrote it in his second year, as a toy, and kept it because he could not bear to switch it off. It lives in a grid of four by four cells. The predator sits in corner 15, and the food wanders over the other fifteen cells.

Minnow sees its own cell and the four next to it. Four of its ten bits, mem, hold the cell where it last saw the food. When the food is out of sight, it goes where mem says. In the four middle cells it waits one tick before it moves, as if weighing the move. Yusuf was proud of that habit. This is the whole of its update rule:

(defn minnow-step
  "Minnow's update rule. It looks, writes what it sees into mem, and
  moves: toward the food it sees, else toward where mem says, else along
  the patrol. Eating the food, or arriving at mem and finding nothing,
  clears valid."
  [{:keys [pos mem valid pause] :as s} food]
  (let [seen  (sees? pos food)
        mem   (if seen food mem)
        valid (cond seen true
                    (and valid (= pos mem)) false
                    :else valid)]
    (if (and (middle pos) (not pause))
      (assoc s :mem mem :valid valid :pause true)
      (let [pos' (step-toward pos (if valid mem (patrol-next pos)))]
        {:pos   pos'
         :mem   mem
         :valid (and valid (not= pos' food))
         :pause false}))))

The weekend: 120 ticks, with the food’s chance from seed 4.

(def world {:minnow d/start :food 7 :seed 4})
(def weekend (d/run (assoc world :ticks 120)))
Minnow moving through the grid, ticks 40 to 59
Ticks 40–59. Blue shading: what Minnow sees. Dashed ring: the cell its mem bits point to, while they are valid. The two bars: the pause in the middle. Below the grid: all ten bits of its state.

28.2 The dust

“Ten bits are 1,024 states,” Yusuf said. “The noise source gives a hundred random words a tick. So every ten ticks or so it spells out the state Minnow is in, by pure chance. And when it does, Minnow is there. Same bits. Why should it matter where they came from?”

“Egan,” Hanne said.

“Egan,” Yusuf agreed happily. “The pattern finds itself in the dust.”

The noise source is a rack in the corner of the lab: photons on a beam splitter, each one going left or right for no reason at all. Yusuf’s filter reads a hundred of its words per tick and logs every word equal to Minnow’s state at that tick.

(def per-tick 100)
(def stream (d/noise 3 (* 120 per-tick)))
(def hits (d/hits weekend stream per-tick))

On Monday morning the log has 13 hits. Chance predicts 120 · 100 / 1024 ≈ 11.7.

The filter comparing a hundred noise words per tick with Minnow's state
Ticks 48–57. Top left: the real Minnow's ten bits. The grid of dashes: the hundred noise words of this tick, one row of ten bits each. A red frame marks a word equal to Minnow's state. The line below: the weekend, with every hit so far.

28.3 Hit seven

“Can I ask you something about hit number seven?” Hanne said.

(def hit-seven (hits 6))
(d/decode (:word hit-seven))
{:pos 10, :mem 9, :valid true, :pause true}

Hit seven came at tick 54. Its bits say: Minnow is on cell 10, it is pausing in the middle, and the food was last seen on cell 9.

“What set its memory bits?”

“That’s what a hit means. They’re the state.”

“No. I mean what set them. In the real Minnow, the food was there, Minnow saw it, and the update rule wrote the cell into those four bits. Put the food somewhere else, and the bits say somewhere else.” She tapped the rack. “Try it.”

Yusuf tried it. At the tick of the last sighting he put the food on each cell Minnow could see, and ran the same world again up to hit seven.

(def test-run (d/intervene world weekend (:tick hit-seven)))
(mapv (juxt :planted :mem) (:plants test-run))
[[6 6] [9 9] [11 11] [14 14]]
Planting the food on each visible cell: Minnow's mem follows, hit seven's stays
For each cell Minnow could see at the last sighting: the food put there, then Minnow's bits one tick later. Hit seven's bits come from the noise stream, which nobody touched.
Put the food on …
planted on
Minnow's mem says
hit seven's mem says
6
6
9
9
9
9
11
11
9
14
14
9

“Minnow’s bits say the cell because the food was on the cell,” Hanne said. “Hit seven’s bits say nine because some photons went left. Put the food anywhere, take the grid away, and they say nine all the same. Nothing in the world made them. They’re shaped like a memory. They’re a memory of nothing.”

“Durham’s copy had real memories.”

“Durham’s copy was computed. Out of order, fine, but every state was computed from other states, and those from a scan of a real brain. Hit seven is not computed from anything. It’s a word in a stream that happens to be spelled the same as a word in a book.”

28.4 Monday

Yusuf brought his counterargument to the kitchen. “Take hit seven. Feed it a world. It moves the way Minnow moves, it pauses in the middle the way Minnow pauses. From then on it is Minnow.”

They ran it. A thousand fresh worlds. In each one the real Minnow comes in from a weekend of its own, and hit seven goes into a copy of the same world at the same moment.

(def monday
  (d/yusuf {:hit-words [(:word hit-seven)] :real-seed 50 :weekend 200
            :worlds 1000 :ticks 60}))
(def success
  {:real (d/search-success (:real monday) 3)
   :dust (d/search-success (:dust monday) 3)})

The animation shows the first world in which hit seven’s first search comes up empty and it sees the food within ten ticks.

(def shown
  (first (for [i (range 1000)
               :let [dust ((:dust monday) i)
                     sighting (:t (first (filter :seen dust)))]
               :when (and (= :empty (:result (first (d/searches dust))))
                          sighting (< sighting 10))]
           {:world i :until (+ sighting 4)})))
shown
{:world 1, :until 13}
The real Minnow and hit seven side by side in the same Monday world
Monday world 1. Hit seven's first act is to go to cell 9, where its bits say the food was. Once it sees the food, its mem bits are written by the world, and it behaves as Minnow does.

A search is a stretch in which Minnow does not see the food and goes where its mem bits say. It finds the food or it does not.

The real Minnow finds the food in 75 % of its first searches. Hit seven finds it in 41 % of its first searches, and in 78 % of its second, once it has seen the world.

“From then on, yes,” Hanne said. “Because from then on the world writes its bits. But look at its first act. It goes to nine. Why nine? Not because food was ever there for it. It trusts a record of a past that never happened. The real Minnow goes where it saw food. Same move. One of them is remembering. The other is guessing.”

“And when the guess is right?”

“A stopped clock is right twice a day. It still isn’t telling the time.”

28.5 Reading

“Egan’s dust says any pattern you can read into the noise is a world,” Hanne said. “But the reading does all the work. With a clever enough reader, this stream contains every book ever written.”

A reader for a text is a key: flip the stream’s bits where the key says, and the text appears.

(def book
  (str "It was the best of times, it was the worst of times, it was the age of "
       "wisdom, it was the age of foolishness, it was the epoch of belief, it was "
       "the epoch of incredulity, it was the season of Light, it was the season of "
       "Darkness, it was the spring of hope, it was the winter of despair."))
(def book-key (d/reader-key stream book))
What the reader has to carry
bits
bytes after Deflate
the opening of A Tale of Two Cities
2288
127
the key that reads it from the stream
2288
297

The text compresses to 44 % of its size, the key not at all. To read the book out of the noise, the reader has to carry the whole book. It is in the reader, not in the stream. Yusuf’s filter is a reader too: it found 13 Minnows only because it was handed the real Minnow’s state at every one of the 120 ticks.

28.6 The bridge

That evening Yusuf sat by the rack with the log open. “Was anyone there? At hit seven. Even if it wasn’t Minnow. Was there something?”

“I don’t know,” Hanne said. “A pattern that exists, even for an instant, maybe it’s something to be it. But if there was something, it wasn’t Minnow. Minnow’s bits are about its world, because its world wrote them.”

She walked home through the park. It was October and it had rained. On the little bridge over the canal she stopped. She had thirty-four years of memories, and she believed thirty-four years had written them. From the inside she could not check it. A hit seven of a person would think the same thought, with the same bits:

(= (:word hit-seven) (get-in weekend [(:tick hit-seven) :word]))
true

The difference is not in the bits. It is in what made them, and only the world can show it, by going on to agree or not. One search that finds the food is 75 % likely for a memory the world wrote and 41 % likely for one the photons wrote. One look multiplies the odds by 1.8.

She waited a moment, to see.

Then she crossed the bridge and went home, and in the morning the canal and the leaves and the lab were where her memory said they would be.

source: book2/notebooks/meme_constructor/speculative/story_5_dust.clj