← Experiment
Active· AI · Math

The P = NP lab

An autonomous research lab on my desktop that assumes, for the sake of argument, that P = NP, and then goes looking for the mechanism. Mostly it finds walls. That's the point of writing them down.

The question

P versus NP asks whether every problem whose answer is easy to check is also easy to find. Most people who know the field bet that it isn't, and that bet is probably right. But "probably" is not a proof, and nobody has a proof either way.

So I set up a lab that takes the other side as a working hypothesis. Assume P = NP. If that were true, there would have to be an actual algorithm, a real mechanism, that solves a problem like 3-SAT in polynomial time. What would it look like? Where would you even start digging?

The lab is AI agents doing the digging, on my own hardware, with me setting the rules and reading the results.

The rules

Before any code ran, the lab got a set of rules I care about more than any result:

Experimental speed is not proof. Every answer gets checked. Worst case, not average case. Rediscovering something known is not a discovery. And stay open to the evidence that P ≠ NP.

Findings get a colour so nobody, including me, gets carried away. Blue is an experimental insight. Green is a verified improvement to an algorithm. Yellow is something that might be mathematically interesting and needs a hard look. Orange and red are reserved for things that would need serious independent verification. So far, everything is blue.

The lab

It runs on my desktop: a 24-core Core Ultra 9, 64 GB of RAM and an RTX 5090, with a Python workspace for GPU and parallel work, a results database, and checkpointing so long runs survive a reboot.

At its centre is a harness that measures every candidate algorithm the same way it measures the best existing SAT solvers, across many kinds of problem:

  • Random 3-SAT at the hardness peak, where the ratio of clauses to variables is about 4.26.
  • Balanced and hidden-solution instances built so that simple statistics can't give the answer away.
  • Structured families like Tseitin formulas, pigeonhole problems and XOR-SAT, each of which is known to be brutal for some proof systems and easy for others.

Every answer is checked independently. A claimed solution is tested against every clause. A claim that no solution exists needs a machine-checkable proof, or agreement with a solver that produced one. Anything that gets an answer wrong is rejected outright; the harness ships with deliberately lying "algorithms" just to prove it catches them.

The first baseline: the CaDiCaL solver checked out on all 4,300 test instances.

The first three ideas

The opening round tried three very different angles. These are early prototypes on small problems, not lab-scale runs, and none of them survived.

  1. Algebra. Turn the formula into polynomial equations over GF(2) and look for a low-degree algebraic proof that it has no solution. If the degree needed stayed constant as problems grew, that would be a polynomial-time certificate. It didn't: degree 5 refuted every unsatisfiable instance at 12 and 14 variables, but only 1 in 10 by 20 variables, while the matrices grew from about 1,600 columns to over 35,000. That matches what's known: random 3-SAT needs algebraic proofs of linear degree.
  2. Geometry and dynamics. Relax the true/false cube into continuous space and let a physics-like system flow toward a solution, with clause weights that grow over time (after Ercsey-Ravasz and Toroczkai, 2011). It solved everything up to 80 variables, but its cost climbed steeply and it solved only 12 of 40 problems at 140 variables. The analog time looks tame; the "energy" hidden in the growing weights is where the exponential goes.
  3. Evolution. Breed local-search strategies, the WalkSAT family, and test the winners on bigger problems they never saw. The evolved strategy beat the hand-tuned classic by 2 to 3 times at 50 to 150 variables, then lost by more than 4 times at 200. A heuristic tuned on small problems overfits small problems.

Three ideas, three walls, each one a wall someone had already mapped. That's a normal first week.

What's next

More hypotheses through the same harness at real scale (300+ variables), formal proof tooling so mathematical claims can be machine-checked, and results posted here as they're verified. If the lab ever finds something that isn't a wall, it'll get a colour, independent checking, and a lot of scepticism, most of it mine.