# Games in the Classroom #4: Stone Age (Part 1)

Q1. You’re playing Stone Age.  You place 2 workers on gold, 2 on brick, and 1 on food.  What is the expected amount of each resource you’ll collect?

A1.  Let G, B, and F be, respectively, the number of resources we get.  Let X, Y, and Z be the rolls.

• P(G=0) = P(X in {2,3,4,5}) = 10/36
• P(G=1) = P(X in {6,7,8,9,10,11}) = 25/36
• P(G=2) = P(X=12) = 1/36
• (AN: Sorry, can’t use summation notation in wordpress) E[G] = 0 P(G=0) + 1 P(G=1) + 2 P(G = 2) = 0(10/36) + 1(25/36) + 2(1/36) = 27/36 = 0.75 gold

Similarly, we find E[B] = 49/36 = 1.36 brick and E[F] = 9/6 = 1.5 food.  This a simple exercise in expectation for discrete random variables.

Q2. You have the same situation as before, but now you have a single tool.  Assume you roll for resources in order: gold, brick, food.  Also assume you use the tool if it will allow you to gain an additional resource but otherwise not.

A2. Let event TG be true if we have the tool before rolling for gold, and similarly for TB and TF.  (One of the problems with probability notation is using capital letter for both events and random variables.  Have to think of an alternative.  Maybe Roman and Greek letters?)  Furthermore, let TGc be the complement of event TG, and similarly for the others.  We have already calculated:

• E[G|TGc] = 3/4
• E[B|TBc] = 49/36
• E[F|TFc] = 3/2

We should recalculate the expectations given the tool (the calculations are very similar to the above, so they’re omitted):

• E[G|TG] =  33/36 = 0.92
• E[B|TB] = 59/36 = 1.63
• E[F|TF] = 2

Also, we should calculate the probability that we retain the tool after rolling for each resource:

• P(TB) = P(X not in {5,11}) = 30/36
• P(TF) = P(TF|TB) P(TB) + P(TF|TBc) P(TBc) = P(Y not in {3,7,11}) P(TB) + 0 P(TBc) = (26/36)(30/36) + 0 = 65/108

That last line comes from the law of total probability in conditional probability since {TB,TBc} is a partition of the event space.  Finally, we can use the analog of the law of total probability for condition expectation:

• E[B] = E[B|TB] P(TB) + E[B|TBc] P(TBc) = (59/36)(5/6) + (49/36)(1/6) = 344/216 = 1.59 brick
• E[F] = E[F|TF] P(TF) + E[F|TFc] P(TFc) = (2)(65/108) + (3/2)(43/108) = 389/216 = 1.80 food

In summary, by adding 1 tool, a player in this situation can expect 0.17 extra gold, 0.23 brick, 0.30 food, which I estimate to be worth 2.6 pips that turn, and you get to use the tool every turn.  This is why tools are a good investment.

Q3. Instead of having 1 tool, say you now have 5 and then you roll a 7 for gold.  Do you use all 5 tools to get an extra gold, or do you save the tools for the other rolls?  Because it possible to get as many as 8 pips (1-2 tools for one brick, 3-4 tools for two food).  This is a trickier problem which I’ll save for Part 2.

# We Can Rule You Wholesale

(I have a bad habit of using in jokes in titles, which means a year later I can’t find the post I’m looking for.  Anyway, the title is the name of the Ankh-Morpork national anthem.)

I’ve been eagerly Martin Wallace’s Ankh-Morpork ever since it’s been announced because I’m a huge Discworld and boardgaming fan, even going so far as ready my mind and my wallet to buy the Deluxe edition when it comes out.  As for the other Discworld game in the works, Guards! Guards!, not so much.

Anyway, details of all 3 versions of the game are finally out:

• Basic (\$40 from ThoughtHammer/most online retailers)
• Smaller board (22.5″ x 17″)
•  132 cards
• 79 wooden pieces
• 12 trouble markers (plastic?)
• Cardboard money
• 4 player aids
• One 12-sided die
• Rules
• Collector’s edition (\$75 including international shipping, only direct from TreeFrog)
• Same as Basic except…
• Larger board
• A specially cast 12-sided die that replaces 8 with 7a
• A poster with game artwork (since most of the artwork went into the cards, I’m guessing it would look like this)
• Deluxe edition (price estimate of \$160 + \$15 shipping, also only direct from TreeFrog)
• Same as Deluxe except…
• Replace the wooden pieces with resin cast pieces.  A picture of the sculpts can be seen here.  Most likely, the minions and buildings will come in player colors while the trolls and demons will different.  The pieces won’t be painted, but they will be given an ink wash to give them a weathered look like Isle of Lewis chess pieces.

The bottom line is the bottom line: I can’t really justify paying that much for resin pieces (players will be handling the minions a lot, and they look like generic thugs).  Nor can I justify paying double for a larger board and different die.  So I guess what I’m saying is that, despite my Discworld fanaticism, I’m going Basic.

# Games in the Classroom #3: Can’t Stop

Here’s an example of using conditional probability to solve for a result in Can’t Stop.

Q. What is the probability of rolling at least one 7?

A. Let A, B, C, and D represent the four dice rolls.  Because of symmetry, it doesn’t matter what A is.

There are 3 cases to consider for B:

1. B = 7 – A, a 1-in-6 probability, in which we have failed to not roll a 7.
2. B = A, a 1-in-6 probability.
3. Otherwise, a 4-in-6 probability.

Therefore, after 2 dice, we have 3 cases:

1. 7 has been rolled: probability 1/6
2. Only 1 unique number has been rolled: probability 1/6
3. 2 unique numbers have been rolled (that don’t add up to 7, which I’ll leave implied): probability 2/6

1. P(7 has been rolled after 3 dice) = P(7 has been rolled after 3 dice | 7 has been rolled after 2 dice) P(7 has been rolled after 2 dice) +  P(7 has been rolled after 3 dice | 1 unique number after 2 dice) P(1 unique number after 2 dice) +  P(7 has been rolled after 3 dice | 2 unique numbers after 2 dice) P(2 unique numbers after 2 dice) = (1)(1/6) + (1/6)(1/6) + (2/6)(4/6) = 15/36
2. P(1 unique number after 3 dice) =  P(1 unique number after 3 dice | 1 unique number after 2 dice) = (1/6)(1/6) = 1/36
3. P(2 unique numbers after 3 dice) =  P(2 unique numbers after 3 dice | 1 unique number after 2 dice) P(1 unique number after 2 dice) +  P(2 unique numbers after 3 dice | 2 unique numbers after 2 dice) P(2 unique numbers after 2 dice) = (4/6)(1/6) + (2/6)(4/6) = 12/36
4. P(3 unique numbers after 3 dice) =  P(3 unique numbers after 3 dice | 2 unique numbers after 2 dice) P(2 unique numbers after 2 dice) = (2/6)(4/6) = 8/36

Sanity check: these add up to 1.  Finally, the 4th die:

•   P(7 has been rolled after 4 dice) = P(7 has been rolled after 4 dice | 7 has been rolled after 3 dice) P(7 has been rolled after 3 dice) +  P(7 has been rolled after 4 dice | 1 unique number after 4 dice) P(1 unique number after 4 dice) +  P(7 has been rolled after 4 dice | 2 unique numbers after 3 dice) P(2 unique numbers after 3 dice) +  P(7 has been rolled after 4 dice | 3 unique numbers after 3 dice) P(3 unique numbers after 3 dice) = (1)(15/36) + (1/6)(1/36) + (2/6)(12/36) + (3/6)(8/36) = 139/216 = 59.7%

Of course, all this should be rewritten in the usual mathematical notation so it’s a bit easier to read.

However, I’m having trouble coming up with an elegant solution to what is the likelihood of busting if your columns are 6,7,8 or 5,7,8, etc.  I think it becomes a rather tedious counting problem, not much better than just having a computer exhaustively check every possibility.  Even the probability of rolling any other number (like 8 ) becomes complicated once we lose the symmetry.  That may be an important lesson in itself.

# Games in the classroom #2: Semester project

THIS IS A DRAFT.  This is an untested outline for a culminating project for a course in probability (or the probability portion of a probability & statistics course).

(Updated: 27 Aug 2011.  Acknowledgements: Danny Tan, David H, Nate Straight)

Overview: Games constantly ask players to make decisions that will help them win the game.  In many games, deciding what the best move is involves some math, and therefore these games are a good way to exemplify many mathematical ideas and provide venues to practice skills.  Through analyzing a game and producing a strategy guide, students will apply course concepts to solve a non-trivial problem.  The project also seeks to engage student interest with fun activities (i.e. playing games).

1. Introduction.  Early in the semester (first week or even the first day while explaining the syllabus), state that there will be a semester project.  The goal of the project is to produce a strategy guide for a game of the students’ choosing.  Along the way, students will identify and explore key decisions and apply mathematical concepts from the course to explain their choices for these decisions.  Furthermore, students will have the option of using an existing game or creating their own.  As we haven’t introduced many of the mathematical concepts that can be used, we can’t go into much detail in that respect right now, but we can introduce a number of games to give students an idea of the games and decisions we’re talking about.

2. Getting started.  By about 2-3 weeks in, students should have been introduced to some basic concepts (e.g. events, probability of events, independence, union/intersection/complement events, conditional probability) and several games, including all of the teacher suggested ones below.  They probably have 1-2 problem sets under their belt too, and some may have study groups.  This should provide them with enough background knowledge to get started on the project.

Students will form groups of 4.   Prior to forming groups, poll the students on which games seen so far they have enjoyed the most / are interested in working on.  Post the results so students can use it to find people who want to work on the same problem as them.  There should also be an option in the poll for people who want to design their own game.  However, emphasize to students that they are not pressured to form groups according to the poll results, nor are they required to do the game they specified in the poll, and they are encouraged to form a group with their existing study group.

What are the roles within the group?  This is so various parts can be delegated to different team members, who become responsible for them.

Each group should now decide what game they want to analyze (from a list of suggestions or supplying one of their own) or design one of their own.  Tell the students that groups that design their own game will do about 2/3rds the analysis of other groups to compensate for the work in designing a game.   Furthermore, their games should be able to accommodate 4 or more players and aim to finish in 30-60 minutes (times are for players who are well-versed in the rules; add 50-100% play time for new players).  Descriptions of various games will be provided to give students a range of games to choose from and to give ideas to students who are designing their own.

3. Group exchanges.   Throughout the semester, groups will meet with one another to show what progress they have made and provide feedback to each other.  Groups will need to make at least one meeting in every 2-week period, rotating between different groups.  Meetings should take about half an hour, though week 10 may take longer.  A suggested format is for groups to split into pairs: one pair will explain their project to members of the other group; the second pair gives feedback to the other group.  Here is a tentative schedule for groups that are not designing their own games:

• Week 4: Strategy brainstorm.  Play the game, at least partially, so the players get a feel for the game.  Discuss strategies and from there what are the key decisions players face.
• Week 6: Knowns and unknowns.  Focus on one key decision the group has identified.  Discuss what you know and don’t know about the problem.  What information is relevant to the decision?  What course concepts would you apply to decide upon a choice?  If you are stuck on a problem, what knowledge or plan of action might get you unstuck?
• Week 8: 1st key decision.  Present as full of an analysis of one key decision as you have.  See the project rubric below for what constitutes a full analysis.
• Week 10: Playtest!  Play a full game against people in the other group.  Does your strategy work?
• Week 12: 2nd key decision
• Week 14: 3rd key decision

And a schedule for those that are designing their own games:

• Week 4: Brainstorm.  The group should describe the theme and/or the central mechanic(s) of the game.  What would make the game fun and interesting to play?  What details can be added/removed?  (Note: in game design, it is often very easy to add new things but harder to remove them.  Game designers should determine what is essential to the game experience and what is irrelevant/distracting.)
• Week 6: Prototype.  The group should have rules and a physical prototype of their game (artwork and such optional) and play it with the other group.  Get feedback on what works (i.e. is fun) and what doesn’t.
• Week 8: Knowns & Unknowns.
• Week 10: Playtest!  While the group can tweak their game up until the final deadline
• Week 12: 1st key decision
• Week 14: 2nd key decision

After each meeting, both groups should submit a short memo (2 paragraphs) summarizing the feedback they received and the feedback they got.  One copy of the summary should go to the other group, one copy goes to the teacher to make sure groups are procrastinating.  The summary is graded purely on completion.

The meeting during week 10, the week for playtesting, will probably take longer than usual.  However, it should be more fun and less brain intensive than other meetings.  This may be a good way to relax after a midterm.

4. Checkpoints.  Twice during the semester, the group will turn in a more substantial report in addition to the short summary.

After week 4, students will submit a 1-page project proposal.  The proposal will give the game (or a description of the game, if they are making their own) and point out at least one key decision they plan to analyze.  It is okay if they cannot fully analyze the decision right now, as much of the course is still to come.  The purposes of the project proposal is 1) to make sure students haven’t picked a problem that is too easy or too ambitious; and 2) to give the teacher feedback on which course concepts may be important to various groups, so emphasis can be placed at different parts of the course as needed.  The proposal will be mostly graded on completion, with maybe 20% reflecting how much thought the students put into the problem.

About week 9 (by this point, all of the basic ideas should have been introduced, such as conditional expectation, but more advanced concepts like random processes probably have not been broached yet.), groups turn in a progress report.  For groups designing their own game, this should describe their game mechanics, including their current rulebook, and preliminary analysis of the two key decisions they plan on studying.  Their choice of decisions should follow the description of game mechanics.  For other groups, they should identify the three key decisions they plan to analyze and provide as much of their analysis for one key decision as they have.  Again, the purpose of the checkpoint is to make sure students have not trivialized the project or are procrastinating.  Again, grading will be 80% completion, 20% content.

4. Final product.   Groups who designed their own game will deliver the following:

• A copy of their game, including all game components (give suggestions for ways to produce print & play components) and rulebook.  This will be returned to the group afterwards.
• A strategy guide analyzing at least 2 key decisions.

Other groups will deliver a strategy guide analyzing at least 3 key decisions.  The analysis of these key decisions should be thorough: students should identify what decision the game is asking the player to make, what information is relevant to picking the optimal decision, what course concepts they used to solve the problem, showing one or more examples they solved, and providing strategy advice to players.  It is important that these key decisions not be trivial; as a rule of thumb, any probabilities/calculations should take the teacher at least 5 minutes to solve.  The project asks the students to apply course concepts to answer substantial questions.

The project rubric will reflect these objectives.  For example: 25% each for 3 key decisions, each one broken into components as described above; remainder split between readability/clarity of the strategy guide and oral presentation; for groups designing their own games, replace 1 key decision with an evaluation of their game design (whether their game contains interesting decisions that can be solved with math; rules clarity; component aesthetics).

In place of project presentations, the class can have an end-of-the-semester game convention where groups demo their game, explain their findings, and play other groups’ games.

I like TV shows with an ensemble cast: Arrested Development, Firefly, and Community.  I like the variety of characters and their motivations and the group dynamics that result from them mixing.  So here is an idea for a Community fic.   I may not go the full Primetime Adventures route, but it’s now always in the back of my mind when I start writing.

• Premise: Duncan (in an uncharacteristic moment of  teaching authority) says their next assignment (field trip?) will be done in groups of 4 (or 3? or 5?).  This exposes faults in the study group as they try to pick and choose who they want to work with and who they don’t.
• Setting: Greendale Community College, the school with standards so low, they accept everyone, faults and all.
• Tone: It’s Community.  It’s supposed to be funny.

My sketch of the characters is this:

• Jeff: wants to be with Annie.  However, later it is revealed he primarily wants to work with her because she does the work and gets good grades.  That cheeses her off because she was hoping it was for other reasons.
• Annie: wants to be with Jeff.  UST…
• Shirley: wants to be with Annie and Britta because she’s tired of being the woman left out.
• Pierce: wants to be with Jeff, because he’d like to be Jeff’s father figure.  Wants to be with Annie because she’s his favorite.
• Troy: wants to be with Abed.  Duh doy.
• Abed: wants to be with Troy.  Duh doy.
• Britta: wants to be with Jeff.  UST…  No, that’s not right, because it’s been resolved.  Jeff is still Britta’s main foil in the group.

The majority of the conflict in the early scenes will stem from people who want to work with Jeff and/or Annie.  Troy & Abed will spinoff to avoid most of the trouble.  One issue is that everyone would rather be in a group of 3, but no one wants to be the loner in a 3/3/1 split.  So it becomes (1) Jeff/Annie+1; (2) 2 people who feel rejected (and may resent each other for not being each other’s pick); (3) Troy & Abed.

There’s also the issue of pulling other students in the class to complete the group of 3.  Chang will definitely be one.  Other possibilities include: Star-Burns, (Fat) Neil, Vicky.

# Games in the classroom #1: Rallyman

Lately, I’ve been thinking about how I would teach various classes I may be called to teach.  Frankly, I’m uncertain how to design a project-based course on, say, linear algebra or calculus.  But for probability and statistics, I have some ideas: games.  There are 2 reasons I want to use games: 1) Games are fun, which I hope will engage students.  I want them to want to learn more, to explore a problem and try to solve it for themselves, something I find lacking in many math students.  2) I like games and can talk about them all day.  I hope that will give my lessons that little extra fizz since I’m not the most charismatic teacher.

One excellent game that comes to mind is Rallyman.  I don’t have time to summarize the rules, but it is an excellent mix of risk management and planning.  Here are some ways the game can be used to illustrate various concepts:

Intro.  If people don’t know what rally driving is, show them a video of Ken Block or something.  Will this turn off people who aren’t interested in cars?  Maybe.  Have to work on that.

Probability and events.  Start with a time attack roll, when all dice are rolled together.  What is the probability that 3 hazard symbols come up and you lose control?  Well, that depends on the mix of dice being rolled.  Start with simple problems of all dice having the same probability of hazards (1-in-6 or 2-in-6), then move onto mixtures.  This can lead to discussion of counting (how many ways are there to roll 2 hazards with 4 dice?) and/or making use of the probabilities of the events they just calculated.

Another concept that’s very important here is independent events: the result of one dice doesn’t affect the other dice.  Furthermore, say you’re rolling 1 gas and 3 gear dice.  We can create events A, one hazard is rolled on the gas die; B, 2 or more hazards are rolled on the gear dice; C, 3 hazards are rolled on the gear dice.  Event A is independent of B and C, which makes it easier to calculate probabilities of intersections of events.

Conditional probability.  I’m pretty sure there’s an example of conditional probability, but a lot of the simple events (i.e. die rolls) are independent, and the only example I can think of (how one turn impacts the ones after it) is probably better done after discussing expectation.

Random variables and expectation.  The bottom line in Rallyman are seconds spent, which is an example of a random variable: if we make this move, we have an 80% chance of using only 10 seconds but a 20% chance of using a whole minute.  From this, we can talk about expectation: on average, how many seconds will this take?  (Of course, maybe taking only 10 seconds will win you the race while 60 seconds will lose it, so depending on the context, asking about expected number of seconds is the wrong question, but that will have to wait until we talk about cost functions and decision theory.)  From there, we can extend this to conditional expectations: if you spin out, that screws up your next turn, which affects the number of seconds that will take.

Big picture.  I don’t expect Rallyman to be solved by any student without a computer.  I think if Rallyman were used in a classroom, its role would be to illustrate various concepts and to show sample calculations.  For evaluation, students would instead use these ideas to study something else.

# Where’s the beef?

I’ve been making a tour of southside eateries in pursuit of a greater variety of cheap food.  Here’s the run down:

Burrito

• Gordo Taqueria: The cheapest burrito southside, I believe.  I particularly like the carne verde.  Add your own sour cream.
• La Burrita: Slightly pricier, but it does come with chips and salsa bar (with limes!).  Super burrito will add sour cream and guac, but I can add my own sour cream.
• Chipotle: Now that they’ve discontinued the student drink, they are slightly more expensive than the alternatives.  They are also the whiter burrito.

Cafes

• Cafe Intermezzo: Absolutely huge salads.  We’re talking like 2 meals worth of salads.  Make sure to get the croutons to the side or they will go soggy.
• Cafe Durant: …
• Mediterranean Cafe: …

East Asian

• Le Petit Cheval: If you come before 3pm and buy from the lunch counter, it is pretty cheap: \$6.75 for 3 entrees.  Add your own rice, and you got 2-3 meals.  Relative to  Chinese Express, much less greasy.
• China Express: 3 entrees plus rice/chow mein for \$6.50.  Again, add your own rice, and it’s 2-3 meals.
• Steve’s BBQ: Buy a BBQ, use the meat for 2 meals.  Pricier than the above though.
• Thai Basil: The UCBS hangout spot.  Good food, okay price.
• Viet Nam Village Restaurant: As a friend said, it’s the cheapest place in the asian ghetto, but there’s a reason why.
• Bear’s Ramen House: Kimchi fried rice with spam for \$7.50.  Since I’m not a big fan of kimchi or spam, this probably wasn’t a good idea.
• Cho Vegi House: A Thai/fusion/vegetarian restaurant.  Most dishes cost \$8.  Thai iced tea cost \$2.50.  Didn’t really like the vegetarian pad thai.  Might try one of their fusion specials, if I can afford it.
• Saigon Eats: …

Indian

• House of Curries: After a bad experience with vindaloo, I’m sticking to tikka masala.  Pricey (tikka masala plus naan will \$10+), but a good treat now and then.
• Indian Flavors Express: …

Mediterranean

• Maoz Vegetarian: \$5.40 gets you a pita with 4 falafel and all the veggie toppings you want.  Toppings are more European than Mediterranean, and a larger selection than Fa-La-La.  Falafel isn’t as good and pita isn’t as fluffy as Fa-La-La, but it is considerably cheaper.
• Fa-La-La: Falafel pita for \$6.50.  Crispy falafel, nice soft pita.  Also has an open veggie bar.  Is it worth the extra dollar over Maoz?  Depends on your mood.
• D’Yar: Chicken schwarma plate for \$7.60.  That does get you a lot of food.  Felt it was a bit overseasoned and the chicken dry, though.
• Sunrise Deli: May be because of summer hours, but they never seem open when I go by.

Pizza

• Pepe’s Pizza: \$7-9 gets you an all-you-can-eat buffet of pizza, salad, pasta, drinks, and ice cream.  Go during rush hour, when the pizza turnover rate is highest, because the pies aren’t at their best when they’re not fresh.
• Blondie’s Pizza: \$3.75 for one large, oily slice. Better than Pepe’s, but not worth the cost.  They rotate their daily specials (with a fixed calendar, not because they have lots of a fresh ingredient to go through).
• Fat Slice: …

Sandwiches

• Cheese ‘N Stuff: \$4 sandwiches.  Leave off the mustard.
• I.B.’s Hoagies: \$6.50 for a 9″ sandwich.  If you want a nice philly-style grilled sandwich oozing with melted cheese.
• Subway:  \$5 foot long is one of the cheapest meals around. Started having a monthly featured foot long.

Misc

• Crepes A-Go-Go: King Lias (nutella, almonds, coconut bananas, whipped cream) for \$6.  Just learn to make your own.
• Gypsy’s Trattoria Italiano: In misc only because it’s the only Italian southside.  Frankly, I can make pasta at home.  Therefore, I get calzones, which are a wait, but they are big.
• San Francisco Soup Company: \$6.50 for 16 oz. of New England clam chowder plus sourdough.  Good soup, but I recommend going around the corner to Walgreen’s and buying a can for about half the price.
• Smart Alec’s: A healthy burger and fries shop?  I guess so.  A combo meal is quite filling, if starting to push the wallet.
• Top Dog: The best thing is to buy a 5 lb. bag of your favorite dog and split it with some people.  Otherwise, a bit pricey, and eating 5 lb. by yourself is a bit much