Cognitive Tutor Authoring Tools 2.6 > Using the Tools > Generalizing an example-tracing tutor with formulas > Testing a formula

5.4. Testing a formula

To determine if a formula matches a student's input on a step, you can do a few things from the Edit Student Input Matching dialog:

To test your formula against the input that you demonstrated:

  1. Open the Edit Student Input Matching dialog on the step for which you've written your formula.

  2. Click Check. Diagnostic text appears in the space above the button (see Figure 2.21, “Results of checking a formula against demonstrated input”).

[Note]Note

Pressing Check both checks the formula's syntax and, if it's valid, compares it against the demonstrated value.

Figure 2.21. Results of checking a formula against demonstrated input

Results of checking a formula against demonstrated input

To test your formula against input you enter in the student interface:

  1. Switch CTAT's Author Mode to Test Tutor.

  2. Perform a step in the student interface that you'd expect to be matched by your formula. As with other matchers, green outlining and text signifies a match on a correct action link, while red outlining and text signifies either a match on an incorrect action link, a suboptimal action link, or no match at all.

    [Tip]Tip

    You can see which link matched by looking for a bold link label, although this is difficult if not impossible on larger graphs or steps that occur late in a sequence.

  3. Open the Edit Student Input Matching dialog on the step for which you've written your formula.

  4. Click Last Evaluation. Diagnostic text will appear in the space above the button, describing how CTAT interpreted the formula (see Figure 2.22, “Results of testing a formula against input entered in the student interface”).

Figure 2.22. Results of testing a formula against input entered in the student interface

Results of testing a formula against input entered in the student interface

On any step, the result of a formula will be one of the following:

If the formula was not used to evaluate the step, the following message should appear:

This expression has not been evaluated.

Possible reasons for no evaluation are generally the same for any non-formula-match link in an example-tracing tutor: the selection or action might not have matched, so input was not evaluated; or a constraint such as ordering or min/max traversals precluded a comparison with the formula-match link.

If the formula was evaluated but didn't match, you might see something like the following:

Last evaluation (3:14:18 PM):

Observed input (student): 2
Expected input (formula): 1.0

No match!

If the formula was evaluated and matched successfully, you might see something like the following:

Last evaluation (3:15:10 PM):

Observed input (student): 2
Expected input (formula): 2.0

Match!

During an attempt at evaluating a formula, Java errors can occur. Some possible errors are:

Try testing your formula with varied input. Before testing the formula again, remember to click on the start state or the state preceding the step you're testing,