DisSysLab · Lab 2

The cake room: a shared whiteboard

In Lab 1 every agent received only the messages its connections carried to it. This lab shows a different way for agents to work together: a shared whiteboard. Every agent reads everything every other agent wrote, and builds on it.

That makes a team able to solve problems that no member could solve alone. It also makes the team harder to predict: what each agent writes depends on what the others wrote first.

About 2 hoursNeeds: Lab 1 done, and your Anthropic keyCost: a few hundred model calls; start small

Step 1 · The case

Read this first: the puzzle, and who knows what

A cake vanished from the kitchen between 3 and 4 this afternoon. It was certainly one of four people: Ann, Ben, Cal or Dee, and nobody else.

Three detectives investigate. Each is an LLM agent, and each holds one piece of evidence that no other detective sees:

A fourth agent, Judy the judge, sees no evidence at all. She reads what the detectives wrote and gives the verdict.

Look at what each detective can work out alone. Each piece of evidence clears exactly one person, and leaves three:

AnnBenCalDee
Pip (door log) cleared
Quinn (receipts) cleared
Rae (fridge notes) cleared
All three together clearedclearedCalcleared

No piece of evidence mentions Cal. Nobody can name Cal from their own evidence; the answer appears only when all three pieces are put together. That is what the whiteboard is for.

How the whiteboard works

EVIDENCE (PRIVATE) DETECTIVES THE WHITEBOARD (SHARED) JUDGE Door key-card log Dee's card: unused Shop receipts Ben: shoe shop, 2–5 Fridge notes Camera: Ann in garden, 2–5 Pip Quinn Rae notes, as they arrive: 1 · Rae: Ann cleared 2 · Pip: Dee cleared 3 · Quinn: Ben cleared 4 · Pip: so it was Cal … The order changes from run to run. Judy verdict writes a note the board, sent whenever it changes
The evidence on the left is private: each detective sees only its own. The board in the middle is shared: whenever it changes, it is sent to the detectives. Judy sees only the board, and only at the end. The notes shown are one possible run.

The whiteboard does nothing on its own. It changes only when a detective writes on it, and every change goes out to the detectives. There are no rounds, and nobody waits for anybody.

  1. The start. Each detective is sent its own evidence and the board, still empty. It writes a note: what its evidence shows, and whom it now suspects: Ann, Ben, Cal, Dee, or unknown.
  2. Whenever the board changes. A note goes on the board the moment it arrives, and the new board is sent to every detective who has not seen it. A detective that is still thinking gets the newest board as soon as it finishes.
  3. Nothing new. A detective that reads the board and has nothing to add says so, and writes nothing. That is how the talking stops.
  4. The verdict. When no detective is thinking and every one has read every note the others wrote, nothing more will ever be written. Only then does Judy get the board. She names the person who took the cake, or says unknown.

Notice what nobody does. No detective sends anything to another detective, and nobody decides who should read what. Everything written goes to everyone. In Lab 1 you drew every connection yourself and knew exactly what each agent would receive. Here you know only that each agent will receive everything, and you cannot know in advance what that will be: the three detectives think at the same time, and whichever finishes first writes first. The detective who writes second has read the first note; the one who wrote first has not. Run the same office twice, on the same evidence, and the board can fill up in a different order, with different notes.

Before you run anything, write down your predictions.
  1. In its first note, whom will each detective name? Does it matter whether another note is already on the board when it writes?
  2. Will all three detectives end up naming Cal? How many notes will the board hold when the talking stops?
  3. If you ran the office ten times, would the board fill up in the same order? Would Judy give the same verdict every time?
You will check these in Steps 2 and 3. Keep them: a wrong prediction you can explain is worth more in your write-up than a right one you cannot.

Step 2 · Run it once

Twenty seconds to run; twenty minutes to read

Copy the office into a folder of your own, check it, and run it:

dsl init cake_room lab2
cd lab2
dsl check .
dsl run .

A run makes about fifteen model calls and takes about twenty seconds. Judy's verdict, with the whole board, goes to report.jsonl. To read it note by note:

python show.py

What you will see

Here is one run on claude-haiku-5-5, with each note cut to its gist. Yours will not be the same: that is Step 3.

#BySuspectsGistshow.py marks
1QuinnunknownThe shoe-shop camera clears Ben.
2PipunknownThe door log clears Dee.stale read: note 1
3RaeunknownThe garden camera clears Ann.stale read: notes 1–2
4QuinnunknownRead Pip: Dee is out too. Ann or Cal.stale read: note 3
5PipunknownRead Quinn: Ben is out, “if it holds”. Ann or Cal.stale read: notes 3–4
6RaecalRead both: each of the other three is cleared.changes its mind; stale read: notes 4–5
7QuinncalRead Rae: “my earlier note … is superseded.”changes its mind; stale read: notes 5–6
8Pipcal“I had not yet read Rae’s note.” Cal, by elimination.changes its mind; stale read: notes 6–7

Verdict: Cal. Every detective started at unknown, and every one reached Cal only after reading the others. That is the collaboration this lab is about, and you can point to the exact note where it happened for each detective.

The two marks

Hand in, for your run.
  1. Paste the output of python show.py.
  2. For each detective, the note where it first names Cal (or say that it never does). Which notes had it read by then, and which one made the difference?
  3. One stale read: what did its writer miss, and did that matter? Did the detective put it right in a later note?
  4. If Judy did not say Cal: find the note that brought in the doubt, and follow it across the board to Judy’s reason. A whiteboard carries one detective’s doubt to everyone, the judge included.
  5. Your predictions from Step 1, marked right or wrong, with a sentence on each wrong one.