Recent 10
Photo Link: Image 0030
Photo Link: Image 0029
Photo Link: Image 0028
Photo Link: Image 0027
Post Link: Why Life Bars?
Post Link: Lying with Data
Photo Link: Image 0024
Photo Link: Image 0023
Post Link: Advertisement Roundup
Random 5
Photo Link: Image 0013
Photo Link: Image 0009
Photo Link: Image 0016
Photo Link: Image 0005
Photo Link: Image 0018

Intro

Hello, and welcome to my site. If you are looking for a Boston / South Shore area real estate photographer, click "photography" above. For blog posts and photos, see below or the sampling to the left. Enjoy your stay!

Posts

Why Platformers Evolved Life Bars

Q: Why DID platform games evolve life bars?
A: Life bars mitigate harsh bad luck, minimizing capricious deaths.

Let's take a look at the start of Guts Man from Megaman 1:

Guts Man stage from Megaman 1

The moving platform sequence pictured above requires about 12 individual jumps, failure on any of which means instant player death. The question is, how good do you have to be to have a reasonable chance of passing the section? The following table shows the chance to pass the section and the average number of tries it will take, for a given chance of success on a single jump:

One JumpAll 12 JumpsMean Number of Tries
50%0.02%~4,000
80%6.87%~15
90%28.2%~3.5
95%54.0%~1.9
98%78.5%~1.3
99%88.6%~1.13
100%100%1

This is brutal. Players need to attain near mastery of the timing of the platforms to have a reasonable chance of succeeding (I managed it only about 1 in 3 times, so you can put me in the 90% bin). Even if you've only a 1% chance of failure on each jump, about 1 in every 8 attempts will end in death.

What happened when publishers wanted to move past the "Hardcore gamer that wants to master each game" demographic? Lots of things to make things more forgiving, but none as significant as the life bar. In the above example the curve of success is very sharp - a player goes from finishing the section very rarely to succeeding often with a small difference in skill. Also notice that the player must attain extreme skill levels to pass the section trivially.

Let's imagine another level where the player has 24 foes to face, but now has 4 health.1 So, passing the section could involve not getting hit by any bad guy, or getting hit by one to three of them. This is how the chance to succeed now breaks down:

One FoeAll 24 FoesMean Number of Tries
50%0.01%~30,000+
70%4.24%~230
80%26.4%~3.8
90%78.6%~1.27
95%97.0%~1.03
98%99.9%~1.001
100%100%1

What are the differences?

  1. We've doubled the length of the whole challenge, but it has gotten easier for most skill brackets.
  2. A wider band of skills now has a decent chance of passing the section.
  3. The extremes of skill, both bad and good, have less luck in play. The bad player (50%) has significantly less chance of passing, and the extremely good players have less chance of failing.

And now you know the rest of the story.

Boring Math Corner (Explanation)

We've modeled the game as a series of independent events that the player has a known chance of success or failure on.2 Analyzing a series of n instant death jumps is very easy. Since each jump is independent, the probability of passing is simply the probability of success on each jump (lets call it X) to the nth power:

p = X^{n}

The second case in the article is a bit more complicated. What we want is the chance of a or fewer failures in a series of n foes, each encounter of which has X chance of success. We can break that down, instead of looking for the chance of "a or fewer failures" we look for "exactly a failures" plus "exactly a-1 failures" plus "exactly a-2 failures" all the way down to the chance of "exactly zero failures." Each of these probabilities is a term in the explanion of the following polynomial:

(X + Y)^{n} = 1

Where Y is the chance of failure (which is the complement of X, that is to say X + Y = 1). Why is this relationship true? The answer is a little complicated, but you can check out Wikipedia's slightly crappy explanation. Regardless, we want the first a terms of the expansion of the above equation:

c_{1}X^{n} + c_{2}X^{n-1}Y + c_{3}X^{n-2}Y^{2} + ... + c_{n}Y^{n}

The constant coefficients c of which are given to us by the binomial theorem, and we denote the kth coefficient like this:

c_{k} = {n\choose k}

Which is read "n choose k." We've finally arrived at the end, a short way of writing an expression for the terms we want:

p = \sum_{i = 0}^{a} {n\choose k}X^{n-i}Y^{i}

Huzzah. Note that if we tolerate no failure, we only want the first term because it represents zero failures and n successes. This collapses to exactly what we has as our first equation because n choose 0 is 1 for all n. Bonus question for people new to this: Why? Double bonus: What about n choose n?

Footnotes

1 This is how the easier levels of Megaman work, like Cut Man: A series of mostly health-damaging foes with very few instant death pits.

2 Is this a good model? In real levels, some challenges are harder than others. If we modeled our section as having varying probabilities of failure it would actually exacerbate the difference between "instant death" and "life bar" even larger. The life bar helps you pass the bits you are having trouble with, whereas the instant death game just murders you.

Comments? E-mail me at: "me" at this domain (adammarquis.com). Home

Permalink

Lying with Data, featuring Nancy Pelosi

On Feb 6th, the following was posted on Speaker Nancy Pelosi's speaker.gov. The below chart, showing absolute numbers of non-farm job losses (seasonally adjusted)1 in a couple of U.S. recessions:

Pelosi's job loss chart

This contains a couple of classic ways to lie with data:

  1. Cherry picking data series: A curious omission is the recession of the early 80's, which has a job loss curve very similar to the current situation. I guess when data do not support your fear-mongering, you can just leave them out?
  2. Scaling issues: This chart shows absolute numbers of jobs lost, not as a percentage of peak jobs. The 1990 recession looks tame, but there were about 30 million fewer jobs to be lost in the 1990's. Was the recession smaller just because the country and economy were?

Once you add in the early 1980's recession and make the vertical axis percentage change from the peak number of jobs, it looks like this (notice the similarity between the current and 1981 series):

Corrected job loss chart

The Speaker's blog says "This chart compares the job loss so far in this recession to job losses in the 1990-1991 recession and the 2001 recession. showing how dramatic and unprecedented the job loss over the last 13 months has been." I say that their presentation deliberately misrepresents the situation, which is ironic considering their next post: "Critics Continue To Push Misleading Information About Economic Recovery Plan.".

Using the public's panic to push one's own agenda is predatory and disgusting. The idea that the severity of the crisis precludes any debate over what we should do, that we should just shut up and follow the party in power's lead, pervades Democratic talking points. If you replace "recession" with "terror," it all sounds an awful lot like Republican talking points from the Bush era. I am getting very sick of being told that criticism and debate are against the best interests of my country. Commenter Eclectro at Boing Boing, I think, said it best by quoting FDR:

"So, first of all, let me assert my firm belief that the only thing we have to fear is fear itself -- nameless, unreasoning, unjustified terror which paralyzes needed efforts to convert retreat into advance."

1 Not that the post tells you this, I'm just guessing based on the shape of their graph.

Comments? E-mail me at: "me" at this domain (adammarquis.com). Home

Permalink