Machinarium 5 in a row puzzle

I am stuck in the 5 in a row level in Machinarium. I am playing on an Android device and for some reason, none of the walkthroughs work. I easily beat this level earlier on a PC but i think they changed the algorithm for mobile devices.

I have tried about 50 times to beat this puzzle. Still no luck.

Is there a definite way to beat this level? Or I just have to keep trying again and again??


First of all, do not be disappointed. This is arguably the hardest puzzle in the whole game, since it pits a human against a computer in a game where computers have the advantage. This means there are quite a lot of players who searched for methods to solve this puzzle and some of them actually managed to find viable strategies.

It seems that the creators have changed the AI in different editions. In most versions the following strategy (Lamkin's Gambit) will work:

enter image description here

The X denotes the first piece placed by your opponent, and the numbers indicate your moves in order.

However, there were a few reports from users who said that for them this technique did not work. This indicates that Amanita Design have changed the AI. If you happen to have this newer (or older? anyways, different) AI, and this method doesn't work, you can still try pitting another AI against your opponent by opening up a web based 5-in-a-row simulator with a strong AI, setting up the board to be 10×10, just like the one in Machinarium and feeding the AI the moves your opponent makes and vica versa.