Wednesday, November 10, 2010

A Strategy Guide for my Economics-Based Video Game

Recently I have gotten really interested in computer programming. Right now I am learning the Java programming language, and have used it to create a simple text based game called Cake Wiz. You may ask, "What does this have to do with economics?" Actually it has quite a lot to do with economics. The game I created is a business simulation game, where the player runs a bakery. I've written this article to explain the economic principles behind the game. Before I give too much away, you might want to play the game first. You can access it here:

(And here's a screenshot. On the page, press the "click here" button to start your game. I wasn't clear about that.)

(Special thanks to good friends Steve and Bennique Blasini for letting me use a page of their business' website for my silly game. They are brilliant special effects artists and if there are any hollywood producers out there reading this: hire BFX Image Works if you ever need some computer graphics done for a film.)

In my game, the player makes four decisions every business day at the bakery:
1. how much cake mix to buy, based on a price that fluctuates.
2. how many cakes to bake from the mix, keeping in mind that cakes expire after two days but cake mix does not expire.
3. how much to spend on advertising
4. what price to sell the cakes for
Without giving away all the secrets how the game works, I will say that the number of cakes you can sell every day is based on four very important concepts in business and economics:

1. The price elasticity of demand. This is a measure of the change in the quantity demanded in response to a change in price. Except in rare cases of "snob appeal", people will demand less of a good if its price is higher. So in the game, if you start selling your cakes for a higher price, not only can the quantity sold fall, but your total revenue might fall if the price increase does not offset the quantity drop. You also might lose unsold cakes to spoilage.
2. Diminishing marginal returns. In this case, I'm referring to diminishing marginal returns of dollars spent on advertising. This basically means that you can spend too much on advertising. At a certain level of spending, every extra dollar spent on advertising may not have as powerful an effect as the dollars spent before it. To explain, imagine that one out of every 20 commercials on TV was for the "Shake Weight." This would probably greatly increase sales of the Shake Weight over not advertising at all. But if 20 out of 20 commercials on TV were for the Shake Weight, what effect would this have? TV viewers would probably say "I get it already!!! Enough with the Shake Weight!!", and the effect of the extra 19 commercials would undoubtably not be worth the extra cost. So keep this in mind when choosing your level of advertising spending in the game.
3. Inventory Management. In my game, and in business in general, you don't want to accumulate a lot of inventory that will go to waste, especially since goods like cakes expire with time. But on the other hand, you don't want to run out of inventory, which will cause you to miss out on extra sales, and possibly lose disappointed customers for good.
4. Randomness. In my game, as in business, you may find there's an unexplained, random element to your circumstances. You should change your behavior to hedge against the effects random fluctuations in demand or the cost of productive inputs.

So basically, the key to doing well at my game is using trial and error to find the right pricing, advertising level and inventory level to make a good profit in the face of randomness.
Hope I didn't give too much away and that you enjoy my game as much as I enjoyed programming it.

Wednesday, November 3, 2010

The Economics of Frontal-Bus-Squishage

Have you ever gotten onto a city bus and immediately been stuck in a huge cluster of people at the front of the bus, when there is plenty of space, and maybe even seats in the back? I have often struggled with this curious phenomenon, and my inner economist seeks a reason for, and maybe a solution to this problem. I have come to the conclusion that the problem of front-of-bus squishage can be easily understood through an examination of the unique costs and benefits that riders face in different parts of the bus.

When people think of prices, they often think only of money given in exchange for something else of value. But everything of value has a price, often not paid in money, but with other assets, such as personal space, comfort or dignity. Personal space is the asset that bus riders often give up when they are crammed together in the front of the bus, even when there are unused assets towards the back that could make everyone’s ride more pleasant.
Why do these assets go unused? After careful consideration, I've realized that bus blockage situations happen because of two things:
1. The bus riders who would most benefit from the extra space on the bus are those who would face the most costs in acquiring it. And,
2. Bus riders who would face the least costs in acquiring more space on the bus are those who would least benefit from more space.
To put this more simply, those who can more easily access the extra space have less need for it. Thus the extra space in the back goes unused.
Allow me to explain.
Envision an empty bus. As riders get on the bus, they immediately take the seats. Once all of the seats are taken, riders have no choice but to stand. In the absence of external forces, people will tend to want to stay put. In more common usage this can be categorized as "laziness". Because of this law of behavioral inertia, riders who come onto a bus with no available seats, rather than moving immediately to the back to clear space for new riders, will tend to stand in the front, relatively close to where they got on. There is, when entering a non-crowded bus with no available seats, no direct and universal incentive for bus riders to move further back, and because of this, as more riders get on the bus, clusters of frontal-bus-squishage form. And because of the different costs and benefits facing bus riders at different parts of the bus, once they form, these clusters are hard to break up. To help explain, take a look at this diagram I have artfully put together:

The diagram singles out two bus riders, person A and person B. Person A is stuck in the middle of a cluster of people (zone A), while person B is at the edge of the cluster, (in the spacious zone B). In this formation, Person A would greatly benefit from the extra space at the back of the bus, but would face the costs of squishing past three people in order to get there.
If you think the word "cost" is inappropriate to describe what person A faces here, ask yourself: do you enjoy squishing past people in thick crowds? Probably not, both for your sake, and out of a polite desire not to squish others. Thus you would face a cost in getting from zone A to zone B. The unpleasant squishing would be the price you’d pay for more space.

So person A, in order to benefit himself, and indirectly the people around him (in econ-speak, a positive externality), would pay a relatively high price for moving to zone B. Person A would need to press up against other riders, and awkwardly slide and slither through. This is a cost, as real to person A as the cost of a loaf of bread. Person B however, who is already at the edge of zone B, has plenty of space in front of him. And for the relatively low cost of simply moving his feet for a few steps, Person B could move further into zone B, and thus help lighten the blockage for everyone in zone A. But because person B is not being squished from both sides like everyone in zone A, he won't personally benefit much from moving towards the back. Person B's needs for space have largely been satisfied.
In the act of moving towards the back, Person A and other riders like him, face high costs and high benefits, while Person B and other riders like him face low costs and low benefits.
And there we have it. A cluster of front-of-bus-squishage. The cluster will break only if:
1. person B and/or others like him realize that they need to move back, or
2. if a few brave (or rude?) souls in Zone A decide it is better to squish past everyone to get to zone B, than to remain in the cluster. This is an altogether less pleasant solution than in 1, which involves no extra squishage.

So far there is only one tool in use that I know of for preventing or resolving the frontal bus squishage problem: Shame. The bus driver needs to shame the "person B"s of the world into moving back, usually by yelling "move back, everybody". (Even more effective is "I'm not moving this bus until you move to the back!") But maybe an automated system would be more effective. If money were no object, engineers could design a bus that uses sensors to detect clusters of frontal bus squishage. Upon detection, a polite yet insistant robot voice could ask the "person B"s to "please move back" over and over until the situation was resolved. If need be, it could also give them mild electric shocks until they do. Here is a diagram of how that would work:

(I sure hope anyone reading this has a sense of irony. For the record, I am not a psycho.)

But what about carrots rather than sticks? Adding extra benefits in exchange for moving to the back could work just as well, or even better than shame or electrocution. How about a free snack dispenser, or a gentle foot-massaging floor that activates in the back when the sensors detect a squishage?
All kidding aside, to solve this problem, the costs and benefits must be realligned, either by making it more costly to create a blockage, or more beneficial to prevent one. In econ-speak this would "internalize the externality." Snacks, electric shocks, or massages could theoretically all be used. But in reality, it seems we can only rely upon the shame that a good and forceful bus-driver can inflict on Person B. That, and hopefully, bus riders' courtesy to their fellow passengers will help too.