{
 "name": "Path",
 "description": "## The instruction\n\n> A black wall. Three thousand chance points, crowded toward the center of the wall. Find the shortest closed line through all of them, visiting each once and never crossing itself, and do not draw it. Paint everything inside it flat white.\n\n## What I decided, where the instruction left it open\n\n**The wall.** A square, 2500 pixels on a side, pure black (#000000). The instruction gives the wall a center, so it has a shape; a square is the plainest shape a wall takes and it makes the center unambiguous.\n\n**Chance.** A fixed seed, 20261129, so the same three thousand points come back every time the program is run. Chance decides where the points fall, and the seed only decides which throw of the chance we are looking at.\n\n**Crowded toward the center.** An isotropic Gaussian cloud about the center of the wall, with a standard deviation of 0.16 of the side, truncated to the disc of radius 0.455 of the side, which is 2.8 standard deviations out, so that a black margin is left all round and the wall stays a wall. Density falls off smoothly from the middle in every direction, which is the literal reading of crowded toward the center. I tried three spreads and kept the tightest of them, because it is the one where the crowding is unmistakable: the enclosed shapes run from broad blades at the rim to a fine lace at the middle, and the silhouette is decided by where the chance points actually fell rather than by the truncation circle.\n\n**Shortest.** Shortest is not computable for three thousand points, so I took it as an instruction about effort rather than a guarantee. The program builds a nearest-neighbour tour, improves it with 2-opt and Or-opt moves over twelve-nearest-neighbour candidate lists until no move helps, and then runs thirty thousand localised double-bridge kicks, keeping a kicked tour only when its repaired length beats the best length so far. The result is a closed line through all three thousand points that no local move shortens.\n\n**Never crossing itself.** Not left to luck. After the search the program hunts every properly intersecting pair of edges with a grid over their bounding boxes and reverses the arc between them, which always shortens a tour and so terminates, repeating until no pair intersects. The line that gets filled is verified simple, which also makes inside well defined.\n\n**Do not draw it.** Nothing is stroked. There is no line in the image. Every boundary between white and black is the line, visible only as the edge of what it encloses.\n\n**Flat white.** The interior is a single value, pure white (#FFFFFF), with no gradient, no texture, and no shading. The fill is computed at four times the final resolution and averaged down, so the boundary pixels carry intermediate greys; that is the edge being resolved, not the paint varying. Inside the figure the white is flat.\n\n**Inside.** The tour is a simple closed polygon, so inside is its interior in the ordinary sense, filled by the even-odd rule, which for a simple polygon is the interior and nothing else.",
 "image": "https://4j.am/media/art/2026-11-29-path-cover.jpg?v=261130140629",
 "external_url": "https://4j.am/path",
 "attributes": [
  {
   "trait_type": "Series",
   "value": "Instructions"
  },
  {
   "trait_type": "Concept",
   "value": "path"
  },
  {
   "trait_type": "Published",
   "value": "2026-11-30"
  },
  {
   "trait_type": "Program",
   "value": "Python"
  }
 ]
}