Peanut Butter and Jelly Ending
I have a task that I started with a group of 4th-6th graders at the beginning of a short course on Artificial Intelligence. In order to demonstrate how exact computers are about their instructions, I've created a strict syntax for a fictional robot and a series of environmental specifications. The students must use the syntax provided (in something resembling an API) to generate commands that the Robot will ultimately use to create a Peanut Butter and Jelly Sandwich.*
I've also created a little engine that can run this all at the command prompt, and gives back useful errors if the students either generate a syntax error (ie. take rightHand plate
instead of take plate rightHand
) or attempts an illegal action (such as take plate rightHand
when rightHand
is already full). I have not yet given them access to the engine; they spent the last 15 minutes of the previous period trying to generate a full set of working instructions from the specification, and they had a lot of fun doing it!
I have a vague notion about what will come next; I want to integrate allowing them to copy/paste their instructions into the engine to see if they have run into trouble, and creating an actual PB&J sandwich (or whatever components of that sandwich they've actually managed to make.) I have already checked about allergies to peanuts, so we should be safe there.
What I don't quite see is how to integrate those two activities so that it won't get bogged down. If I enact the PB&J creation faithfully, I won't be able to do it for every child. If I ask them to create it, they might just change their commands as soon as they see an error, which would let everyone get a sandwich, but wouldn't be as fun.
The lesson has had a great start. How can I finish it up to make it into a home run?
* - I know that folks in some countries don't eat Peanut Butter and Jelly sandwiches. That's fine as far as it goes, but please know that you are wrong.**
** - Unless of course you are allergic to peanuts.