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.

1 comment:

Dan Mont said...

Hi Alex,

I posted a comment but I accidentally posted it on the page with the solution to problem 11, so I'm not sure you saw it.

Mom and I are heading to Saigon this weekend just for fun. Really looking forward to seeing you in a few weeks.