SCENARIOS / SC-018 / PAGERANK
SC-018 Graph Algorithm

PageRank

PageRank as a random surfer — one six-page graph, three damping factors.

Async Tick Spatial FSM
A B C D E F d=0.85
SC-018 / SCHEMATICGraph Algorithm
Clock 240 Hz tick
Update Asynchronous
Pages 6 (A–F)
Damping 0.85 / 0.50 / 1.00
Ground truth Power iteration
OVERVIEW

PageRank expressed as a population of random surfers on a fixed six-page graph (pages A–F). Each surfer carries a damping taxonomy, and per-page policy tables blend following an outlink with teleporting, weighted by the damping factor. Running three damping values side by side lets the long-run visit frequencies converge toward three different PageRank vectors over the same topology.

Shows a classic iterative graph algorithm emerging from independent agents rather than matrix math. The empirical visit distribution can be checked against the analytic power-iteration solution, making it a clean convergence and correctness benchmark.

TRAITS
Async
Independent, event-driven timelines
Tick
Discrete fixed-step time
Spatial
Entities have position & topology
FSM
Entities are finite-state machines
SCHEMA

Linked tables with guaranteed referential integrity.

TABLECOLUMNSDESCRIPTION
surfer ID, damping, current_state One row per surfer: its damping variant and the page (A–F) it currently occupies; visit frequencies aggregate to the PageRank vector.
LIVE API

Generated REST endpoints. Also exposed as MCP tools.

POST /scenarios/page-rank/experiments Seed a new surfer population
POST /scenarios/page-rank/experiments/{eid}/run Advance N turns, or request a hop
GET /scenarios/page-rank/experiments/{eid}/entities/surfer Read surfer positions by page
GET /scenarios/page-rank/experiments/{eid}/events Append-only event log
GET /scenarios/page-rank/experiments/{eid}/dataset Download the exported dataset
SEMANTIC LAYER

OSI-compatible definition, emitted with the dataset.

# page-rank.osi.yaml — emitted automatically
semantic_model:
  name: "page-rank"
  source: "duckdb://page-rank.db"
  entities:
    - name: surfer
      primary_key: id
  dimensions:
    - name: state
      type: categorical
    - name: t
      type: time
  measures:
    - name: row_count
      agg: count
    - name: active
      agg: sum
      filter: "state = 'ACTIVE'"