Judging Student Responses
You now know quite a bit about how to express (in the TUTOR language) your instructions to PLATO on how to administer a lesson to a student. You may not have realized it, but in the process you have learned a great deal about the fundamental concepts of computer programming. You can calculate, produce complex displays, and construct rich branching structures. You have studied aspects of initialization problems, you have seen the importance of subroutines, and you have looked at some stylistic aspects of good programming practice such as defining variables, placing unit pointer commands at the head of main units, etc. With this solid background you are now ready for a detailed look at how to accept and judge student responses.
In Chapter 1 you saw a common type of judging situation in which you simply listed the anticipated responses after an -arrow- statement, together with the display or other actions to be performed depending on the particular response. Let us see how TUTOR actually processes these judging commands. We will consider a slightly different version of the geometry“ unit. Remember that in the -answer- and -wrong- statements, parentheses enclose synonyms, and angle brackets enclose ignorable words.
The order of the initial statements has been changed slightly. TUTOR starts executing this main unit by drawing the triangle. TUTOR next encounters the -arrow- command, places an arrowhead at position 2015, and notes where this -arrow- command is (the second command in unit “geometry”). TUTOR then executes the -at- and -write- to display the text: “What is this figure?”
Finally, TUTOR reaches the -answer- command. This “judging” command is useless at this time because the student has not entered a response. There is nothing more that can be done but wait for the student to type a response and enter it by pressing NEXT. We call commands which operate on the student's response “judging” commands (such as -answer- and -wrong-). Other commands, such as -draw-, -at-, -write-, and -calc-, are called “regular” commands. We see that TUTOR must stop executing regular commands when a judging command is encountered. (This assumes the presence of an -arrow- command. An -answer- or other judging command without a preceding -arrow- is meaningless.)
When the student presses NEXT to enter his or her response, TUTOR looks at its notes and finds that the -arrow- was the second command in unit “geometry”. TUTOR starts looking just beyond there for judging commands to process the student's response. It skips the regular commands -at- and -write- since these are not judging commands and are of no use at this point. It encounters the -answer- command and compares the student response with the specifications given in the tag of the -answer- command.
If there is not an adequate match, TUTOR goes to the next command looking for a judging command that might yield a match. In this case, the following command is a regular command (-write-) which is skipped. Next there is a -wrong- judging command, and if there is no match to the student's response, TUTOR keeps judging. At this point, there is a -write- regular command which is skipped.
Finally, we come to the end of the unit without finding a matching judging command and must give a “no” judgment to this response (and possibly mark up the response with underlining and X's if the response is fairly close to that specified by the -answer- command). (See Figure 7-1.) The process of starting immediately after the -arrow- in the “judging state” will be repeated each time the student tries again with a revised response.
If, on the other hand, the response adequately matches the -answerstatement, TUTOR has found a match and can terminate the execution of judging commands. It switches to processing regular commands with the result that the following “write Exactly right!” will be executed. (This regular command is skipped unless a match to the -answer- flips TUTOR out of the “judging state” into the “regular state”.) Then TUTOR, in the regular state, comes to a judging command (-wrong-) which terminates the processing. TUTOR finishes up by placing an “ok” beside the student response. (Similarly, a match to the -wrong- would flip TUTOR to the regular state to execute the regular statement “write Count the sides!”)
When the -arrow- is finally “satisfied” by an “ok” judgment, TUTOR returns one last time to the -arrow- and searches for any other -arrowcommands in the unit. In this search it skips both regular and judging commands. In our particular example no other -arrow- is found, so all arrows (one) in the unit have been satisfied. After the student has read our comment, he or she presses NEXT and proceeds to the next main unit.
It may seem wasteful to you that TUTOR keeps going back to the -arrow- only to skip over the regular commands preceding the first judging command. It turns out that skipping a command is an extremely fast procedure, and that keeping a single marker (the location of the -arrow- command within the unit) greatly simplifies the TUTOR machinery.
In the example, the replies “Exactly right!” or “Count the sides!” would be displayed at location 2317, three lines below the response on the screen. This standard positioning can, of course, be altered by an -atstatement. Here is another illustration:
Suppose the student enters “wolf” as his response. TUTOR initiates the “judging state” just after the -arrow-. The first -answer- (dog) does not match, so TUTOR stays in the judging state and skips the “write A house pet.” There is a match to the following “answer wolf”, so judging terminates and the regular state starts. The “write A wild one!” is executed, not skipped. Next, TUTOR encounters a “wrong cat”, and since -wrong- is a judging command, this terminates the regular state. The student gets an “ok” judgment. TUTOR searches for another -arrowbut does not find one, so the student has successfully completed the unit. (Various units of this kind are illustrated with animated diagrams in the on-line “aids” available on PLATO.)
This method of processing judging and regular commands yields a readable programming structure, with judging commands delimiting the regular commands used to respond to the student. We have spent time discussing the details in order to simplify our later descriptions of the various types of judging commands used to match, modify, or store student responses.
It is important to point out that the -do- and -goto- commands are regular commands. They are, therefore, skipped over during the judging state and during the search state (looking for a possible additional -arrowafter an arrow has been satisfied). There is another command, -join-, which works much like -do- except that the -join- command is universally executed whether TUTOR is in the regular state, the judging state, or the search state. In particular, it is possible to -join- units containing judging commands, whereas a -goto- or -do- is incapable of accessing other units in the judging state (since these regular commands are skipped). Although the -do- command acts essentially like a -join-, it is, nevertheless, a regular command and is skipped during the judging and search states. Only the -join- command itself has the unique characteristic of being performed in all states (regular, judging, and search).
It is frequently useful to handle more than one response in a unit. Let's ask “Who owned Mount Vernon?” and (after receiving a correct response) ask in what state it is located but stay on the same page:
If you say “Jefferson” the -wrong- is matched. Regular commands are executed until you run into the second -arrow-, which ends the range of the first -arrow-. In other words, when you are working on one -arrow-, the next -arrow- is a terminating marker. If you say “Washington”, the student gets the “Great!” comment. Since the -arrow- is now satisfied, TUTOR starts at the first -arrow- searching for another -arrow-. In this search state, all commands other than -join- are skipped (-join- may be used to attach a unit that contains another -arrow-). A second -arrow- is encountered, which changes the search state into the regular state. The arrowhead is displayed on the screen and the location of this -arrowwithin the unit is noted. The regular commands following this second -arrow- are processed to display the second question. The final -answercommand stops this processing to await the student's response.
There is another way to do this which is probably more readable:
The -endarrow- command defines the end of commands associated with the first -arrow-. Note that -endarrow- changes the search state to the regular state. One benefit of this form is that the second arrowhead appears on the screen after the text of the second question, which often seems more natural.
It may seem rather abrupt that the “Great!” and “In what state is it located?” both appear on the screen at the same time. It might be better to let the student digest the reply before presenting the second question. We might insert a -pause- (with the tag “keys =all” ) just after the -endarrow-. Now TUTOR waits for you to press a key, (which signals that you want to go on) before presenting the next question.
The -endarrow- command is quite useful even in units which contain only one -arrow-:
The commands following the -endarrow- will be executed only after the -arrow- is satisfied, whether it be by the response “dog” or “wolf”. So this is a convenient way to finish up the unit.
While it is possible to -join- or -do- units which contain -arrowcommands, two seemingly arbitrary rules must be followed or you will get unpredictable results:
- A unit attached by -join- or -do- which contains one or more -arrow- commands must end with an -endarrow- command (possibly followed by regular commands).
- This attached unit must not contain any -goto- commands.
If you violate either of these rules, strange things will happen because TUTOR may “undo” from this unit several times (during judging, while processing regular commands, or in the search state).
If you follow these two rules, the -join- or -do- will act like a text-insertion device whereby your program will act as though you had inserted the attached unit where the -join- or -do- was. We will discuss these rules in more detail in Chapter 8.