The strategy to win is to:
1. Write down the number in each row in binary numbers.
2. For most of the game, to try and leave the sum of all of the numbers (with no carrying) equal to zero.
3. Near the end, switch, leaving only one or 3 lots of one pearl left.
Sometimes, the computer cheats when playing this strategy, about 3 moves away from winning, the man strikes his hand down without taking any pearls, and you have to play again. Usually, he does not do this, and his eyes enlarge, and he walks away.