---
title: "Comment by Paweł Tarsała on \"How I Made a TicTacToe Game That You Cannot Beat 🙅‍♂️\" | Hashnode"
description: "Simple algorithm. It needs to go through all combinations though. If it takes the first move it might be laggy. Actually, this algorithm was used to beat Garry"
url: "https://hashnode.com/posts/how-i-made-a-tictactoe-game-that-you-cannot-beat/626819587b6a339ac2d01f31/comment/62691b0d7b6a339ac2d037e9"
---

[Discussion](https://hashnode.com/posts/how-i-made-a-tictactoe-game-that-you-cannot-beat/626819587b6a339ac2d01f31)

Comment [How I Made a TicTacToe Game That You Cannot Beat 🙅‍♂️](https://hashnode.com/posts/how-i-made-a-tictactoe-game-that-you-cannot-beat/626819587b6a339ac2d01f31)

[Paweł Tarsała](https://hashnode.com/@BRUT4LxD)

[Apr 27, 2022](https://hashnode.com/posts/how-i-made-a-tictactoe-game-that-you-cannot-beat/626819587b6a339ac2d01f31/comment/62691b0d7b6a339ac2d037e9)

Simple algorithm. It needs to go through all combinations though. If it takes the first move it might be laggy. Actually, this algorithm was used to beat Garry Kasparov in chess (DeepBlue). You can use alpha-beta pruning to speed up this algo if you care about optimization here :)
