Recursion is convoluted and difficult to understand -- at least for a student like me. The way that my teacher introduced it was to have us play around with a
game called Cargo-not that implemented basic recursion with a drag and drop programming system. The problem was, the game didn't really give players a realistic view of why recursion was powerful. The power in recursion lies in the fact that a function using recursion can call itself on different parameters. This lets recursion efficiently divide a large problem into smaller chunks, allowing the problem to be solved using dynamic programming.
I feel that while Cargo-not was a great game, it did not show me the true potential of recursion. Go ahead and try the game out, I'll wait. Okay, done? Now let's examine why I feel this game is not appropriate for teaching purposes.
The game makes it too easy to simply hard-code answers to the problems.
The game uses a star system to reward players based on how concise and efficient their code is. Ideally, code that utilizes recursion more efficiently will have less command blocks, because it manages to use recursion instead of repeat the same line of instructions over and over again. The code for moving all the way to the left could be written two ways:
 |
| Inefficient, 0/3 stars |
 |
| Smooth and simple, recursively supreme |
The different between these two algorithms would be 3 stars, which might be enough motivation for a completionist, but I found that for most of my classmates, simply completing each problem was enough of a challenge for them. The game did not guide us towards finding the best solution to each problem, rather, it led students towards hard coding the answer.
No comments:
Post a Comment