Quest Ladder
TeachFORGE.ai
Quest Ladder / Expressions
Expressions and computed facts
Let the platform work out the answer from the values it generated, so the two can never disagree.
Never type an answer a machine can derive.
Why derive rather than type
Once a question has changing values, its answer changes too. Typing the answer is no longer possible — there is no single answer — so the answer is written as an expression over the variables, and the engine evaluates it for each generated version.
The same applies to anything in the hints and the solution that depends on the numbers. A solution step that says divide by 4 is wrong the moment the divisor becomes a variable; one that refers to the variable stays right in every version.
Computed facts
A computed fact is a named value derived from the sampled variables, defined once under Computed facts with Add fact. It takes an id and an expression, and it is inserted exactly like a variable.
Use one whenever the same derived quantity appears more than once — the simplified form, the intermediate total, the common divisor. Defining it in one place means the stem, the answer, a hint and the solution cannot drift apart when you edit one of them.
Facts are also the right home for anything the question should avoid. A fact that computes whether the answer is a whole number can drive a rule, so the generator simply does not produce the ugly cases.
Writing an expression
Expressions are mathematical rather than programmatic: they use the standard operators and function names, and the guide behind the Insert tray's Expressions dropdown lists what is available with worked examples.
Two evaluation tiers exist. The fast one handles ordinary arithmetic and algebra and is what you want almost always. The heavier symbolic tier handles the cases that genuinely need algebraic manipulation. The guide marks which is which; where you have a choice, the fast one keeps generation quick when you produce two hundred questions at once.
Check it with samples
An expression that is wrong is not obvious in the editor and is glaring in a generated sample. Before you build a ladder on a type, generate several versions and read the answers.
The specific things that catch people out: integer division where a fraction was meant, an expression that divides by a variable whose range includes zero, and rounding applied at the wrong step so the stated answer is a place off the one a learner computes.
Where a lookup would be clearer than a formula — a table of properties, a statistical critical value — data tables do that job instead.