Impossible?

Do not click this if you value your sanity.

Thats a flash gave. It is very hard. I could not win it after about 30 tries. I think there’s a good chance it’s rigged.

Why am I sharing this? Ever heard the phrase “Misery loves company”? :o

It’s impossible to win when you go first.

if it’s any consolation, you’re not the only one what can’t figure it out…

It’s impossible as long as you go first, like Xelo said.

The thing is programmed with all possible moves, so there’s no way you could win. Also, this is a most famous game taht appears in many books, and the second to play only loses if he’s got attention problems.

I am happy to report that Xelo is, of course, wrong. Given the starting position of this game, the first player has the advantage. So you should go first.

And your first move should be to take 2 pearls from the row than contains 3.

So if the starting board is 3-4-5, after your first move it should be 1-4-5.

The computer does play perfectly, so if you don’t make the right move it will win. And there is only one right move (assuming you treat all pearls in the same row as equivalent, which they are. The first and last pearl in a row count exactly the same).

There is an algorithm that can be useful for winning this game, if you are familiar with binary. Convert the number of pearls in each row to a binary number. So the starting position in binary is 011-100-101. Then count the number of rows where the number of pearls in that row has a 1 in the 1’s place (in binary). Do the same with the 2’s place and the 4’s place. If all of these sums are even, then it is a losing position.

In this case, there are 2 numbers with a 1 in the 1’s place, 1 number with a 1 in the 2’s place, and 2 numbers with a 1 in the 4’s place (212). Since there is a non-even number in the 2’s place, this is a winning position. Make a move that will reduce the number of 1’s in the 2’s place by an odd amount (removing 2 pearls from the first row is the move that accomplishes this).

If you still don’t understand it, here is an easy way to guarantee a victory: open the game in two windows. In one window, let the opponent go first, and use his move in the other window. Then just alternate back and forth between the two windows, letting the opponent play against himself. Since there is always one winner and one loser and the game is deterministic, you will win exactly 1 of these games. The same trick also works for games like checkers and chess.

One caveat: this particular page does occasionally cheat in a certain position, although infrequently, by having the opponent skip his turn when you are near winning. If he cheats, you will lose and have to try again.

Vorpy has obviously played this before.

Uh, I tried Vorpy’s way and it still doesn’t seem possible. Maybe I’m doing something wrong?

I don’t seem to be able to go second.

I don’t think Vorpy’s way works. Hell, he could tell us what moves he does, because the opponent has no random factor in it.

I won on my first try today, which would be my third try.

This game is the reincarnation of satan.

Those games are cruel. They are, however, like Vorpy said possible to win. I did ages ago: Back when I actually wasted my time on trying.