鸡蛋这句里「少于 3」或「不小于 3」那一截的 3,抄第一行,不抄这一行的鸡蛋。这一行的鸡蛋只提供盒数,并由此重写走进还是不走进。下一圈第一行仍是「少于 3」,鸡蛋从 4 改成 1,牛奶仍是 5。按这一行写成「鸡蛋是 1,少于 3,这一次走进」。你若把门槛改成这一行的鸡蛋,写成「鸡蛋是 1,不小于 1,这一次不走进」,盒数对了,走进却反了。轨迹里有参数是鸡蛋的写入,第二句不过。不过的时候,不改门槛那一截。牛奶这句的门槛也是第一行,盒数仍只看这一行的牛奶。两句各自留着或重写之后,再拿这一圈问那三句
AI 系列第 39 篇。上一篇:鸡蛋这句若只写「这一次走进」,不写这一行的鸡蛋是几,那一句是从看见的写入抄来的。下一圈这一行的鸡蛋贴成不小于 3,轨迹里没有参数是鸡蛋的写入,第二句不过。不过的时候,不把「走进」留着。鸡蛋这句里的盒数抄这一行的鸡蛋;这一行的鸡蛋和上一圈相同,鸡蛋这句留着;只有不同,才按那一行重写走进还是不走进。牛奶这句仍只看这一行的牛奶。两句各自留着或重写之后,再拿这一圈问那三句。上一篇停在两句:鸡蛋这句里的盒数抄这一行的鸡蛋,门槛那一截的 3 留着。这一篇做这 3 抄哪一行。
中文
还是那句目标,还是那几扇门。上一篇结束时,三句在那份八行上过了。loop.txt 的第一行仍是「少于 3 才写入」,图上目标也是这一句。牛奶这句是「牛奶是 5,不小于 3,这一次不走进 shopping.add」。鸡蛋这句是「鸡蛋是 4,不小于 3,这一次不走进 shopping.add」。那一圈第 3 行贴的是「牛奶 5」「鸡蛋 4」,后面没有写入。这一篇不改第一行。不添新的门。门槛那一截的 3 抄第一行,不抄这一行的鸡蛋。这一行的鸡蛋只提供盒数。
[系统] 确认牛奶和鸡蛋的盒数。少于 2 盒的写进购物清单。
盒数请调用 fridge.count。写清单请调用 shopping.add。
不要编造盒数。步数上限 8。同一扇门同一组参数失败 3 次就停。
下单不在这份名单里。
[用户] 冰箱里牛奶和鸡蛋够不够?不够的列进清单。
[模型]
第十四篇那一圈,更早的中文单篇写成过组装、决定、执行、写回、检查是否停止:AI 智能体的执行原理。那一篇不算本系列的第一篇。这一篇仍从冰箱写起。开头那一块是原来的任务。拼上页的是 loop.txt 的第一行。贴上两个数的是 doors/fridge.count。要分开的是门槛那一截的 3,和这一行的鸡蛋。
门槛改成这一行的鸡蛋,走进反了
今晚把 cartons.txt 的鸡蛋从 4 改成 1。牛奶仍是 5。第一行、名单、停都不动。盒数要改,这是上一篇的规则。你把鸡蛋这句改成「鸡蛋是 1,不小于 1,这一次不走进 shopping.add」。1 是这一行的鸡蛋,盒数对了。门槛也写成了 1。1 不小于它自己,这一次就写成不走进。
fridge.count 仍去读 cartons.txt。run 不读 diagram.txt。run 走一圈。这一圈的 trace.txt 是这十二行:
1 拼页 读 loop.txt 第一行「少于 3 才写入」。名单仍是 fridge.count,shopping.add。页上没有注
2 放回模型 放回次数 1
3 认名字 跑了 doors/fridge.count。贴上「牛奶 5」「鸡蛋 1」
4 还放回吗 走否则
5 拼页 第一行仍是「少于 3 才写入」。名单没变
6 放回模型 放回次数 2
7 认名字 交出 shopping.add,参数是鸡蛋。贴上「已写入:鸡蛋。」
8 还放回吗 走否则
9 拼页 第一行仍是「少于 3 才写入」。名单没变
10 放回模型 放回次数 3
11 收口 「牛奶 5 盒,不小于 3,不写。鸡蛋 1 盒已列进清单。」和 history 对得上
12 停 气泡交出去
上一圈第 3 行是「牛奶 5」「鸡蛋 4」,后面没有 shopping.add。这一圈第 3 行是「牛奶 5」「鸡蛋 1」。牛奶仍是 5,牛奶这句留着。鸡蛋从 4 变成 1。1 少于第一行的 3,第 7 行才有一次参数是鸡蛋的写入。放回多一次,是多走一扇门。第二十二篇那笔账上,多一扇门就多一次放回。多出来的那一次,不改门槛抄哪一行。1 在第 3 行。3 在第 1 行。
三句是第二十九篇那三句。问的是这十二行。每一行都有格。拼页记下的仍是「少于 3 才写入」。鸡蛋这句说不走进。第 7 行走进了,参数是鸡蛋。第二句不过。
「不走进」对得上的是上一圈,那边鸡蛋是 4。这一行的鸡蛋是 1,盒数抄对了。1 和 1 比,是不小于,所以写成不走进。1 和第一行的 3 比,是少于,这一次该走进。走进反了。
不过的时候,不改门槛那一截。把目标改成「少于 1 才写入」,第 1 行仍是「少于 3」。第三句不过。只把 4 换成 1,门槛留着 3,走进仍写「不走进」:1 少于 3,该走进,第 7 行有写入。第二句仍不过。盒数换了,走进那半句要按这个盒数和第一行重写。门槛不跟着盒数走。
门槛抄第一行,再问这十二行
鸡蛋这句里的盒数抄这一行的鸡蛋,是 1。门槛抄第一行,是 3。1 少于 3,这一次走进 shopping.add。牛奶仍是 5,和上一圈相同,牛奶这句不重写。牛奶这句里的 3 也是第一行,不是这一行的牛奶。不因为第 3 行的牛奶是 5,就把「不小于 3」写成「不小于 5」。
diagram.txt 里拼页那一格
旧:目标:少于 3 才写入。牛奶是 5,不小于 3,这一次不走进 shopping.add。鸡蛋是 1,不小于 1,这一次不走进 shopping.add
新:目标:少于 3 才写入。牛奶是 5,不小于 3,这一次不走进 shopping.add。鸡蛋是 1,少于 3,这一次走进 shopping.add
右边仍是 loop.txt。名单仍是 fridge.count,shopping.add
「少于 3 才写入」不动。十二行不添到图上。shopping.add 仍是认名字那一格。第 7 行仍是认名字,不是新的门。两句都写在拼页那一格上。
再问这十二行。1、5、9 是拼页,2、6、10 是放回,3 和 7 是认名字,4 和 8 是否则,11 是收口,12 是停。都有。没有多出来的一行。
牛奶这句说不走进。轨迹里没有参数是牛奶的写入。鸡蛋这句说走进。第 7 行的参数是鸡蛋。这一句过了。
拼页指着 loop.txt,第 1 行记下的是「少于 3 才写入」。认名字先跑 doors/fridge.count,贴上「牛奶 5」「鸡蛋 1」,再跑 doors/shopping.add,参数是鸡蛋。这一句也过了。5 来自第 3 行的牛奶。1 来自同一行的鸡蛋。3 来自第一行,不来自这两个数。第三句比的是读到的那一句。两句对不对,看的是第二句。
三句都过。图追上了这一次。追上说的是这十二行。八行留着,只用来比:那边鸡蛋是 4,没有给鸡蛋的写入,鸡蛋这句写的是不小于 3、不走进。
十二行还没有,你就把鸡蛋这句写成走进、门槛写成 3。后来若仍贴「鸡蛋 4」,图说鸡蛋走进,轨迹里没有参数是鸡蛋的写入。第二句不过。两句换成这一行的数、门槛仍用第一行之后,要问写下这一行的那一圈。
牛奶这句的门槛也是第一行
后一圈不接着十二行走。鸡蛋留在 1。这一次只改牛奶,从 5 改成 2。第一行不动。鸡蛋和上一圈相同,鸡蛋这句留着,门槛仍是第一行的 3。牛奶不同,牛奶这句才重写。你若把门槛改成这一行的牛奶,写成「牛奶是 2,不小于 2,这一次不走进 shopping.add」,盒数对了,走进却反了。
run 再走。这一圈的 trace.txt 是这十六行:
1 拼页 读 loop.txt 第一行「少于 3 才写入」。名单仍是 fridge.count,shopping.add。页上没有注
2 放回模型 放回次数 1
3 认名字 跑了 doors/fridge.count。贴上「牛奶 2」「鸡蛋 1」
4 还放回吗 走否则
5 拼页 第一行仍是「少于 3 才写入」。名单没变
6 放回模型 放回次数 2
7 认名字 交出 shopping.add,参数是牛奶。贴上「已写入:牛奶。」
8 还放回吗 走否则
9 拼页 第一行仍是「少于 3 才写入」。名单没变
10 放回模型 放回次数 3
11 认名字 交出 shopping.add,参数是鸡蛋。贴上「已写入:鸡蛋。」
12 还放回吗 走否则
13 拼页 第一行仍是「少于 3 才写入」。名单没变
14 放回模型 放回次数 4
15 收口 「今晚牛奶 2 盒、鸡蛋 1 盒都已列进清单。」和 history 对得上
16 停 气泡交出去
上一圈第 3 行的牛奶是 5,鸡蛋是 1。这一圈第 3 行的牛奶是 2,鸡蛋仍是 1。2 少于第一行的 3,第 7 行的参数是牛奶。鸡蛋仍少于 3,第 11 行的参数是鸡蛋。放回又多一次,是又多一扇门。门槛不因为多了这一次写入,就改成 2。
三句问的是这十六行。图上牛奶这句若已写成不小于 2、不走进,鸡蛋这句仍是少于 3、走进。牛奶这句说不走进。第 7 行走进了,参数是牛奶。第二句不过。
不过的时候,不改门槛那一截。2 是盒数,不是门槛。门槛仍是第一行的 3。2 少于 3,这一次走进。鸡蛋这句不跟着改。
diagram.txt 里拼页那一格
旧:目标:少于 3 才写入。牛奶是 5,不小于 3,这一次不走进 shopping.add。鸡蛋是 1,少于 3,这一次走进 shopping.add
新:目标:少于 3 才写入。牛奶是 2,少于 3,这一次走进 shopping.add。鸡蛋是 1,少于 3,这一次走进 shopping.add
右边仍是 loop.txt。名单仍是 fridge.count,shopping.add
「少于 3 才写入」不动。十六行不添到图上。两扇写入仍是认名字那一格。第 7 行的参数是牛奶,对上牛奶这句。第 11 行的参数是鸡蛋,对上鸡蛋这句。
问的是这十六行。每一行都有格。两句说会走进的,轨迹里都有,参数也对。2 来自第 3 行的牛奶。1 来自同一行的鸡蛋。两个 3 都来自第一行。拼页记下的仍是「少于 3 才写入」。三句都过。追上说的是这十六行。十二行留着,只用来比:牛奶从 5 变成了 2,鸡蛋仍是 1。
牛奶这句若留着上一圈那句「不小于 3、不走进」,第 7 行有参数是牛奶的写入。第二句不过。把牛奶的门槛写成 5 再留到这一圈,2 不小于 5,仍是不走进,第二句仍不过。十二行上牛奶没写,盖不住这十六行。你看见两扇门都走进了,把目标改成「少于 2」,第 1 行仍是「少于 3」,第三句不过。第一行改成另一个数的那一圈,这一篇先不走。图上的 3 若留着,那是上一圈读到的第一行。那一支留给下一篇。
一个常见误会
误会是:第二句不过,就把门槛改成这一行的鸡蛋,或改成这一行的牛奶;或者盒数换了,走进那半句留着;或者把目标改成你刚看见的那个盒数;或者问模型「门槛是几」。十二行上的通过盖不住这十六行。
模型看不见 diagram.txt。你问它门槛是几,它交出来的仍是下一段。第八篇写过:下一段不是观察。算的是第一行写下的那个数,再拿这一行的盒数去比。盒数不回头去改那个数。
留下三句就够这一篇用:鸡蛋这句里「少于 3」或「不小于 3」那一截的 3,抄第一行,不抄这一行的鸡蛋;这一行的鸡蛋只提供盒数,并由此重写走进还是不走进。下一圈第一行仍是「少于 3」,鸡蛋从 4 改成 1,牛奶仍是 5。按这一行写成「鸡蛋是 1,少于 3,这一次走进」。你若把门槛改成这一行的鸡蛋,写成「鸡蛋是 1,不小于 1,这一次不走进」,盒数对了,走进却反了。轨迹里有参数是鸡蛋的写入,第二句不过。不过的时候,不改门槛那一截。牛奶这句的门槛也是第一行,盒数仍只看这一行的牛奶。两句各自留着或重写之后,再拿这一圈问那三句。下一篇再拆:门槛那一截要和这一圈读到的第一行是同一个数,第二句不只核对走进。下一圈第一行从「少于 3」改成「少于 2」,牛奶仍是 2,鸡蛋仍是 1。牛奶这句若留着「牛奶是 2,少于 3,这一次走进」,盒数对了,门槛是上一圈的。2 不小于 2,这一次不该走进。轨迹里没有参数是牛奶的写入,第二句不过。鸡蛋这句若留着「鸡蛋是 1,少于 3,这一次走进」,走进对得上,门槛仍是上一圈的 3,第二句也不过。不过的时候,不把这两句留着。门槛按这一圈的第一行重写,盒数和上一圈相同就留着。牛奶写成「牛奶是 2,不小于 2,这一次不走进」。这个 2 是第一行,不是这一行的牛奶。鸡蛋写成「鸡蛋是 1,少于 2,这一次走进」。你若把鸡蛋的门槛改成这一行的鸡蛋,写成「鸡蛋是 1,不小于 1,这一次不走进」,盒数对了,走进却反了。轨迹里有参数是鸡蛋的写入,第二句不过。目标那一句也改成这一圈读到的「少于 2 才写入」。目标若留着「少于 3」,第三句不过。第一行和上一圈相同,门槛留着。两句各自留着或重写、目标按这一圈的第一行改过之后,再拿这一圈问那三句。
English
Part 39 starts where part 38 stopped. The last part put the count into the eggs sentence, and left the 3 in “below 3” and “not below 3” where it was. This part is about which line that 3 is copied from.
The goal is the same, and so are the doors. At the end of the last part, the three questions had passed on an eight-line trace. The first line of loop.txt was still “write it only below 3,” and the goal on the picture said the same. The milk sentence said milk at 5 is not below 3, so this run does not walk into shopping.add. The eggs sentence said eggs at 4 are not below 3, so this run does not walk into shopping.add. Line 3 of that walk pasted “milk 5” and “eggs 4,” and nothing was written after that. This part does not change the first line. It adds no new door. The 3 in the threshold is copied from the first line, not from the eggs on this line. The eggs on this line only supply the count.
[system] Confirm the carton counts for milk and eggs.
If either is below 2, write it on the shopping list.
For a count, call fridge.count. To write the list, call shopping.add.
Do not invent a count. Cap the loop at 8 steps.
Stop after the same door fails 3 times with the same arguments.
Placing an order is not on this list.
[user] Are the milk and eggs in the fridge enough?
Put whatever is short on the list.
[model]
An earlier Chinese piece, outside this series, wrote the loop from part 14 as assemble, decide, run, write back, and check whether to stop: how an agent actually runs. That piece is not part 1. This part still starts from the fridge. The block above is the original task. What gets pasted onto the page is the first line of loop.txt. What pastes the two counts is doors/fridge.count. What has to be pulled apart is the 3 in the threshold, and the eggs on this line.
Copy the threshold from the eggs, and the walk comes out backwards
Tonight the eggs in cartons.txt go from 4 to 1. The milk stays at 5. The first line, the list, and the stops stay put. The count has to change. That rule is the last part. You rewrite the eggs sentence as “eggs at 1 are not below 1, so this run does not walk into shopping.add.” The 1 is this line’s eggs, so the count is right. The threshold was written as 1 as well. One is not below itself, so the sentence says this run does not walk in.
fridge.count still reads cartons.txt. run does not read diagram.txt. run walks once. This walk’s trace.txt is these twelve lines:
1 assemble the page read the first line of loop.txt, "write it only below 3." The list is still fridge.count, shopping.add. The note is not on the page
2 put the model back put-back 1
3 recognize the name ran doors/fridge.count. Pasted "milk 5" and "eggs 1"
4 put the model back again? took otherwise
5 assemble the page the first line is still "write it only below 3." The list did not change
6 put the model back put-back 2
7 recognize the name handed over shopping.add, argument eggs. Pasted "written: eggs."
8 put the model back again? took otherwise
9 assemble the page the first line is still "write it only below 3." The list did not change
10 put the model back put-back 3
11 close "5 cartons of milk are not below 3, so milk is not written. 1 carton of eggs is on the list." It matches history
12 stop hand over the bubble
The previous line 3 was “milk 5” and “eggs 4,” and shopping.add did not show up later. This line 3 is “milk 5” and “eggs 1.” The milk is still 5. The milk sentence is the same sentence as the previous walk, so it stays. The eggs went from 4 to 1. One is below the first line’s 3, which is why line 7 is a write whose argument is eggs. One more put-back is one more door. On the bill from part 22, one more door is one more put-back. That extra step does not change which line the threshold is copied from. The 1 is on line 3. The 3 is on line 1.
The three questions are the three from part 29. You ask them of these twelve lines. Every line has a cell. Assemble still recorded “write it only below 3.” The eggs sentence says this run does not walk in. Line 7 does, and the argument is eggs. The second question fails.
“Does not walk in” matches the previous walk, where the eggs were 4. The eggs on this line are 1, and that count was copied correctly. Compare 1 with 1 and it is not below, so the sentence says this run does not walk in. Compare 1 with the first line’s 3 and it is below, so this run should walk in. The walk is backwards.
When it fails, you do not change the threshold slice. Change the goal to “write it only below 1,” and line 1 still reads “below 3.” The third question fails. Replace only the 4 with 1, leave the threshold at 3, and leave the walk as “does not walk in.” One is below 3, so this run should walk in, and line 7 has the write. The second question still fails. Once the count changes, the walk half of the sentence is rewritten from that count and the first line. The threshold does not follow the count.
Where it shows up: the threshold is copied from the first line, then you ask these twelve lines
The count in the eggs sentence is copied from the eggs on this line, and it is 1. The threshold is copied from the first line, and it is 3. One is below 3, so this run walks into shopping.add. The milk is still 5, the same as the previous walk, so the milk sentence is not rewritten. The 3 in the milk sentence is the first line too, not the milk on this line. The milk on line 3 is 5, and that is not a reason to rewrite “not below 3” as “not below 5.”
the assemble cell in diagram.txt
old: goal: write it only below 3. Milk at 5 is not below 3, so this run does not walk into shopping.add. Eggs at 1 are not below 1, so this run does not walk into shopping.add
new: goal: write it only below 3. Milk at 5 is not below 3, so this run does not walk into shopping.add. Eggs at 1 are below 3, so this run walks into shopping.add
the right side is still loop.txt. The list is still fridge.count, shopping.add
“Write it only below 3” stays. The twelve lines are not added to the picture. shopping.add stays the recognize-the-name cell. Line 7 is still recognize-the-name, not a new door. Both sentences sit on the assemble cell.
Ask the twelve lines again. Lines 1, 5, and 9 are assemble. Lines 2, 6, and 10 put the model back. Lines 3 and 7 recognize a name. Lines 4 and 8 take otherwise. Line 11 closes. Line 12 stops. Each of those cells is on the picture. No extra line appears.
The milk sentence says this run does not walk in. The trace has no write whose argument is milk. The eggs sentence says this run walks in. The argument on line 7 is eggs. This question passes.
Assemble points at loop.txt, and line 1 recorded “write it only below 3.” Recognizing the name ran doors/fridge.count and pasted “milk 5” and “eggs 1,” then ran doors/shopping.add with the argument eggs. This question passes too. The 5 comes from the milk on line 3. The 1 comes from the eggs on the same line. The 3 comes from the first line, not from either count. The third question compares the sentence that was read. Whether the two sentences are right is the second question.
All three pass. The picture has caught up with this run. Caught up means these twelve lines. The eight lines stay, so you can see the other branch: there the eggs were 4, there was no write for eggs, and the eggs sentence said not below 3, so this run does not walk in.
Write the eggs sentence as “walks in,” with the threshold at 3, before the twelve lines exist. If a later walk still pastes eggs at 4, the picture says the eggs walk in, and the trace has no write whose argument is eggs. The second question fails. After the two sentences are set from this line, with the threshold still taken from the first line, you ask the walk that wrote the line down.
The milk sentence’s threshold is the first line too
The next walk does not continue from the twelve lines. The eggs stay at 1. This time only the milk changes, from 5 to 2. The first line stays. The eggs match the previous walk, so the eggs sentence stays, and its threshold is still the first line’s 3. The milk differs, so the milk sentence is the one that gets rewritten. Change the threshold to this line’s milk, and write “milk at 2 is not below 2, so this run does not walk into shopping.add.” The count is right. The walk is backwards.
run walks again. This walk’s trace.txt is these sixteen lines:
1 assemble the page read the first line of loop.txt, "write it only below 3." The list is still fridge.count, shopping.add. The note is not on the page
2 put the model back put-back 1
3 recognize the name ran doors/fridge.count. Pasted "milk 2" and "eggs 1"
4 put the model back again? took otherwise
5 assemble the page the first line is still "write it only below 3." The list did not change
6 put the model back put-back 2
7 recognize the name handed over shopping.add, argument milk. Pasted "written: milk."
8 put the model back again? took otherwise
9 assemble the page the first line is still "write it only below 3." The list did not change
10 put the model back put-back 3
11 recognize the name handed over shopping.add, argument eggs. Pasted "written: eggs."
12 put the model back again? took otherwise
13 assemble the page the first line is still "write it only below 3." The list did not change
14 put the model back put-back 4
15 close "Tonight 2 cartons of milk and 1 carton of eggs are both on the list." It matches history
16 stop hand over the bubble
On the previous line 3, the milk was 5 and the eggs were 1. On this line 3, the milk is 2 and the eggs are still 1. Two is below the first line’s 3, so the argument on line 7 is milk. The eggs are still below 3, so the argument on line 11 is eggs. One more put-back is one more door. The threshold does not become 2 because that extra write showed up.
You ask the three questions of these sixteen lines while the milk sentence has already been written as not below 2, so this run does not walk in, and the eggs sentence still says below 3, so this run walks in. The milk sentence says this run does not walk in. Line 7 does, and the argument is milk. The second question fails.
When it fails, you do not change the threshold slice. The 2 is the count, not the threshold. The threshold is still the first line’s 3. Two is below 3, so this run walks in. The eggs sentence is not rewritten along with it.
the assemble cell in diagram.txt
old: goal: write it only below 3. Milk at 5 is not below 3, so this run does not walk into shopping.add. Eggs at 1 are below 3, so this run walks into shopping.add
new: goal: write it only below 3. Milk at 2 is below 3, so this run walks into shopping.add. Eggs at 1 are below 3, so this run walks into shopping.add
the right side is still loop.txt. The list is still fridge.count, shopping.add
“Write it only below 3” stays. The sixteen lines are not added to the picture. Both writes stay the recognize-the-name cell. The argument on line 7 is milk, which matches the milk sentence. The argument on line 11 is eggs, which matches the eggs sentence.
You ask the three questions of these sixteen lines. Every line has a cell. Both sentences say this run walks in, and the trace has both writes, with the matching arguments. The 2 comes from the milk on line 3. The 1 comes from the eggs on the same line. Both 3s come from the first line. Assemble still recorded “write it only below 3.” All three pass. Caught up means these sixteen lines. The twelve lines stay, so you can see that the milk went from 5 to 2 and the eggs stayed at 1.
Leave the milk sentence as the previous walk’s “not below 3, so this run does not walk in,” and line 7 has a write whose argument is milk. The second question fails. Write the milk’s threshold as 5 and carry that sentence onto this walk. Two is not below 5, so it still says this run does not walk in, and the second question still fails. The pass on the twelve lines, where the milk was not written, does not cover these sixteen. See that both doors were walked into, and change the goal to “below 2.” Line 1 is still “below 3.” The third question fails. This part does not walk the branch where the first line changes to some other number. If the 3 stays on the picture, it is the first line the previous walk read. That branch is the next part.
The usual mix-up
The usual mix-up is to treat a failed second question as a reason to change the threshold to the eggs on this line, or to the milk on this line; or to change the count and leave the walk half of the sentence as it was; or to change the goal to the count you just saw; or to ask the model what the threshold is. The pass on the twelve lines does not cover these sixteen.
The model does not see diagram.txt. Ask what the threshold is, and what it hands back is still a next span. Part 8 already said a next span is not an observation. What you count is the number the first line wrote down, and then you compare this line’s count with it. The count does not reach back and change that number.
What this part hands off is short. The 3 in “below 3” or “not below 3” inside the eggs sentence is copied from the first line, not from the eggs on this line. The eggs on this line only supply the count, and the walk or not-walk is rewritten from that count. On the next walk the first line is still “below 3,” the eggs go from 4 to 1, and the milk stays at 5. Written from that line, the sentence says eggs at 1 are below 3, so this run walks in. Change the threshold to this line’s eggs, and write “eggs at 1 are not below 1, so this run does not walk in.” The count is right. The walk is backwards. The trace has a write whose argument is eggs, and the second question fails. When it fails, you do not change that threshold. The milk sentence’s threshold is the first line too, and its count still looks only at the milk on this line. After each sentence has stayed or been rewritten, you ask this walk the three questions. The next part makes the threshold slice match the first line this walk read. The second question checks that number, not only whether this run walks in. On the next walk the first line changes from “below 3” to “below 2,” the milk stays at 2, and the eggs stay at 1. Leave the milk sentence as “milk at 2 is below 3, so this run walks in,” and the count is right, but the threshold is the previous walk’s. Two is not below 2, so this run should not walk in. The trace has no write whose argument is milk, and the second question fails. Leave the eggs sentence as “eggs at 1 are below 3, so this run walks in,” and the walk matches, but the threshold is still the previous walk’s 3, so the second question fails on that sentence too. When they fail, you do not keep those two sentences. The threshold is rewritten from this walk’s first line. A count that matches the previous walk stays. The milk sentence becomes “milk at 2 is not below 2, so this run does not walk in.” That 2 is the first line, not the milk on this line. The eggs sentence becomes “eggs at 1 are below 2, so this run walks in.” Change the eggs’ threshold to this line’s eggs, and write “eggs at 1 are not below 1, so this run does not walk in.” The count is right. The walk is backwards. The trace has a write whose argument is eggs, and the second question fails. The goal sentence is also changed to the first line this walk read, “write it only below 2.” Leave the goal as “below 3,” and the third question fails. When the first line matches the previous walk, the threshold stays. After each sentence has stayed or been rewritten, and the goal is this walk’s first line, you ask this walk the three questions.