I have seen a number of suggestions to win this game. The first thing I did was start finding winning patterns, such as when you have two rows to keep them even, or other patterns such as 1 2 3, 1 4 5, 2 4 6, etc. Eventually you can find enough of these to make a table of winning combinations. This works, but only for small games. The binary solution is the only truly unbeatable way to play no matter how many rows there are. Juan has the advantage of being able to calculate his moves with this method, so he will win as soon as you make one mistake.
I created a program that will solve any pearl game you can throw at it, with up to 5 rows of pearls. I tested it for about 17 levels of Pearls 3 before quitting. Of course, the game isn't much fun anymore because you can't lose. But it's perfect if you just want revenge on Juan, or need a hint after you've gotten stuck at a certain level on Pearls 3. So check it out!