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??

  • 1
    Consider adding a description or screenshot, it might help people unfamiliar with that game to help you.
    – npst
    Commented Jan 19, 2015 at 19:56
  • Which walkthroughs have you tired?
    – aman207
    Commented Jan 20, 2015 at 19:58

2 Answers 2


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.

  • FYI, the above pictured solution did not work (Android version from Humble Bundle), but using the web-based game to beat the AI did work on 2nd try (first was a tie).
    – Vince
    Commented Nov 20, 2016 at 23:25
  • Good answer, especially the suggestion on pitting another AI against your opponent. Suggested web based simulator has a very nice system with hints. Commented Aug 22, 2017 at 15:36
  • 1
    The written technique doesn't seem to work on the Switch version. But pitting it against the other AI worked very well!
    – z0r
    Commented Oct 24, 2019 at 10:57

enter image description here ^sample
you can now defeat the android AI with this tips
1. you form your row of 3 (in the process, dont let him block on either sides)
*usually, he will form too his row of three
2. let him form his row of 4 (i know kinda stupid)
3. now you add your next piece to any of the two ends of your row of three: now you will have a row of 4
*the AI will not complete his row of 4, instead he will try to block you.
4. now you put your next piece on the other end of your row of 4
you win the game

  • Doesn't seem to work on the Switch version.
    – z0r
    Commented Oct 24, 2019 at 10:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .