The Story of a Mathematical Circle for Preschoolers introduces a programming language called Kid (p100). The language is a set of cards with symbols representing actions, such as Move Forward and Turn Left. Children have to arrange the cards to instruct a card robot to move about on a grid.
Oxygen and Ossicones has done something similar, and I had been meaning to try my own version for a while. I even got as far as making my own cards, but hadn't actually played with it. So I was very pleased when my my 5 year old got Bits & Bytes for Christmas.
The aim of the game is to move your character (Bit, Byte, Data or Perl) from their starting position to the home planet of RAM. Each turn, you move your character by showing one of four movement cards. The grid you move on consists of around 60 face down cards. As you move forward you reveal the cards, which may allow you move, block you, or send you back to your starting spot.
Our first game was very quick and not much happened. Maybe because I hadn't shuffled the cards enough, we only revealed wall and blank cards. Despite this, my 5 year old loved it and we immediately played again.
For the second game I changed the grid layout, moving the planet from the middle to the opposite end from our two characters. I also gave the cards a good shuffle and made sure the cards we didn't use were blank (so we were more likely to hit non-blank cards). This time, the game was a lot more fun, and we encountered bugs and the dreaded CPU (which sends everyone back to the start).
... we found an infinite loop bug in game.
For the third game, I made the grid longer and narrower, pushing the planet even further out of reach. This time we found an infinite loop bug in the game. I was one space from winning, when I uncovered the CPU, which sent us both back to out starting spots. Because of the arrangement of walls, I got back to the path to the planet one space ahead my son. However, to reach the planet and win, I had to go around the CPU. My five year old couldn't overtake me, but he could land on the CPU and send us both back to the beginning.
There was no way for him to win, but there was also no way to stop him stopping me from winning. It was quite an interesting lesson in how computers can go wrong. In the end, I went a different way, which allowed him to win. I later realised that you are supposed to turn all the cards face down when you hit the CPU card. That wouldn't necessarily affect the outcome, we'd just have to remember the way.
The next day, I read about the advanced rules on the website, so when he asked to play again, we gave them a go. In this version of the game, you put down as many move cards as you want on your turn. These represent your program, which you then run by moving your character step by step according to the cards until you hit a wall or bug. If you do, then you go back to the beginning and it's the other player's turn. Their rules say you flip the cards back over after your turn, but we left them visible so we could concentrate on programming.
This version of the game feels like a much better simulation of programming because you "write your program" as a series of instructions, and then run it to see if it works. It is also more a challenge, as you have to visualise where your character will be as you're writing your program. My son found it quite tricky. His most common mistake was to forget that when you turn left or right your character doesn't move a square, just change its orientation.
Most of the times when he made a mistake, I pointed it out, which maybe I should have resisted. A few times I let him run a program I knew was wrong, so he could see his character wonder off in the wrong direction. In those cases I let him have another go, so he didn't get too frustrated about making mistakes.
The picture shows our game near towards the end. At the bottom is my "program" to get my character from the bottom right of the grid to the planet. We were very unlucky and planet was almost completely walled in. To speed up the game I removed the CPU cards after we'd revealed them, but it still took us a long time. It would have required 25 moves for my son's character to get to the planet, travelling around most of the board.
Another good thing about these rules is that you can demonstrates the advantage of formatting your code to be more readable by organising your move forward cards into groups.
When we played it a second time, I removed the CPU cards as they didn't seem to make sense for this game. I also made sure that at least four of the eight cards around the planet where blank (though this meant that there were more walls near the start
This time my son played while I acted as the computer, running his programs. Rather than use the cards, he decided to write out his code using arrows. I thought this was a nice adaptation as it was quicker and even more like writing code. He did cheat a little by using the arrows to point the direction the character should move rather than have the character change orientation.
Another adaptation he introduced was to end the code with the word 'win', which is similar how some languages have an END command to indicate the end of the program. This worked beautifully as a delimiter when he wrote one program after another with no spaces.
The first thing to say is that my 5 year old loves this game and wanted to play it again and again. When I had other things to do, he used the cards to invent his own games. I found the game was pretty enjoyable, enough to play quite a few games. I like the mechanic of using face down cards as a board because it makes adapting the game very easy.
The game was occasionally frustrating because of the walls. The rules say that if you are completely blocked in you can remove an obstacle, but you can spend many turns charting every corner of your world before finding all routes are blocked. I didn't want to reduce the number of walls too much as then the game is over too quickly. I wonder if we could introduce a card that allows you to cross a wall (but you can only use it if there is a wall in front of you).
In terms of introducing programming concepts, I'm a pretty sceptical. The website says that because the planet is called RAM and the antagonist is called CPU "...children learn by association and understand how computers actually work", which seems optimistic. Having said that, my son did ask what bits and bytes meant, so I was able to attempt to explain binary numbers.
I found that the simple version of the game only had a very tenuous connection to programming, though it was fun to play. The advanced rules are much better for introducing the idea of writing a set of step-by-step instructions for a computer to follow. And there was value in both writing the program and being the computer interpreting the program. For a real introduction the programming concepts, I think the Kid language is much better - having for loops and if statements. I know there are function gems, which can work like if statements, but they seemed a bit tacked on and unsatisfactory, so I didn't try. I should probably try them before I write them off.
The most valuable thing about the game was that it really inspired my son. He kept wanting to play, and invented his own games using the cards. Afterwards, I went to the library and got an introduction to coding book, which explains how to use Scratch and the turtle library in Python. He was really excited about Scratch, though I had to do most of the work. At one point, he asked when we were going to play the game. Apparently he thought that programming meant playing a game like Bits & Bytes. I said that there wasn't any game unless we made one ourselves. Then he really wanted to make a game...