Assignment randomization engine
Write each question once as a template with number ranges, and get up to 50 versions where every student sees different numbers but the same kind of question, each with an exact answer key.
Templates up to 50,000 characters with up to 25 questions, each with an id of up to 40 characters. Each question may have up to 6 parameters with up to 200 values each, up to 10 constraints, up to 10,000 combinations, and the whole template up to 50,000 combinations. Question text up to 500 characters and each expression up to 300 characters. 1 to 50 versions. Everything runs in the background on your device and nothing is uploaded. Downloads: JSON report with manifest, CSV of every version, printable HTML versions and HTML answer keys. Give each question an id, text, answer and parameter ranges. Constraints and format are optional. Up to 50,000 characters. Review the settings before running.
Your result
How to use Assignment randomization engine
- Write a JSON template with a title and a questions list. Give each question an id, text with {name} placeholders, an answer expression and parameter ranges.
- Add constraints such as a < b or n % d != 0 to keep only the combinations you want.
- Choose the number of versions, whether later versions shuffle the question order, and a seed.
- Generate, then download the printable versions, the answer keys, the CSV and the JSON report with its reproducibility manifest.
Useful next steps
Template rules
Each question id is 1 to 40 letters, digits, hyphens or underscores and starts with a letter or digit, for example q1 or add-fractions. Each parameter is either a range such as {"from": 2, "to": 9, "step": 1} or a list such as {"values": [5, 10, "1/2"]}. In the question text, {a} shows a parameter and {=a*c + b} shows a computed value; use {{ and }} for literal braces. Answers, constraints and computed values may use numbers, parameter names, + - * / % ^, parentheses and abs, min, max, gcd and lcm. The % operator gives the remainder from 0 up to the divisor. The format key chooses fraction, mixed or decimal output; decimals that do not end within 6 places are shown as fractions.
Exact and safe
The template is read by a small parser and evaluated with exact fractions. Nothing in it is ever run as code. A combination is skipped when a constraint fails or a value is undefined, for example division by zero, a non-integer exponent, % gcd or lcm of a non-integer, or a result with more than 30 digits in its numerator or denominator. Any whole-number exponent works while the result stays within 30 digits, so 2^20 is fine and 2^100 is skipped. The report counts how many combinations each question has, how many are valid and why the rest were skipped.
Versions and reproducibility
Every parameterized question gets a different valid combination in every version, drawn without replacement with the same seeded generator used across Happytails.ai worksheets (linear congruential constants from Numerical Recipes, Press et al., 3rd edition 2007, and a Fisher-Yates shuffle as in Knuth, The Art of Computer Programming, volume 2, checked 2026-10-16). The manifest records the seed, the method and a SHA-256 digest of your template (NIST FIPS 180-4, 2015), so the same template and seed always rebuild the same versions.
What equivalent means here
Versions are equivalent in structure: the same questions, the same answer expressions and values from the same ranges. They are not checked for equal difficulty, so a version with 1/2 + 1/3 may feel easier than one with 1/7 + 1/9. Use constraints to narrow the ranges if that matters.