Are you smarter than a swine?
While reading about Game Theory earlier this evening, I came across this evil little Flash game called Pearls Before Swine.
The game seemed simple enough. There are multiple rows of pearls laid out on a table before you (the swine, heh)... something like this:
oooooo
oooo
oooooooooo
You and the computer alternately take one or more pearls from a row. The one who is forced to take the last pearl is the loser.
Piece of cake, right? That's what I thought 2 hours ago.
Level 1, which has two rows of pearls, was easy. But when a new row was added in level 2, I started losing game after game. At first, I tried to analyze the patterns and think through it rationally. But after 1 whole hour of constant losing, all strategy went out the window, and I found myself clicking randomly. After another 20 minutes or so, I somehow got lucky and beat level 2, but I wasn't any closer to figuring out the solution.
Level 3 added a lot more pearls, and I again lost every time. I couldn't believe it. I can do this! I'm smart! I can beat this stupid game! There has to be a simple solution! Argh! I want to kill some small animals! Where can I find some small animals?
2 hours and hundreds of games later, I finally gave up and Googled for the solution. Turned out that it was a variation of a classic game called Nim.
And no, there's no simple solution. It took my battered brain another 30 minutes to finally understand it. Overall, this was quite a humbling experience.
Now, I want all of you to suffer the way I did. Go play the game. And don't cheat!


Good game!
But couldn't get past level 5. Too lazy to count the pearls and find out the solution ^_^ I can predict Juan's move all the time but somehow I can't figure out how to get to his position even if sometimes I let him start first. It's how you start each game that's important.
You're a smart swine
The solution is a bit more complicated than just counting the pearls, but it's a good start. Keep trying.
Here's what I have so far
1. You will win when your opponent has 2 rows where row 1 = row 2.
2. You will win when you give your opponent the 3-2-1 combination.
3. You will win when you give your opponent the 2-4-6 combination.
4. You cannot always give your opponent the 1, n, n + 1 combination as in the case where n = 3; where your opponent can then give you the 3-2-1 combination. Or n = 5 where you opponent can then give you the 1-4-5 combination.
I'm still trying to figure out the 1, n, n+1 combination. After that I'll start with the 3-x-y combination where x>3 and y>3 but x!=y.
Wow
You haven't looked up the solution on the Net yet? You're very persistent.
The solution to Nim involves Boolean logic, but if you can find an alternate solution, you'll be famous! At least for math geeks, heh.
Grrr...
I must admit that this game can get pretty frustrating. But, it's a good exercise for idle minds...
Too lazy for that too
Haven't checked the Net yet. I already stopped playing actually. I'm just playing in my mind. And it's all your fault. Damn you!
i
got to level 4 in 20 minutes !! and juan don't seem like a cocky bastard (mayb because i'm playing porn in the back ground... and yeah that stuff really helps when u need to get things done, like assignments and such...)
i think as long as you don't leave juan with an even number of pearls when u only got 2 rows left u are free from an WHO-P-ASS !!
i
guess wat i'm tryin to say is u can definitely whip some ass if ur computer is old and out-dated... ahaha
Huh?
What does the age of your computer have to do with ass-whipping?
Post new comment