Back to projects

AlgebraLoop

Math practice from Algebra 1 to AP Calc, with every problem generated and graded in the browser. Tests generate thousands of problems to keep the grader honest.

AlgebraLoop has 9 courses, from Algebra 1 through AP Calc and Linear Algebra, and about 100 units of practice. Each unit is a set of question families: a prompt pattern plus parameter ranges, rolled from a seed and rendered with KaTeX.

Testing the generator against itself

The test suite generates thousands of problems across every unit and difficulty tier, and checks three things:

  • the grader accepts what the generator produced
  • no formatting junk like 1x or x^{1} ever leaks into a prompt
  • no question family is secretly trivial, like one whose answer is always 5

Self-consistency isn't correctness, so passing the grader isn't enough on its own; the other two checks catch problems that are technically valid but broken for a student.

Grading

Grading uses a locked-down math.js parser that checks the student's answer numerically at ten sample points, so 2x+3 and 3+2x, or 1/2 and 0.5, all count as correct. It handles numeric answers, expressions, equations, coordinates, select-all questions, and step-by-step proofs where you pick a reason for each step.

Difficulty and replay

Difficulty scales by how many reasoning steps a problem takes, not by making the numbers bigger. Multistep versions unlock once your mastery for that unit passes 40.

The generator is versioned, so a saved session always replays the exact same questions even after the templates change. A pinned-digest test catches any accidental drift.

Calculator

A built-in calculator with two screens:

  • Calculate: stats distributions (normalcdf, invT, binompdf…) and matrix ops (rref, det, inverse)
  • Graph: the cursor snaps to zeros, turning points and intersections, and you can trace with the keyboard