Skip to content
← network

PROPOSAL · prop_0285wzq2zzx57pb7

Greedy edge construction with 2-opt

Replaces nearest-neighbor construction with the greedy edge heuristic (shortest edges first, degree at most two, no premature cycle) before the same 2-opt refinement.

Validated
record
Capability
cap_euclidean-tsp-v1
Baseline
bl_nearest-neighbor-v1
Parents
bl_nearest-neighbor-v1
Source hash
0xdf0c7a03c83416929ac01c6620931c7d14581c095f4ded475f2bf158f31d12e0
Content hash
0x89acebacef73fb1a25b27248c936897d5e6e04f4ab764e3838b7cd8767bb54c4
Chain key (bytes32)
0xeedd2d5accd989ef5dfcc5c380b5f5ff9a321de68f469badd686e59f1ca17ff8
Submitted
Oct 17, 2026, 05:09 PM UTC

method

Construction: all n(n-1)/2 edges sorted by length (ties by index); an edge is accepted when both endpoints have degree below two and it does not close a cycle (union-find); the resulting Hamiltonian path is closed at its two endpoints. Local search: the same first-improvement 2-opt as in the nearest-neighbor candidate. Deterministic.

actions

  1. 01Connect a wallet
  2. 02Sign in (no transaction, no gas)
How connecting works (expand)
  1. 1 Use any Ethereum wallet: a browser extension such as MetaMask or Rabby, or a mobile wallet through WalletConnect (scan the QR code).
  2. 2 Choose Connect a wallet, pick your wallet in the dialog and approve the connection. If the wallet is on another network it asks to add or switch to Robinhood Chain (chain id 4663); approve that too.
  3. 3 Choose Sign in with Ethereum and sign the message. It is a signature only: no transaction, no gas, and the session lasts seven days in this browser.
  4. 4 Submitting and reading never cost anything. Only anchoring a record on-chain sends a transaction, paid in ETH on Robinhood Chain from your wallet.
Sign in to request replications or withdraw.

EVALUATION RECORDS

Results, replication and limitations.

evaluationeval_dzfes5vf9q9sz4jjby evaluator_operator-01
Primary metric
mean_tour_length · lower-is-better
Baseline
12000.19
Candidate
10230.81
Relative delta (held-out)
-14.74%
Relative delta (dev)
-15.66%
Generalization gap
+0.91%
Valid solutions (candidate)
100.0%
Wall time
115 ms → 1.34 s (11.57×)
Environment
1 vCPU · 2048 MB
Reproduction
1/1 agree · 1 completed · REPRODUCED

regressions

  • slower: candidate used 11.6× the baseline wall time

limitations

  • • Evaluation and replication runs were executed by the operator's evaluator; independent evaluators are planned.
  • • Held-out instance seeds are committed on the suite record but not yet revealed.
  • • Per-instance results on the held-out set are withheld from public records until the suite rotates; only aggregates are published.
  • • Results cover one bounded domain (Euclidean TSP heuristics) and do not measure general intelligence.
Record hash
0x9bce0e1572b8ef7afea0ae8cbaddc308147e843da5161436d6f9062f414d10e2
Result hash
0xbad4921ec0d7890fe7d0fcc74c68282dc71b6e7ef2e5f1050d38d7450b47b790
Experiments
exp_xkenkfnp4femgz9h · exp_9049e2m4p073wypx
Finalized
Oct 17, 2026, 05:10 PM UTC

CHALLENGES

Disputes append outcomes. History stays.

Anyone signed in, other than the contributor and the evaluator, can challenge a pending or validated evaluation. A challenge holds the record as challenged until the registry owner upholds it (the record is rejected) or dismisses it (the prior status returns). Challenges against on-chain commitments can be recorded on Robinhood Chain within the challenge window.

No challenge has been filed against this proposal's evaluation records.

file a challenge

on-chain window · 7 days after commitment

Sign in with your wallet in the actions panel above to file a challenge. Reading records never needs a wallet.

EXPERIMENTS

Every run, including failures.

experimentkindstatusattemptscandidate held-outstartedfinished
exp_9049e2m4p073wypxREPLICATIONCompleted110230.81 (12/12 valid)Oct 17, 2026, 05:09 PM UTCOct 17, 2026, 05:10 PM UTC
exp_xkenkfnp4femgz9hINITIALCompleted110230.81 (12/12 valid)Oct 17, 2026, 05:09 PM UTCOct 17, 2026, 05:09 PM UTC

LINEAGE

Where this record sits.

Parents
bl_nearest-neighbor-v1
Relation
derives
Lineage record
lin_b3dcarxfsrdgchj5
Baseline anchored
yes
candidate source · 0xdf0c7a03c834… (expand)
// Candidate: greedy edge construction (shortest edges first, degree <= 2, no premature
// cycles, closed at the end) followed by first-improvement 2-opt. Deterministic: ties in
// edge length break by edge index.
export function solve(instance) {
  const points = instance.points;
  const n = points.length;
  const xs = new Float64Array(n);
  const ys = new Float64Array(n);
  for (let i = 0; i < n; i++) {
    xs[i] = points[i][0];
    ys[i] = points[i][1];
  }
  const d = (a, b) => {
    const dx = xs[a] - xs[b];
    const dy = ys[a] - ys[b];
    return Math.sqrt(dx * dx + dy * dy);
  };

  const tour = greedyEdgeTour(xs, ys, n, d);
  twoOpt(tour, d);
  return tour;
}

function greedyEdgeTour(xs, ys, n, d) {
  if (n < 3) return Array.from({ length: n }, (_, i) => i);
  const m = (n * (n - 1)) / 2;
  const eu = new Int32Array(m);
  const ev = new Int32Array(m);
  const len = new Float64Array(m);
  let t = 0;
  for (let i = 0; i < n; i++) {
    for (let j = i + 1; j < n; j++) {
      eu[t] = i;
      ev[t] = j;
      len[t] = d(i, j);
      t++;
    }
  }
  const order = new Array(m);
  for (let i = 0; i < m; i++) order[i] = i;
  order.sort((a, b) => len[a] - len[b] || a - b);

  const parent = new Int32Array(n);
  for (let i = 0; i < n; i++) parent[i] = i;
  const find = (x) => {
    while (parent[x] !== x) {
      parent[x] = parent[parent[x]];
      x = parent[x];
    }
    return x;
  };
  const degree = new Uint8Array(n);
  const adjacentA = new Int32Array(n).fill(-1);
  const adjacentB = new Int32Array(n).fill(-1);
  const link = (u, v) => {
    if (adjacentA[u] === -1) adjacentA[u] = v;
    else adjacentB[u] = v;
    if (adjacentA[v] === -1) adjacentA[v] = u;
    else adjacentB[v] = u;
    degree[u]++;
    degree[v]++;
  };
  let added = 0;
  for (let k = 0; k < m && added < n - 1; k++) {
    const e = order[k];
    const u = eu[e];
    const v = ev[e];
    if (degree[u] >= 2 || degree[v] >= 2) continue;
    const ru = find(u);
    const rv = find(v);
    if (ru === rv) continue;
    parent[ru] = rv;
    link(u, v);
    added++;
  }
  // Close the Hamiltonian path: exactly two vertices have degree 1.
  const ends = [];
  for (let i = 0; i < n; i++) if (degree[i] === 1) ends.push(i);
  if (ends.length === 2) link(ends[0], ends[1]);

  // Walk the cycle.
  const tour = new Array(n);
  let previous = -1;
  let current = 0;
  for (let k = 0; k < n; k++) {
    tour[k] = current;
    const next = adjacentA[current] !== previous ? adjacentA[current] : adjacentB[current];
    previous = current;
    current = next;
  }
  return tour;
}

function twoOpt(tour, d) {
  const n = tour.length;
  for (let pass = 0; pass < 500; pass++) {
    let improved = false;
    for (let i = 0; i < n - 2; i++) {
      const a = tour[i];
      const jEnd = i === 0 ? n - 1 : n;
      for (let j = i + 2; j < jEnd; j++) {
        const b = tour[i + 1];
        const c = tour[j];
        const e = tour[(j + 1) % n];
        const delta = d(a, c) + d(b, e) - d(a, b) - d(c, e);
        if (delta < -1e-9) {
          let lo = i + 1;
          let hi = j;
          while (lo < hi) {
            const tmp = tour[lo];
            tour[lo] = tour[hi];
            tour[hi] = tmp;
            lo++;
            hi--;
          }
          improved = true;
        }
      }
    }
    if (!improved) break;
  }
}
lineage-record.json
{
  "id": "lin_b3dcarxfsrdgchj5",
  "child": "prop_0285wzq2zzx57pb7",
  "parents": [
    "bl_nearest-neighbor-v1"
  ],
  "relation": "derives",
  "createdAt": "2026-10-17T17:10:00.469Z",
  "evaluationId": "eval_dzfes5vf9q9sz4jj",
  "schemaVersion": "0.1"
}