Adaptive Sensing and Fidelity-Gated Simulated Quantum Teleportation for Maze Exploration Under Partial Observability and Light-Speed Constraints
Darren Pettis
Abstract
Adaptive Sensing and Fidelity-Gated Simulated Quantum Teleportation for Maze Exploration Under Partial Observability and Light-Speed Constraints Maze Exploration Under Partial Observability and Light-Speed Constraints𝗡𝗢𝗧𝗛𝗜𝗡𝗚 𝗢𝗨𝗧𝗥𝗨𝗡𝗦 𝗧𝗛𝗘 𝗟𝗜𝗚𝗛𝗧𝗔𝗲𝘁𝗵𝗲𝗿𝗠𝗮𝘇𝗲 — a machine that learns to see in the dark, teleports by the rules of quantum mechanics, and gets held to the speed of light.v1.1.0 · Python 3 · standard library only · 46/46 tests passing━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝗧𝗛𝗘 𝗦𝗘𝗧𝗨𝗣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━You wake up in the dead center of a maze, 41 rows by 71 columns.It's pitch black. You can see two squares.There's one door somewhere on the outer wall. Nobody tells you where.Every step costs you.You have one trick: you can teleport, but only to a spot you've already seen, it costs more than a step, and a full quantum teleportation protocol has to pass before you move.You find the door. The lights go out. New maze. Same darkness.It does this hundreds of times in a row, and it gets better every time.▸ Maze 1: 400 moves.▸ Maze 110: 1 move.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝗧𝗛𝗘 𝗦𝗖𝗢𝗥𝗘𝗕𝗢𝗔𝗥𝗗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Hundreds of mazes. Zero failures.✔ Every maze solved: 900 test mazes plus learning runs of 100, 300 and 500. Zero failures.✔ Maze 1 → maze 110: 400 moves → 1✔ Jumping vs. walking, same 100 mazes: cost 10,949 vs. 45,767 (4.2× cheaper)✔ Quantum simulation: exact to 15 decimal places over 200,000 runs✔ Light-speed rules on: 3,339 jumps, 0 faster than light, and it still beat walking✔ Noisy quantum link: matches the textbook formula to 3 decimal places✔ Walls block its vision: still 100 out of 100ork Fixed random seeds: same command, same numbers, every time━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝟭 · 𝗜𝗧 𝗦𝗘𝗘𝗦━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Every solved maze, it sees a little farther. It starts nearly blind: sight radius 2.Every maze it solves, its sight grows. No cap.By maze 110 it opens its eyes and sees the whole maze at once.Counting the unseen squares around every point, every tick, would be slow, so it uses a 2-D prefix sum. Any box, any size, in four lookups: def _box(self, T, pos): r, c = pos k = self.k r0, r1 = max(0, r - k), min(self.H, r + k + 1) c0, c1 = max(0, c - k), min(self.W, c + k + 1) return T[r1][c1] - T[r0][c1] - T[r1][c0] + T[r0][c0]That one you get for free. The rest you don't.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝟮 · 𝗜𝗧 𝗗𝗘𝗖𝗜𝗗𝗘𝗦━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Most darkness cleared per unit of cost wins.Every tick it makes one call: walk, jump, or wait.For every square it knows, it asks: "How much darkness would I clear from there, and what would it cost me to get there?"Here's the real decision code. The parts that matter are blacked out: info = g + ██ * self._box(█, p) ... if p in dist: v = info / (████████████ + 1.0) ... if can_jump: v = (info * █████████████████(p) / (██ + 1.0) - ████████████████████ * ██████████████████)Close and rich in information wins. Ties break at random, so it never leans toward one side of the maze. (Tested: first moves split NE 102 · NW 98 · SE 88 · SW 112.)When it can see the door, it does the math: if can_jump and jc * ████ / max(█████████████████(e), 1e-12) < dmin: self.message = "Exit sensed — teleporting directly to it." return "teleport", e━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝟯 · 𝗜𝗧 𝗟𝗘𝗔𝗥𝗡𝗦━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ From sight 2 to the whole maze in 110 runs.Three things change after every maze, and it remembers them between sessions:▸ How far it can see▸ How much it cares about the outer wall (the only place a door can be)▸ How hungry it is for jumps L["vision_length"] = min(vision_cap(self.cfg.max_vision), L["vision_length"] + ████) L["boundary_weight"] = clamp(L["boundary_weight"] + ██████████████████████████████████████, ...) self.p["jump_bias"] = clamp(self.p["jump_bias"] + ████████████████████████, -1.0, 1.0)The learning curve, 500 mazes, one seed: Maze Sight Cost 1 2.09 520 10 3.63 130 50 15.53 34 100 31.77 6 110 34.92 6 ← sees the whole maze 500 77.20 6The last 50 mazes averaged a cost of 6.0. That's one jump, every time.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝟰 · 𝗧𝗛𝗘 𝗤𝗨𝗔𝗡𝗧𝗨𝗠 𝗣𝗔𝗥𝗧━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Entangle. Measure. Correct. Fidelity 1.0.Every jump runs a real three-qubit teleportation protocol. It's the textbook circuit from Bennett et al. (1993), simulated exactly: 8 complex amplitudes and no shortcuts. h(1); cnot(1, 2) # entangle qubits 1 and 2 ██████████████████████████████ # random secret state cnot(0, 1); h(0) # Bell-basis rotation m0 = measure(0); m1 = measure(1) if apply_corrections: if m1: x(2) if m0: z(2)Then it checks the result. If fidelity isn't within 10⁻⁹ of perfect, the jump is denied: overlap = ████████████████████████████████████████████ "fidelity": abs(overlap) ** 2,Proof, over 200,000 random states:▸ Lowest fidelity: 1.000000000000000 (worst error 8.9 × 10⁻¹⁶)▸ The four Bell outcomes: 0.2518 · 0.2508 · 0.2485 · 0.2489 (theory: 0.25 each)▸ Skip the correction step on purpose: 0.4994 (theory: 0.5). It gets caught.▸ Best possible result without entanglement: 0.6659 (theory: 2/3)That 2/3 is the line the whole field uses: going above it proves you used entanglement. Real lab experiments land around 0.70 to 0.89. This simulator hits 1.0, which is what a perfect, noise-free machine would do. It's the right math, done exactly. It is not a lab.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝟱 · 𝗙𝗔𝗦𝗧𝗘𝗥 𝗧𝗛𝗔𝗡 𝗟𝗜𝗚𝗛𝗧?━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3,339 jumps at light speed. Zero faster.The bottom of the screen tells you the truth every tick: Causality c=1 cell/tick | sensing 35c FTL | last jump 49c FTL | peak 49c | FTL jumps 1 [FASTER THAN LIGHT — simulated]The program's speed of light is 1 square per tick. In default mode, the two classical bits arrive instantly, so the readout says FTL, and it says "simulated" because real bits can't do that.So I took the cheat away. Add --causal:▸ The two bits travel at light speed. A 30-square jump takes 30 ticks.▸ Sight travels at light speed too. A square 20 away shows up 19 ticks later. if self.last_jump_c > 1.0 + 1e-12: self.ftl_jumps += 1 Causality c=1 cell/tick | sensing 1c | last jump 1c | peak 1c | FTL jumps 0 | in flight 297 [CAUSAL: every signal at ≤ c]Same 100 mazes: Rules Ticks Cost FTL jumps Walking only 45,767 45,767 0 Jumps, instant bits 6,784 10,949 833 Jumps, light-speed bits 38,512 13,448 03,339 jumps under light-speed rules. Zero faster than light. Top speed: exactly 1c, every time.And it still beats walking by 16%, because a jump goes in a straight line through walls, while walking has to follow every corridor.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝟲 · 𝗕𝗥𝗘𝗔𝗞 𝗜𝗧 𝗢𝗡 𝗣𝗨𝗥𝗣𝗢𝗦𝗘━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ The code is real. The rest is behind the door.Noisy quantum link (--noise). Fidelity matches the theory line 1 − 2p/3:▸ 0.9668 · 0.8668 · 0.6652. Failed jumps get aborted, paid for, and learned from.Walls block vision (--sensor los). No more X-ray sight:▸ Still 100 out of 100.All three at once (light speed + noise + blocked vision):▸ 100 out of 100, 1,094 jumps, 0 faster than light.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝟳 · 𝗪𝗛𝗔𝗧 𝗜𝗧 𝗗𝗢𝗘𝗦𝗡'𝗧 𝗖𝗟𝗔𝗜𝗠━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Facts hit harder than hype, so here are the limits:▸ The quantum gate doesn't choose where to go. Classical code does that. Quantum decides whether a jump is allowed.▸ The fidelity check is an oracle. A real receiver can't measure fidelity on a single run.▸ The jump price (6) and speed of light (1 square per tick) are design choices.▸ The noise model is Pauli errors only.▸ Once it sees everything, the maze stops being a puzzle. That's why light-speed and blocked-vision modes exist.━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━𝗪𝗛𝗔𝗧 𝗬𝗢𝗨 𝗦𝗘𝗘 𝘃𝘀. 𝗪𝗛𝗔𝗧 𝗬𝗢𝗨 𝗚𝗘𝗧━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━What you saw here: the results, the screens, and the shape of the code.What's in the package:▸ The full maze_agent.py, unredacted▸ The complete decision and learning formulas▸ The full curses interface: live map, split view, quantum view, light-speed readout▸ 46 automated tests, plus the fairness audit and the validation logs▸ The Case File: every claim, every number, every command to reproduce it▸ Memory wipe, presets, and the music-sync show setupEvery number above is reproducible. Same command, same seed, same result.𝗧𝗵𝗲 𝗰𝗼𝗱𝗲 𝗶𝘀 𝗿𝗲𝗮𝗹. 𝗧𝗵𝗲 𝗯𝗹𝗮𝗰𝗸𝗲𝗱-𝗼𝘂𝘁 𝗽𝗮𝗿𝘁𝘀 𝗮𝗿𝗲 𝘁𝗵𝗲 𝗽𝗿𝗼𝗱𝘂𝗰𝘁.→ Get AetherMaze:https://x.com/tauepsilon69→ Contact: dl0dth@gmail.comStarter licenses (personal and education, no commercial use):I'm working out pricing right now. It will be, well, hopefully easy.- Upgrade credit: anything a buyer paid toward a lower tier in the past 12 months counts toward an upgrade, so starting small costs them nothing later.- Agreements by size: starter licenses use a one-page agreement buyers can sign electronically, and professional licenses get a full written contract. No license exists until both sides sign.I have a Patreon account that I'm setting up if you want to just support me because... well, maybe I blew your mind.━━━━━━━━━━━━━━━━━━━━━━━