The Efficient Frontiersman

Thoughts by Christopher Rohrs.

Wednesday, May 25, 2011

Moving Picasa to a New Computer

Picasa stores edit information in the .ini files in each directory. So if you just move all your photo directories to a new computer, your Picasa edits will be preserved. Unfortunately album definitions (and apparently faces) will not be. So the right way of moving Picasa computer is to use the backup/restore feature.

The restore functionality gives you the option of restoring to the original or a new directory. I could not get the latter to work. Thankfully the former worked and was somewhat intelligent. For example, files original stored in "C:\Documents and Settings\X" (Windows XP) were restored to "C:\Users\X" (Windows 7).

If you want to rearrange folders, you're supposed to use Picasa's built-in "file move" functionality. However, it turns out that you can simply move a folder in Windows Explorer if (a) Picasa is running in the background and (b) the folder is marked as "scan always" in Picasa. Obviously you might want to test this.

Monday, June 11, 2007

Chavez' Cultural Revolution

CNN reports: "Venezuelan President Hugo Chavez told his supporters to give away possessions they do not need such as an extra refrigerator because he only wants true socialists to be members of a new single party he is forming."

Purging the party and eliminating unneeded possesions? Sounds a lot like Mao's Cultural Revolution. Let's hope it doesn't share the same disastrous outcome.

Friday, March 02, 2007

Value Bets in Backgammon and Poker

In backgammon, the doubling cube allows a player to double the stakes at any point in the game. The opponent can either immediately forfeit the original stakes or accept the cube and keep playing for the doubled stakes. What is the mathematically correct way of using the cube? My analysis follows. Caveat: I'm not actually a good backgammon player.

Let the probability of winning be p. Assume for the moment that you and the opponent make the same assessment of p. If p > 0.5, you should offer the doubling cube. Your opponent should accept the cube if p <, i.e., the opponent has at least a 25% chance of winning. Consider two examples:

p = 0.51. You should double. If the opponent (correctly) accepts, you expect to win 0.51 * 2 - 0.49 *2 = $0.04, which is greater than the expected value ($0.02) if you didn't double. But if your opponent incorrectly refuses the cube, you do even better: $1.

p = 0.99. You should double. If the opponent (correctly) refuses, you immediately win $1, which is still greater than the expected value ($0.98) if you didn't double. But if the opponent incorrectly accepts, your expected value is even higher: 0.99 * 2 - 0.01 * 2 = 1.96.

To use poker terminology, the first case (0.5 < p < 0.75) is betting to protect your hand. You're hoping your opponent folds, but you're still ahead if he doesn't. The second case (p > 0.75) is betting for value. Here you're hoping your opponent calls. A third case is bluffing: p < 0.5.

Of course estimating p is not easy. This is particularly true in poker where there is hidden information. The better your estimate of p--and the worse your opponent's--the more you win.

Saturday, November 18, 2006

Fortune's Formula

Let's consider a game with a positive expected value. Say I offer you even money on a biased coin with a 55% chance of landing on heads. You start with a bankroll of $100. How much should you bet? If I offer you just a single toss, your expected value is maximized when you bet your entire bankroll on heads. But if we play the game repeatedly, this is not a good strategy; on any flip there is a 45% chance of losing your entire bankroll. Turns out that your long-term expected value is maximized when you bet exactly 10% of your bankroll on every flip. This is known as the Kelly criterion. Surprisingly, it is equivalent to maximizing the expected mean of the logarithm of your bankroll--i.e., utility--or the geometric mean of outcomes.

William Poundstone's book Fortune's Formula gives a history of the Kelly criterion in the context of gambling, organized crime, and investing. With such juicy topics, you can't help but enjoy the book. At the same time, the book is big deal about nothing. The author knows that the Kelly Criteria isn't an investing panacea--it results in great volatility, and you need to fight the efficiency of the market--so he just makes endless hints and casual suggestions. It's like listening to the president talk about Iraq.

Saturday, October 28, 2006

Smart Gambling

Frugal gamblers prefer games with the highest expected value, i.e., the lowest house edge. However, it's important to remember that the house edge applies to every bet you make, not to your bankroll. Say you're playing a game with a 1% house edge. If you start with $100 and make 50 bets of $10, you should expect to loose 0.01 * 50 * $10, not 0.01 * $100. Thus the frugal gambler might also control the number of bets made. One way of doing this is to put your bankroll on the left side, and move winnings to the right side. As you repeat this, you can easily track the total number of bets and thus your expected cost of playing. Of course your actual performance can deviate well from the expected value!

More generally, you need to be aware of the hourly cost of playing. This is the house edge times the average bet size times the number of bets per hour. For example, you might not want to bet the maximum coins playing video poker. Although this increases the house edge, it decreases the cost to play per hour. The intelligent gambler will only play games were the entertainment value outweighs the hourly cost to play. Brisman's Mensa Guide to Casino Gambling has a good discussion of this.

A somewhat neglected concept is risk (variance). In investing you want to minimize risk for a given level of return. This doesn't appear to be the case for gamblers. Take roulette. Most bets have the same expected value, so the choice of bet is purely psychological. Do you prefer the occasional big payoff or the frequent small payoff? Are there strategies, for example, in Video Poker that decrease (or increase!) risk with only a small increase in the house edge?

Saturday, August 19, 2006

Computer Backgammon

I find a comparison of TD-Gammon and the high-level chess computers fascinating. The chess computers are tremendous in tactical positions where variations can be calculated out. Their weakness is in vague positional games, where it is not obvious what is going on.... TD-Gammon is just the opposite. Its strength is in the vague positional battles where judgment, not calculation, is the key. There, it has a definite edge over humans.