# Tutorial

## Evaluation through stages

You specify how the student’s input is evaluated through a list of evaluation stages. AlgebraKiT will evaluate these stages in the order that they are specified and stop at the first stage that matches the student input.

Consider the following example, which defines three stages to evaluate the student’s input.

The first stage matches the expression $y=x^2+x$ and its commutative variations, which are $y=x+x^2$, $x^2+x=y$ and $x+x^2=y$. If the student inputs any of these expressions, then this input will be evaluated as a correct final answer.

If the student enters the expression $y=x\cdot x+x\cdot 1$, then the first stage is not satisfied and AlgebraKiT will proceed to the next stage. This stage matches because the input can be rewritten to $y=x^2+x$. The stage specifies that the input should be evaluated as an intermediate step. Therefore, the student will see that his input is correct but not yet finished.

If the student enters the incorrect expression $y=x\cdot x + 1$, then also the second stage does not match, but the third one does. This stage specifies that error feedback should be given. The feedback is specified by the author as we will see later.

If none of the stages match the student input, then AlgebraKiT will assume that the input is incorrect. There is an exception: If no evaluation stages are specified, then AlgebraKiT will accept every input as the final answer.

1 / 0

## Specifying an evaluation stage

You can inspect and change an evaluation stage by clicking on it. The single-line summary expands into a form.

The first part of the form specifies the criteria to match this stage. The second part defines the result in case the criterium does or does not match.

There are two types of evaluation criteria: equality or condition.

Equality criterium

You can specify that the input must be compared to one or more predefined answers. Use the evaluation mode to specify what kind of equivalence should be applied.

0 / 0

Conditional criterium

A more general criterium than equality checking is the criterium based on a condition. Such a condition could be: “the input must be a positive number”. This can be written mathematically as $var>0$, where $var$ represents the student input.

The following example shows a stage that matches if the student input is an integer and even number.

You can define multiple conditions. The evaluation criterium matches when all conditions are valid.