Skip to content

Mental MathRules and recipes

How to describe an abacus technique as an expression, and how to compose those expressions into an exercise generator that produces real practice material.

What this site covers

A rule is one expression that decides whether a candidate value is allowed at a step:

current_value > 0 AND formula = 8 AND digitBefore IN (0, 1)

A recipe collects rules, assigns each one a job (target, review, filler, forbidden, constraint), and bounds the exercise — producing a concrete sequence like +8 +30 −7 +4 = 35.

If you are configuring training material, you will spend your time in the guide and the recipe cookbook. If you are verifying that an expression means exactly what you think it means, go to the reference.

Where to start

You want to…Go to
Understand what a rule is at allWhat is a rule?
Write your first expressionYour first rule
Understand formula and digitBeforeDecimal places
Look up exact semantics of a variableContext variables
Find the expression behind a known techniqueCanonical rules
Build a recipe that generates exercisesRecipe concepts
Train two-digit numbers like +47Multi-place combo steps
Work out why a recipe generates nothingTroubleshooting

Using an AI assistant?

See For AI agents — the whole site is also available as a single plain-text file designed to be pasted into a model's context.

Reference and cookbook for mental-math rule and recipe authoring.