In my last post I discussed the game of hangman, aided by an algorithmic analysis of the winningest words. A few months ago I did something similar with the peg game they have on the tables at Cracker Barrel. The one where you have a triangle with 15 pegs, with one missing. You remove a peg by jumping over it. The goal is to leave only one peg remaining. I think I won the game the very first time I ever played it, and I don’t think I’ve won since then.
It occurred to me that the game would be easily solved with brute force, and after an hour or two of coding I had done so. However, I never went much farther than that. I had hoped to look for patterns or simple rules that lead to a victory, but never really got very far. But I decided to post what I have here just for the sake of doing so.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Given the above peg positions, there are four unique starting configurations: you can start with peg 0, 1, 3, or 4 removed. Any other position is a mirror and/or rotation of those four. So I looked at which starting positions were the most likely to win.
Peg 0: 29,760 ways to win of 568,630 games (5.23%) Peg 1: 14,880 ways to win of 294,543 games (5.05%) Peg 3: 85,258 ways to win of 1,149,568 games (7.42%) Peg 4: 1,550 ways to win of 137,846 games (1.12%)
So the moral of the story is: start with a middle edge peg removed, not the traditional configuration of top peg removed. Beyond that, I got nuthin.




October 26, 12:01 pm
The alerts can indeed be a bother. That’s one area where some more customization would be useful, and is a place that Mint could improve on.
Every month, I get an alert about my mortgage, because it’s greater than $1000 (and I have alerts set up to let me know about large transactions like that). It would be great if I could white-list my mortgage payment so I didn’t get that email every month.
I really like Mint. Hopefully you are enjoying it too. I’ll have used it a year in January.