User's Guide‎ > ‎Examples‎ > ‎

Long Division Tutor

1. Requirement

(1) If you are using Windows Vista, then you should have Cygwin installed.

2. Download the example -- the Long Division Tutor

(1) Download an example tutor from here
(2) To install, simply unzip the file under ${CTAT}/Projects where ${CTAT} is the place you installed CTAT.

3. Launch the Long Division Tutor

(1) Go to the SimStLDHW directory.
(2) Do one of the following depending on your platform:
For Vista users You must have Cygwin installed. Follow the instruction "For Mac users"
For Window users Double click on the runTutor.bat file.  If you have Cygwin installed, you can also run as shown below.
For Mac users Open up a Terminal window, cd to the SimStLDHW directory, and issue "./" at the command prompt.
If you have trouble running SimStudent with the Java exception like the one shown below, then you have to re-compile the java files in the ziped package:

"main" java.lang.UnsupportedClassVersionError: Bad version number in .class file at
java.lang.ClassLoader.defineClass1(Native Method) at

To recompile things, run or compileTutor.bat

(3) You should now see the CTAT window and the Student Interface for the Long Division Tutor

CTAT window:

Student Interface for the Long Division Tutor

 4. Activate the Simulated Student

(1) From the Tutor Mode menu, select "Simulated Student" to activate the Simulated Student

(2) If you see a pop-up window telling you there exists a production rule file, click [No] to continue the example.

Generally speaking, however, you may want to do one of the following things.

Click [Yes] if you want to save the existing production rules. You'll see another dialogue box to specify a file name.

Click [No] if you'd wish to discard the existing production rules.

Click [Cancel] if you want to keep the existing production rules. The Simulated Student then would read the production rules, and update them when you perform more demonstrations.

Again, for this example tour, please just click [No] if you see the above pop-up window.

(3) Click on the "Behavior Recorder" tab. 

The Behavior Recorder panel shows a behavior graph, through which you can communicate with Simulated Student

(4) It might be a good idea for you to learn about the other panels available in CTAT
Conflict Tree Shows rule activations for the current node.  In other words, you can tell which rule is (or is NOT) activated and why.  Part of such inquiry is answered by WhyNot tool.  Clicking on a rule listed will opens up a WhyNot window.
WME Editor Provides an access to the working memory elements. You can inspect & change the values of the current working memory elements. You can also create new working memory elements.
Jess Console A interactive shell to communicate with Jess.  You can issue Jess commands and get an immediate result.
Simulated Student
A central unit to control Simulated Student and get information from it.

5. Create Start State

(1) Chance the author mode to "Set Start State" using the Author Mode pull-down menu

(2) Let's try a simple problem first -- 5 divided by 3. 

Enter a dividend (i.e., 5), divisor (3), and a '/' that separates these two on the 2nd row of the table as shown below.

For the sake of the tutorial, please enter the exact same problem, which is "5 divided by 3," even when you have strong preference to play around your very own problem!

A few things you need to keep in your mind for this particular tutor:

  • Always put "/" at the 4th cell from the left in the 2nd row
  • Place a divisor (i.e., '3' for "5 divided by 3") left to the '/' aligning right, and place a dividend (i.e., '5' for "5 divided by 3") right to the '/' aligning left.
  • A single cell contains a single digit. Thus, for example, for the problem of "17 divided by 3", place [3],[/],[1],and [7] in a row
  • Always hit the Enter key or Tab key when you enter a digit in cell
(3) From the [Graph] menu, select "Create Start State"

(4) When "Input" dialogue window pops up, enter the problem name

Note: the problem name can only contain alphabetic characters, digits, +, -, and _.

(5) You should now see the start state in the Graph View

6. Tutor SimStudent

You've made for SimStudent to solve.  Now, you tell SimStudent to solve it.  SimStudnet attempts to perform every step.

  • If the attempt is successful it will be displayed on the Student Interface. You must give a flagged feedback (telling either the correctness of the step performed). 
  • If the attempt is luckless, then SimStudent requires a hint.  You then demonstrate the step for SimStudent.

Initiate Tutoring

(1) Run Interactive Learning

Right click on the start state, and select "Run Interactive Learning Here"

(2) Acknowledge SimStudent's ignorance

Since SimStudent doesn't have any production rules, it doesn't know what to do. Therefore, it asks you for a demonstration.

(3) Now, demonstrate the step for SimStudent, that's way to give SimStudent a "hint."

Follow the instruction below

Give a hint, or demonstrate a step that SimStudent can't perform

To demonstrate a step, you need to do following things:

  • Specify focus of attention
  • Perform an action for the step
  • Acknowledge feedback from Simulated Student
  • Specify the name of the step (when necessary)
(1) Specify focus of attention

You must specify all elements shown on the GUI (Graphic User Interface) that contribute to the step.  Those elements are called focus of attention

To specify focus of attention, double click on the target GUI element.  You should see that they are highlighted with a blue box.

For this example, double click on "5" and "3" in this order.

(2) Perform an action for the step

Now, do what you need to do.  Just like building an Example-tracing Tutor, you need to perform an exact step here.

For this example, enter "1" in the 5th cell from the left in the 1st row and press the [Enter] key.

(3) Specify the name of the step

Now you should see that the state1 has been created in the Graph View.

If you only see [sta...] instead of [state1], drag the [sta...] node a little bit. 
If you do not see [unnamed] box just above the [state1] box, then go to the [View] menu, and select the [Skill Names] option

You need to name each step you demonstrate. Do the following:

1. Click on [unnamed] box and select "Edit Skill Name"

2. When a pop-up window appears, enter "div" as the skill name and click [OK]

You should now see the following graph in the Graph View.

If you do not see the skill name changed on the graph even after the pop-up window disappears, then simply place your mouse cursor over the skill name box.

This completes the demonstration for the first single step.

Iterate tutoring through all steps

In this first problem, SimStudent will not get the chance to apply any of the rules it learns. Continue demonstrating the rest of the problem, in a similar fashion.

Note: While demonstrating, it is very important to wait for SimStudent when he is learning a step.

You should see a pop-up window saying "I'm stuck" after each step, once SimStudent has finished learning.

Always wait for the pop-up window to proceed to the next step!!

Keep demonstrating all other steps until you solve the problem completely. 

For this example, only two more steps to go!  Now, perform the following:

(4) Specify focus of attention by clicking "1" and "3" in this order

(5) Enter "3" and hit the [Enter] key

(6) Click on the [unnamed] box and select "Edit Skill Name."  Then, enter "mul" as the skill name.

(7) Specify Focus of Attention by clicking "5" and "3" in this order. 

Then, enter "2" immediately underneath.

(8) Click on the [unnamed] box and select "Edit Skill Name."  Then, enter "sub" as the skill name.

(9) Wait for the pop-up window from SimStudent asking a hint (even though the problems is solved!)

Showing the "I'm stuck" pop-up window at the end of the problem means that SimStudent doesn't know when a problem is solved. The next correct step might be clicking on the [Done] button.  However, as mentioned earlier, we won't teach SimStudent when to click done button.

For the sake of demonstration, just click on the [OK] button.

(10) You should now see two complete steps in the Graph View just like this:

This completes the whole demonstration on the fist problem.

7. Save a Behavior Graph

You may want to save a behavior graph.

(1) Save the behavior graph

First, go to the [File] menu and select [Save Graph]

Check "Save to Another Location" on and click [OK]

Save a file wherever you like.

8. Provide more demonstrations

At this very moment, the SimStudent has learned three rules, which are called div, mul, and sub

So, if you give SimStudent another problem to solve that involve only those skills, SimStudent should be able to perform steps!  Let's see if this is really the case.

Note: Pay extra attention not to make any mistake in your demonstration.  You must be consistent in solving problem.  So, do not make any mistake in demonstration, or SimStudent might get very confused.  If you made a mistake, consult FAQ.

(1) Initiate a new problem

Go to the [File] menu and select "New Graph"

(2) Create a new problem

So far, the Simulated Student has learned three rules.

Thus, providing more demonstration is not only for the Simulated Student to learn, but also for you to test if the production rules have been learned correctly -- if you perform those three skills on a similar problem, they must be successfully model traced.

Let's try "9 divided by 2" as the next problem.

Do not forget to create a start state

Name the start state as you like.

(3) Let SimStudent solve the problem

Right click on the start state.  And, select "Run Interactive Learning Here" as before.


SimStudent performs the first step!

Now, observe that SimStudent does perform the first step! 

SimStudent should now ask you if the step performed is correct or not. 

Also pay attention to the skill name shown on the edge.  It says "div".  SimStudent applied the skill "div" here, which is indeed a correct performance.  Click on [Yes] to acknowledge.

You should also see a digit '4' is entered in the Student Interface.

(5) SimSt attempts to perform the 2nd step

Right after you click on the [OK] button, SimStudent performs the next step and shows another dialogue saying that SimStudent entered '0' under 9.

This is wrong!!  So, you should click on the [No] button this time.

Okay, the first attempt was unsuccessful.  SimStudent then tries to make another attempt.  However, there is no other production rule that can apply at this moment.  So, SimStudent asks a hint.

As usual, simply acknowledge here by clicking on the [OK] button.

(6) Inspect the incorrect production rule (optional)

When you see SimStudent making incorrect (or, unexpected, if you will) behavior, you may want to know what production rule has been learned. You can inspect production rules with the "Conflict Tree" tool. 

First, click on the [state2] on the Behavior Recorder.

You should see the incorrect '0' displayed on the Student Interface again (but red-colored this time).

Now, you must be very curious why "0"? 

Click on the "Conflict Tree" tab. And then, click on the rule name that you want to inspect (which, in this case, of course, is "mul").

The "Why not?" window must pop-up.

The top pane shows an actual production production rule that has been learned.  The bottom half shows the bindings for each variable in the production rule. (Don't worry if you have no idea what I'm talking about...  You wanted to use the Simulated Student because you did not like to read the tasteless production rules, anyways)

Scroll down the top pane to the very end


The production rule says to enter the quotient of ?val1 (which is 2) divided by ?val0 (which is 4), which is indeed 0!!

Remember what you were demonstrating?  It was 5 divided by 3 where you had entered "3" to demonstrate the skill "mul."  Ah huh!  That "3" could be the result of 3 divided by 1!

(7) Correct the incorrect production rule

Now, you know that the rule "mul" is not correctly learned.  You must tell SimStudent how to perform the step correctly with the rule "mul".

Go back to the Behavior Recorder (by clicking on the "Behavior Recorder" tab).

Make sure you now see a problem and a digit '4' with green.

If you still see the red digit '0' on the student interface, you should go back to the "state1"

To go back to the "state1", first click on the start state "9by2", and then click on the "state1"

Make sure you are seeing this before go to next step.

Now, remember SimStudent once asked a hint on this step already?  Yes, SimStudent is waiting for you demonstrate the step.  So, you can just demonstrate (i.e., give a hint) the step.

Double click on '4' and '2' in this order and enter '8' under '9'.

Now confirm that the Behavior Graph has state3 under state1.

Click on the [unnamed] box to edit the skill name. But, this time you should "select" the name from the pull-down menu instead of typing (to avoid a TYPO, which surely confuses SimStudent).

Select "mul" as the skill name.


(8) SimStudent performs the 3rd step correctly

As for the last step, SimStudent seems to understand what to do!

Simply acknowledge the performance.

Again, SimStudent asks you a hint on the next step (i.e,. the "Done" step), but we can just click [OK].

9. Keep demonstrating more steps and more problems

Now you know all essential things to play with SimStudent.  Go on, and tutor SimStudent with more problems. If you give another single digit division problem, say, "4 divided by 8", you see that all three steps are correctly performed by SimStudent.