Monday, November 30, 2009

Gaming Math - Problem 11

At the board game night no Sundays at the local game store there is guy who has been coming in to playtest a new card game he invented. The game is based off of computer fighting games like Mortal Kombat. The way it works is as follows: Each player chooses a character, and each character has a deck of "attack cards" and "defense cards." The players take turns attacking and defending (so the first turn player 1 attacks and player 2 defends, then the second turn player 2 attacks and player 1 defends, etc.) The sequence of play in each turn goes as follows:

(1) The attacker draws attack cards until he has 5 attack cards in his hand; the defender draws defense cards until he has 3 defense cards in his hand.

(2) The attacker plays attack cards. Each attack card has three attributes: a "range" (high, medium, or low), a numerical "attack value" indicating how much damage the attack does, and a "level" (1, 2, or 3). The attacker can either play any one attack card as a basic attack, or he can play a combo. To play a combo the first card in the combo has to be level 1, then the second level 2, then the third (if it's there) level 3 (you can play either a 2 or 3 attack combo)

(3) The defender tries to block the attack. Each defense card is either a "High Block", "Medium Block", or "Low Block." In order to block the attack he has to play a block card that matches the range of the attack. If there is a combo attacks must be blocked in order. For example if it's a 3 hit combo, and he blocks the first and second attacks, the third attack still does its damage. If he doesn't block the first attack because he doesn't have a matching block card, he takes damage from all the attacks, and he can't block the second or third attacks even if he had a matching block card.

(4) The attacker can discard attack cards he doesn't want, and the defender can discard defense cards he doesn't want.

(In the actual game there are more complicated elements, like "counters" that let you turn your enemy's attack back on himself, "special moves" that let you power up your regular attack cards with special powers, and certain characters have special rules, etc. But for the purpose of this problem we are just using the elements above.)


Problem 11: You've Been Blocked

Consider the game above. Assume that the defense deck has an equal quantity of high, medium, and low block cards, and ignore finite deck size effects (i.e. assume that each time you draw a card from the defense deck, you have a 1/3 chance of getting each of the types of cards, regardless of what cards have already been drawn).

Problem 11a. If the defender has just drawn a new hand of three cards, what is the probability that he will successfully be able to block a 3 hit combo where each of the attacks has a different range? How about if all the attacks have the same range (e.g. 3 medium attacks)?

Problem 11b. Suppose the defender draws a new hand of three cards. What is the probability that if I attack with a single attack (e.g. a medium attack) he will be able to block it?

Problem 11c. Suppose I've just attacked with a single medium attack, he blocks it (thus using up the medium block card). If I attack him with another medium attack on his next turn (don't forget he gets to draw a new card to replace the block card he used up) what's the probability he will be able to block it? (Assume that the defender will always block an attack if he has a block card available.)

The solutions are here.

Wednesday, November 25, 2009

Trip to Chicago

Since there are no classes this week since it is Thanksgiving, I decided to go up to Chicago to see some sights there.

I got to the Illinois bus terminal on Monday morning and bought a ticket for the 11:00 Greyhound bus up to Chicago. Unfortunately there wasn't enough space on the bus for all of us so they had to bump me to the 12:00 bus. I knew planes could be overbooked but I had never heard of a bus being overbooked. Anyway on the way up there the bus broke down. Fortunately there was another Greyhound bus there to rescue us. By the time I had gotten up there and checked into the hotel it was already 4:00, and most of the attractions were closed. Instead I took the subway over to downtown here I could have dinner at the ESPN Zone and explore the rest of downtown where there's lots of shopping. I got a new winter coat (my old one was really worn out) and got a cool looking miniature RC helicopter from Brookstone. Also in Chicago there was a whole store that sold nothing but Legos. Here is a picture of the display outside:

All those things are made out of Legos. On Tuesday I went to the Museum of Science and Industry. There were some cool things there - in one of the activities we got the chance to use a "Human Patient Simulator" medical training dummy of the same kind as those actually used in medical schools. The way it worked was they showed us how to check for different vital signs (pulse, heart rate, breathing etc.) and then we were assigned to go up there, check the vital signs, and diagnoes the patient by matching the results to the results on a diagnosis chart we were given. Also while I was there I ran into Courtney Fontaine, one of the people that I took the comedy class from back at ComedySportz in DC. She now works at the science museum, and is also in another comedy group (not ComedySportz, although there is a ComedySportz in Chicago). She was having a performance that night and I went to see it. There were several comedy groups performing that night, and there were lots of funny parts. Courtney's group got the suggestion "gift-wrapping", and I thought it would be a boring suggestion but they went off on lots of funny tangents with it. The last group I gave the suggestion "Dungeons and Dragons" to, and I was actually quite impressed with their knowledge of D+D themes - they incorporated lots of classic D+D elements including traps, castles, wizards, and even "elemental powers" into their routine. The climax of the scene was funny - someone was talking about going to the "center" of a castle to find treasure, but someone else misheard it as "senator", and the scene then segued into a senator on a talk show whose shtick was "gratuitous profanity" - but since this is a family friendly blog I won't go into it any further.

Then on Wednesday, I first went to the Travisa office to drop off the materials for my trip to India, then went back to get my stuff from the hotel. There wasn't really enough time to go to another attraction so I just went to the train station (I figured I might have better luck on the train rather than the bus) and got there about an hour and a half before the train was scheduled to leave. It was a good thing I got there early because I got the last available ticket to Urbana-Champaign. The train left on time and only got back to Urbana-Champaign about 20 minutes after the scheduled time.

Wednesday, November 11, 2009

More on the strike

Here is a letter to the editor in the Daily Illini opposing the strike:

Do Not Support the Strike

Here's my analysis of this argument:

1. The claim about graduate students "colluding to gain market power" doesn't make a lot of sense. By exactly the same logic, one could claim that the university itself consists of a lot of separate employers of graduate students (namely the individual professors) that are "colluding" into one administration to negotiate. So why is that not "market power?" Why is it "collusion" from one side but not from the other?

2. The statement about "if the university paid below the market rate, students would be attracted to other universities, so they would be forced to raise it" makes sense, but that's exactly the point of the strike. The students aren't willing to work for the wage they are being given, so they're going to refuse to work for that wage. That's exactly how the market is supposed to work, isn't it?

3. The statement about "the benefits come to ... those with political clout" doesn't make sense either. The students are asking for wage and benefit increases across the board - as far as I'm aware, they're not asking for any special favors for anyone with "political clout".

Wednesday, November 4, 2009

Finally: Proof that the Stimulus is Working!

Jeff Erickson said recently that he wanted to consider hiring me as an RA for next year. The interesting reason is why: he recently received a grant for $200,000, and it was money that came from a program put in place by the stimulus package, so in order to keep the money he has to show that he is creating jobs. I haven't decided yet whether to take that offer or whether to work on a different project (after all, I still have about 1.5 semesters left on my fellowship to decide).

However, maybe that's a good thing: the graduate student employees' union is considering going on strike, because they have been without a contract for over 10 weeks and they claim they are not being paid a living wage. I guess that makes me non-union "scab" labor.

Bonus Question: What is wrong with this analysis of the teaching assistant pay situation?