Student Misconceptions About Kodu
(a work in progress)
David S. Touretzky
"Bump" is not an action; it's a predicate.
Students think bumping is equivalent to eating or grabbing, rather
than understanding that "bump" is a sensory predicate like "see". Two
factors promote this misconception:
- The kodu does physically push an object when it bumps it at the
end of a pursuit, if they have compatible heights.
- A physical "bump" is an action students can cause (by
writing a pursue rule), whereas nothing they know how to do at this
stage can cause "see" to become true.
Solution: emphasize that "bump" is a sensory predicate, not an action,
which is why it appears in the WHEN part of the rule, not the DO part.
A page of rules is not a sequential procedure, as it would be in Scratch.
Students may think that the ordered list of rules on a page is to be
executed sequentially, e.g.:
[1] WHEN see apple DO move toward
[2] WHEN bump apple DO eat it
[3] WHEN see coin DO move toward
This misconception is aided by the fact that the ordered rule list
does look like a sequential procedure and can be sensibly interpreted
that way (by the reader, not by Kodu). Furthermore, we tend to write
rules in the order in which they should be performed, e.g., rule 2
"naturally" follows rule 1, although they could go in either order.
But Kodu rules are sensitive to order in one respect: the
actions of all rules firing on a given cycle are performed
sequentially, which is crucial for correct score assignment and for
the short circuit feature of "switch to page".
Nonetheless, over multiple rule cycles execution is not sequential.
After pursuing and consuming its first apple (rules 1 and 2), the
character will not move toward the coin (rule 3) unless there are no
other apples present.
An indented rule is tied not to the parent rule's action; it's tied to its predicate.
An indented rule will execute whenever the parent's predicate is true;
the parent's action may not even be feasible. For example, consider
what this program does when an apple is out of reach:
[1] WHEN see apple DO eat it
→ [2] WHEN DO score 1 point
The eat fails if the apple is out of reach, but the score will still
be incremented. Since the uneaten apple persists, both rules will run
repeatedly.
A rule's action does not execute before the next rule's condition is evaluated; all
conditions are evaluated first, then the actions are performed.
(Details to follow.)
|