Tuesday, November 24, 2015

another race to 100 game

Today's game at the math classes was not particularly well liked, but we are including this note for completeness and future reference.

Race to 100

how many players: 2-5
material: 1d6, 100 board, position markers (the kids made their own out of play-dough)
start: all players start on 1 on the 100 board
turns: each player's takes a separate turn. They roll the dice, then move their piece up the 100 board some multiple of the dice value (up to 10x).
winning: first player to get exactly to 100 wins

This game practices multiplication, skip counting, and factoring. Here are some example questions to stimulate thinking about game strategy:

  • Would you rather have your piece on 99, 98, or 96?
  • What about 71 and 70?
  • If you are on 88, what are your chances of winning on the next roll?
Game reception
The kids found this game fairly easy. In retrospect, perhaps we should have played this game before the Times Square factors game.

Potential extension
The game is nicely suited to analysis by working back from the higher positions and/or analyzing a simpler version of the game. This may be a nice exercise for our programming classes, especially as we have recently been working with arrays.

Sunday, November 22, 2015

Love Letter (game review)

A very quick note on a fun game with some cool opportunities for practicing logical inferences and probability. Upfront, I want to say that this review is not sponsored or supported in any way. Indeed, you will see below that we managed to play the game without even using an official set of cards.

The game is Love Letter. It is a knock-out card game using a set of special cards where, mostly, you try to figure out what cards the other players have. Here are the cards; you can see each has a number in the upper left corner (a level) and a description of its action below the picture:

Each player has only one card in their hand, which they keep secret from the other players. On a turn, the active player draws a card, then chooses which of their two cards to play down, thereby activating that card's action. For example, if a player puts down a guard, they then choose another player and guess what card that player is holding.

There are only 16 cards in the deck: 5 guards, 2 each of Priests, Barons, Handmaids, and Princes, one King, one Countess, and one Princess. If, through game play, all but one player is eliminated, then that player gets a point for the round. If the deck of cards is exhausted first, then the player holding the highest level card wins that round.

Playing today with the two older J's, we simulated the deck with normal playing cards with the following mapping:

  • 4 aces and a joker in place of the Guards
  • two 2s in place of the Priests
  • two 3s for the Barons
  • two 4s for the Handmaids
  • two Jacks for the princes
  • one king for the King
  • one queen for the Princess
For the 6 and 8 year old, it only took one or two rounds for them to pick up the powers of the cards.

Here are some sample deduction scenarios that came up during play and surrounding discussion. I will leave them as exercises to you readers:

  1. You play a Priest against Player A and see she is holding a handmaid. On her next turn, she draws and plays a Guard. What card is she holding at the end of her turn?
  2. You are the first to lead the round, holding a Baron and draw a Guard. What should you play?
  3. What is the implication if a player has the King and Princess at the same time?
  4. Player A puts down the Baron and forces Player B to compare. B losses and puts down the countess, dropping out of the round. What card is player A holding?
  5. With two remaining players, you are holding a King and Guard. Which card should you play?

Overall, the game was a lot of fun, easy to pick up (even using surrogate cards), and led to some fun logic mini-puzzles. It also links readily to concepts around public, private, and asymmetric information which I'm sure we will be exploring as we play the game more.

Wednesday, November 18, 2015

Times square variations (math games classes)

In grades 2 and 3, we have been playing with variations of NCTM's game Times Square, one of their offerings on Calculation Nation. This is one of my favorite multiplication games because, like the puzzle Bojagi, it is fun and multiplication is integral to the game, it isn't just a set of flashcards in disguise.

Here's a basic Times Square board:
The AI doesn't understand edge vs center!
Players take turns moving one of the square windows at the bottom to select two numbers, then get to take possession of the square that is the product of the values the windows are on. In our starting game, the AI moved the first window to 6, I moved the second to 5 and captured 30 (5x6). The AI then moved from 6 to 1 and captured 5 (1x5). On their turn, the player can move either window, but has to capture an open area (you can't duplicate a product you've already captured or take over an area your opponent has previous captured). The first person to get 4 in a row wins.

A pen and paper version
We didn't have (or want) computers for all the kids to play online. Instead, we created a simple paper and pencil version. We made many copies of the board on a piece of paper, with the numbers 1 to 9 at the bottom. We then used small rubber bands (loom band left-overs!) to select the factors and players used colored pencils to claim their territory.

It was an easy, colorful, and fun implementation of the game:

Notice the sad faces where mom/dad won that round?

Noticing the structure
As usual with this kind of activity, there are many possible extensions, with two obvious groups being strategy (how do you win the game) and structure (what do you notice and could change about how the game is set up).

So far, we have been looking at structure. Here are some of the things we discussed relating to the basic board:
  1. What shape is the playing board? How many numbers are on it?
  2. What is the largest number? Why aren't there that number of spaces?
  3. What is the smallest number (positive integer) that isn't on the board? Why?
  4. What numbers are missing from the board?
  5. If we say an integer between 1 and 81, can you tell, without looking, whether it is on the board?
Make it simpler
The next iteration was an exercise in simplifying. Do we need to use all factors 1 to 9? What if we made an easier game with factors 1 to 4? Here is the version we came up with:

Surprise, surprise, we can still make a nicely shaped grid! Now, we aim for 3 in a row, like standard tic-tac-toe, but with a constrain that means we can't always move where we would like. With this simplified version, maybe we can go back to our strategy questions and gain some wisdom that will help for the 1 to 9 version?

Make it more complicated
What if we wanted a harder (calculation) challenge than 1 to 9? Are there other collections of factors that would give us nicely shaped grids? We had them work out creating a grid based on factors 1 to 13.

It was really interesting to see the different strategies that the students took to determining what would go on their boards. Some people tried creating full multiplication tables and then removing duplicates. Other people counted up from one and tested each number as they went along. Some people identified patterns, essentially working with the diagonal and upper half triangle of a multiplication table.

Here's a student, hard at work calculating the 1 to 13 board:

In this case, there are 72 distinct products, so the students also had a choice of making near-square boards that are 8x9 or 9x8. We didn't guide them to these shapes, but it was interesting that no one made a 6x12, 4x18, 3x24, 2x36, or 1x72 shaped board, 

For the 8x9 and 9x8 boards, we had them take some time to play on each version. Does play feel different on the two different boards? Is there a different strategy for the two boards? Perhaps you will also experiment with this.

Further exploration

A sequence
How is the sequence 1, 3, 6, 9, 14, 18, 25, 30, 36, 42, 53, 59, 72, 80, 89, 97, 114, 123, 142, 152... related to this game? These are the numbers of distinct products of the integers 1 to n as n grows. What can we say about this sequence? For example, how quickly does it grow with n? Is there a closed form for the nth term?

Can we see anything interesting if, instead of using integers 1 to n, we use a different collection of n integers? For an easy one, try using the first n primes. Maybe using n integers that are in an arithmetic sequence would be interesting?

This simple pencilcode program could get you started on gathering some data: TimesSquareBoards.

For some light, related reading: Number of Integers with a divisor in a given interval (Ford 2008) which was linked on this Math Stackexchange question.

Strategy and Structure
Ok, so we can take factors 1 to n, then create a board that arranges the distinct products into a rectangle. Because we see primes in the sequence above, we know that some of these rectangles are just 1 x p (or p x 1) shaped.  Even so, what can we say about winning strategies:
  • When does the first player have a winning strategy?
  • When does the second player have a winning strategy?
  • When does optimal play by both players lead to a tie (like classic tic-tac-toe)?
  • Are there n for which differently shaped boards have different winning strategies? Is there an n which has 3 differently shaped boards that cover each of the different strategy outcomes (one that is a first player winner, another that is a second player winner, a third that ends in ties?)
In particular, I think it would make for a delightful bar bet if, say, the first player had a winning strategy for the 8x9 board, while the second player has a winning strategy for the 9 x 8 board!

A picture, just for the heck of it

Having nothing to do with any of this, what estimation and math questions do you have about this picture:

Yes, these are gold, but just covered with gold leaf, not solid!

Tuesday, November 17, 2015

Half-time scores

This discussion was suggested by a commenter who was asked this question in a math class, presumably as a "real world" word problem. These are just some rough notes relating to a string of conversations we've been having around this idea.

The scene
Our friend calls excitedly to tell us about the football (aka soccer) game she just saw: "[favorite team] was leading 2-1 at halftime." Suddenly her phone runs out of batteries and we don't get the final result. Can we figure out what it was?

A math class answer

4 to 2 victory for our side, of course. This is the naive model where the scoring rate is constant over the course of the game, so 2x as much time means 2x the score. Nonsense, for anyone who has a passing familiarity with the real game.

In discussion, one of the J's offered 3 vs 3 as an alternative and explained his thinking was that they change ends at half-time. The underlying model was that the direction of play determined the outcome. Quite a strange model!

Some stats

Given a half-time score, what can we say about the final result?
  1. scores go up, so the interim score for each team is the least they could have at the end
  2. Intuitively, the team leading at half-time is likely to win the game
There is some intriguing data related to half-time and full-time scores on the OptaPro Blog and they have a further link to the Football Observatory. One thing we saw right away is that 2 -1 and 1-2 halftime scores are fairly uncommon (about 5% of the sample games, when taken together). Perhaps this is why 2-1 and 1-2 halftime scores weren't included in some of their conditional tables, though, together, that was still about 970 matches (17,656 * 5.5%).

Corroborating our intuition from point 2, we looked at the 1-0 and 0-1 lines in their table 6 to guess that 2-1/1-2 matches would also have roughly a 30% chance of a change in outcome. The table doesn't specify whether the change is to a tie or a change of winner, but we guessed that the latter was less than half the change cases.

Comparing with other sports

The last topic we discussed was to compare with other sports, for example professional basketball.
First, if we kept the scores unchanged (2 vs 1 at half-time), then we know that we are watching an extremely unusual basketball game. At that point, we are so far into the tail of the distribution that it is hard to know what is happening and very dangerous to make guesses about the rest of the game.

Second, let's say that we have a more reasonable half-time score, but one team leads by a single point. We aren't so familiar with NBA results and I couldn't find a great stats source, but we assumed one team had 51 points and the other 50. In contrast with football, we concluded that this was not likely to tell us much at all about which team would win at the final whistle.

What if, instead, we assume a 60-30 point split? Well, in this case, we reasoned that a guess of 120-60 was much more reasonable because each scoring event is much small and more frequent than in football. Also, we were much more sure that the leading team at half-time had demonstrated  statistically significant strength relative to the trailing team. We were pretty confident that they would win in the end.

However, we also recognized that confidence was not mathematical certainty. Even in basketball, scoring doesn't happen at a continuous rate. Also, it was easy for us to come up with events (player substitution, player injury, change of strategy, fatigue) that would create a different scoring rate in the second half.

Your turn

What about you? Have any favorite "real world" questions from math class that, when you use your own real world experience, are actually very silly? Any beloved sports which you think offer another point of comparison for our discussions? Maybe games like cricket, baseball, or tennis where the end of the game is not determined by time?

Tuesday, November 3, 2015

Loop-de-loop festival (math games and programming classes)

who: all grades at Baan Pathomtham
when: throughout the school day

First, Apologies! With other obligations, this is over a week late.

Second, I've already written about loop-de-loops here and here. You can find the basic explanations and background there.

In this write-up, I just want to explain how we played with loop-de-loops in the classroom and the reaction of the students. With pictures! Our experiences come in two flavors, based on the two different kinds of classes we were leading:

  • Math games/exploration, for grades 1-3, notes here
  • Programming, for grades 5 and 6, notes here

Math games and exploration

In these classes, I started at the front of the class with a small(ish) whiteboard to show them the simple rules. Following Anna Weltman's instruction page, I drew a 2-3-4 loop-de-loop as follows:
  1. Draw a line up the page for 2 units (I marked ticks to provide a reference for 2 units)
  2. Turn the whiteboard clockwise 90 degrees
  3. Draw a line up the page for 3 units
  4. Turn the whiteboard clockwise 90 degrees
  5. Draw a line up the page for 4 units
  6. Pause and ask the kids what they thought I would do next, with a little discussion, then ...
  7. Turn the whiteboard clockwise 90 degrees
  8. Ask them how long a line I should drawwith a little discussion, then ...
  9. Draw a line up the page for 2 units
  10. Ask them, if I continue this 2, rotate, 3, rotate, 4, rotate, 2, rotate, 3, rotate, etc, will I get back to my starting place? After a little debate amongst the kids with opposing views expressed, I turned them loose to try it out on their own graph paper.
For the rest of the class, the kids asked me for more seeds and/or experimented with their own ideas. A couple are worth noting:
  • 3-5-2: This is on Anna's instruction page. The kids found it surprisingly challenging. The issue comes during one step where you end on a pre-existing line, but not at one of the endpoints. That seemed to make it easy for people to lose their place or get confused about what they should do next.
  • 4 number sequences: both closed loops (like 4-7-4-7) and open ones (1-2-3-4) really interested the kids. I have a (mild) reputation for teasing them, so they were somewhat on the look-out for a twist like this.
  • 6 number sequences: they discovered these on their own or had a more experienced friend suggest them.
Why was this a great activity for the kids?
First, mathematically, there are tons of patterns waiting to be discovered, almost all of which are easily accessible and where the kids can set their own direction for exploration. We will write up an example in next post about the math classes.

Second, this shows some important aspects of mathematics that we often forget: it isn't just about calculating and it has a deep aesthetic (artistic) side.


The basic introduction was similar for the two programming classes. I showed the essential rules, then the kids drew some loop-de-loops on paper. Of course, the natural next step is writing a program to generate the pictures.

After more or less coaching, all the kids wrote a double for loop to draw their loop-de-loops.

Why was this a great activity for the kids?
First, it was a very natural context to use double for loops, including an outer loop where the steps are just repeated exactly and the other where the iterating variable changes as it moves through a list of step sizes.

Second, repeating, exactly, a list of instructions over and over shows off the power of the machine over hand-calculating. In this sense, it was easier to create programs to draw loop-de-loops than to draw them by hand. When doing them manually, almost all of us occasionally lost track of where we were, turned the wrong way, or made a line the wrong length.

Which brings us to: third, we got to use the computers as a tool to support our own investigation of the loop-de-loop patterns. This was because it was so easy to draw so many versions so quickly. One example was comparing the 1-2-4 shape with the 4-1-2 shape and the 4-2-1 shape. Wait for the next post for another example.

Fourth, when writing their programs, all the kids scaled their drawings.  For example, in the 1-2-4 shape, some chose to make the step lengths 100-200-400, while others chose 25-50-100, while others made different choices. This gave us a chance to talk about these scaling choices and to introduce an explicit scaling variable. Some of this continued into the next class.

Finally, in the 6th grade class, the use of computers gave them free rein to explore much longer and more complicated step sequences than they could have considered by hand.


Oh, right, you just wanted to see pictures. Here you go!