factor
← back to the demoAbout this project
factor_rl is a reinforcement-learning agent that factors polynomials over the integers, paired with a search that its learned policy steers. Nothing in it was hand-programmed to factor: through trial and error on generated problems, it learned which move is worth trying next. Its long-term goal is simple to state and hard to reach: factor any polynomial.
The trained agent is too large to ship to your browser, so solving runs on a backend server — this page just sends your polynomial over and renders the steps.
It isn't there yet — and the demo doesn't pretend otherwise. Every answer is checked with exact integer arithmetic against an independent reference, and the badge tells you plainly how the solver did:
- ✓ correct fully factored, verified.
- ⚠ incomplete everything it found is a real factor, but it stopped short.
- ✗ wrong the claimed factors failed verification. (This should be rare — tell me immediately.)
Scope, today
Integer coefficients, one variable x, degree ≤ 16,
|coefficients| ≤ 10¹². Try x^16 - 1 to watch it go deep — and
x^16 + 3x^15 + 3x^7 - 1 to watch it hit its limits.
Found one it can't do? I'm begging you — send it to me.
Polynomials where the badge says incomplete or wrong are exactly the training data this project needs most. If you find one — a miss, a wrong answer, anything that surprised you — email it over. Paste the polynomial and what the demo showed. That's it. You'll be genuinely helping.
Email me a hard polynomial