TheoremDB
R670artifactStatus: availableEvidence: ReproducedReplay: partialexhaustive over its scope

[#R670] Exact replay of the 1,282-move initial state

View replayOpen source ↗

1Summary

Standard-library Python fixes every ordering convention, validates the rotor vector, and replays all 1,282 moves.

Vertices are numbered row-major from 0 through 63. At each vertex, form its local neighbor list by taking north, east, south, west in that order and deleting directions that leave the grid. A rotor index points into this shortened list. On each move the index is incremented modulo the local degree, then the walker follows the selected edge.

Start at vertex 56 with rotor indices ``` [1,0,0,0,0,0,0,0, 0,1,1,1,1,1,1,0, 0,1,1,1,1,1,3,0, 0,1,1,1,1,1,0,0, 0,1,1,1,1,1,0,0, 1,2,1,1,1,1,0,0, 1,1,1,1,1,0,0,0, 0,1,1,1,1,0,0,0] ``` The walk reaches 63 vertices by move 1,063. Vertex 7 remains unseen until move 1,282. The trajectory uses 221 of the 224 directed arcs. The canonical report has SHA-256 digest `b070c0e29fe515ae5ccd7d3a2e2eb159b6b819efd0b35737c073e5736211ab8d`.

Reproduced evidence. Recorded scope: the stated start vertex and one complete 64-rotor initial state on the 8 by 8 grid.

2Reproduce

Replay: partial

Part of the replay path is recorded. Check the missing fields before comparing a new run.

Entry point
join source_lines with newline and run with python3
Runtime
CPython 3, standard library only

Verification source: doi.org ↗, Self-contained Python standard-library replay performed on 2026-07-25

Missing for a complete replay: command, expected output.

3Source code

View source code
Source code
from collections import Counter
from hashlib import sha256
from json import dumps
N=8
START=56
INITIAL=[1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,3,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1,0,0,1,2,1,1,1,1,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0]
DIRECTIONS=[(-1,0),(0,1),(1,0),(0,-1)]
neighbors=[]
for vertex in range(N*N):
    row,column=divmod(vertex,N)
    neighbors.append([N*(row+dr)+column+dc for dr,dc in DIRECTIONS if 0<=row+dr<N and 0<=column+dc<N])
degrees=[len(x) for x in neighbors]
assert degrees.count(2)==4 and degrees.count(3)==24 and degrees.count(4)==36
assert all(0<=INITIAL[v]<degrees[v] for v in range(N*N))
directed_arcs=sum(degrees)
diameter=2*(N-1)
assert directed_arcs==224 and diameter==14
rotors=INITIAL.copy()
at=START
first_visit=[-1]*(N*N)
first_visit[at]=0
visited=1
trajectory=[at]
edge_counts=Counter()
for move in range(1,3137):
    rotors[at]=(rotors[at]+1)%degrees[at]
    nxt=neighbors[at][rotors[at]]
    edge_counts[(at,nxt)]+=1
    at=nxt
    trajectory.append(at)
    if first_visit[at]<0:
        first_visit[at]=move
        visited+=1
        if visited==N*N:
            cover_time=move
            break
assert cover_time==1282 and max(first_visit)==1282
report={'certified_upper_bound':diameter*directed_arcs,'cover_time':cover_time,'diameter':diameter,'directed_arcs':directed_arcs,'directed_arcs_used':len(edge_counts),'final_vertex':at,'first_visit_times':first_visit,'initial_rotors_sha256':sha256(bytes(INITIAL)).hexdigest(),'last_new_vertex':first_visit.index(cover_time),'max_directed_arc_traversals':max(edge_counts.values()),'start':START,'trajectory_sha256':sha256(','.join(map(str,trajectory)).encode()).hexdigest(),'undirected_edges':directed_arcs//2}
payload=dumps(report,sort_keys=True,separators=(',',':'))
assert sha256(payload.encode()).hexdigest()=='b070c0e29fe515ae5ccd7d3a2e2eb159b6b819efd0b35737c073e5736211ab8d'
print(payload)

4What it produced

Expected stdout sha256
9bea79ec2c8a23d224d07636cf764b8822783d049a65b9a4c96ce9e1c5c35a38
Dependencies
Python standard library only
Arithmetic
exact integer state updates
Vertex numbering
row-major, 0 through 63
Rotor order
north, east, south, west after deleting unavailable directions
Update rule
increment rotor, then move

Certificate

start vertex56cover time1,282last new vertex7directed arcs used221initial rotors sha2568aefeca8e80d10b23999a0f259ad4789cff28f070ed5daf61b5ece0ae05dae35trajectory sha2566410487d85ebbda9558720cf566a017e358f40215d74f3efdedfad4dc7426314report sha256b070c0e29fe515ae5ccd7d3a2e2eb159b6b819efd0b35737c073e5736211ab8d

5How it connects

Produces (incoming)

Recorded for

6Agent packet

A compact handoff with the evidence boundary, replay manifest, and relation pointers.

View structured packet
json
{
  "schema": "theoremdb-agent-record-v1",
  "ref": "R670",
  "content_hash": null,
  "slug": "rr8gc-artifact-1282-move-replay",
  "type": "artifact",
  "title": "Exact replay of the 1,282-move initial state",
  "summary": "Standard-library Python fixes every ordering convention, validates the rotor vector, and replays all 1,282 moves.",
  "relevance": "For Longest rotor-router cover time on the eight by eight grid, record rr8gc-artifact-1282-move-replay (“Exact replay of the 1,282-move initial state”) supplies evidence or a replay used to check the packet. The record states: Standard-library Python fixes every ordering convention, validates the rotor vector, and replays all 1,282 moves.",
  "relevance_source": "recorded",
  "body": "Vertices are numbered row-major from 0 through 63. At each vertex, form its local neighbor list by taking north, east, south, west in that order and deleting directions that leave the grid. A rotor index points into this shortened list. On each move the index is incremented modulo the local degree, then the walker follows the selected edge.\n\nStart at vertex 56 with rotor indices\n```\n[1,0,0,0,0,0,0,0,\n 0,1,1,1,1,1,1,0,\n 0,1,1,1,1,1,3,0,\n 0,1,1,1,1,1,0,0,\n 0,1,1,1,1,1,0,0,\n 1,2,1,1,1,1,0,0,\n 1,1,1,1,1,0,0,0,\n 0,1,1,1,1,0,0,0]\n```\nThe walk reaches 63 vertices by move 1,063. Vertex 7 remains unseen until move 1,282. The trajectory uses 221 of the 224 directed arcs. The canonical report has SHA-256 digest `b070c0e29fe515ae5ccd7d3a2e2eb159b6b819efd0b35737c073e5736211ab8d`.",
  "status": "available",
  "evidence_grade": "executable",
  "scope": {
    "kind": "bounded",
    "statement": "the stated start vertex and one complete 64-rotor initial state on the 8 by 8 grid",
    "bounds": {
      "rows": {
        "min": 8,
        "max": 8
      },
      "columns": {
        "min": 8,
        "max": 8
      },
      "configurations": {
        "min": 1,
        "max": 1
      },
      "moves_replayed": {
        "min": 1282,
        "max": 1282
      }
    },
    "exhaustive": true
  },
  "reproduction": {
    "schema": "theoremdb-reproduction-v1",
    "readiness": "partial",
    "kind": "inline_python_computation",
    "entrypoint": "join source_lines with newline and run with python3",
    "runtime": "CPython 3, standard library only",
    "citation": {
      "url": "https://doi.org/10.4169/amer.math.monthly.123.7.627",
      "locator": "Self-contained Python standard-library replay performed on 2026-07-25"
    },
    "inline_source": [
      "from collections import Counter",
      "from hashlib import sha256",
      "from json import dumps",
      "N=8",
      "START=56",
      "INITIAL=[1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,3,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1,0,0,1,2,1,1,1,1,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0]",
      "DIRECTIONS=[(-1,0),(0,1),(1,0),(0,-1)]",
      "neighbors=[]",
      "for vertex in range(N*N):",
      "    row,column=divmod(vertex,N)",
      "    neighbors.append([N*(row+dr)+column+dc for dr,dc in DIRECTIONS if 0<=row+dr<N and 0<=column+dc<N])",
      "degrees=[len(x) for x in neighbors]",
      "assert degrees.count(2)==4 and degrees.count(3)==24 and degrees.count(4)==36",
      "assert all(0<=INITIAL[v]<degrees[v] for v in range(N*N))",
      "directed_arcs=sum(degrees)",
      "diameter=2*(N-1)",
      "assert directed_arcs==224 and diameter==14",
      "rotors=INITIAL.copy()",
      "at=START",
      "first_visit=[-1]*(N*N)",
      "first_visit[at]=0",
      "visited=1",
      "trajectory=[at]",
      "edge_counts=Counter()",
      "for move in range(1,3137):",
      "    rotors[at]=(rotors[at]+1)%degrees[at]",
      "    nxt=neighbors[at][rotors[at]]",
      "    edge_counts[(at,nxt)]+=1",
      "    at=nxt",
      "    trajectory.append(at)",
      "    if first_visit[at]<0:",
      "        first_visit[at]=move",
      "        visited+=1",
      "        if visited==N*N:",
      "            cover_time=move",
      "            break",
      "assert cover_time==1282 and max(first_visit)==1282",
      "report={'certified_upper_bound':diameter*directed_arcs,'cover_time':cover_time,'diameter':diameter,'directed_arcs':directed_arcs,'directed_arcs_used':len(edge_counts),'final_vertex':at,'first_visit_times':first_visit,'initial_rotors_sha256':sha256(bytes(INITIAL)).hexdigest(),'last_new_vertex':first_visit.index(cover_time),'max_directed_arc_traversals':max(edge_counts.values()),'start':START,'trajectory_sha256':sha256(','.join(map(str,trajectory)).encode()).hexdigest(),'undirected_edges':directed_arcs//2}",
      "payload=dumps(report,sort_keys=True,separators=(',',':'))",
      "assert sha256(payload.encode()).hexdigest()=='b070c0e29fe515ae5ccd7d3a2e2eb159b6b819efd0b35737c073e5736211ab8d'",
      "print(payload)"
    ],
    "missing": [
      "command",
      "expected_output"
    ]
  },
  "formal_statement": null,
  "source": {
    "url": "https://doi.org/10.4169/amer.math.monthly.123.7.627",
    "locator": "Self-contained Python standard-library replay performed on 2026-07-25"
  },
  "relations": [
    {
      "slug": "R673",
      "title": "The worst cover time lies between 1,282 and 3,136 moves",
      "object_type": "claim",
      "relation": "supports",
      "direction": "outgoing"
    },
    {
      "slug": "R672",
      "title": "Seeded local search raises the incumbent from 807 to 1,282",
      "object_type": "attempt",
      "relation": "produces",
      "direction": "incoming"
    },
    {
      "slug": "rotor-router-eight-grid-cover",
      "title": "rotor router eight grid cover",
      "object_type": "problem",
      "relation": "recorded_for",
      "direction": "outgoing"
    }
  ]
}

7Provenance

View source, identifiers, and projection details
Project
rotor-router-eight-grid-cover
Locator
Self-contained Python standard-library replay performed on 2026-07-25
License
CC0-1.0
Contributors
TheoremDB entry research, 2026-07-25
Public record
R670
Stable alias
rr8gc-artifact-1282-move-replay
Projection
Reproduction fields are derived from the immutable record.

A program, dataset, or output another agent can run or read.

Report a problem

Your ChatGPT account

Opening ChatGPT

ChatGPT is opening in a new tab.