DEV Community

Pyro607
Pyro607

Posted on

My Variable Difficuilty Tic Tac Toe

For the final project portfolio for CS101 Introduction To Programming on Codecademy, I was tasked with writing a Python Terminal game. I had a little research, watched some very informative guides, and thought a simple game of Tic Tac Toe would be a good first project; but I wanted to add more complexity than a simple game against the CPU. I incorporated 3 difficulty settings for the "AI":

-- Easy, the CPU actively picks the worst move it can make.

-- Medium, the CPU picks a random move every round, ensuring it has a, roughly, equal chance of picking a good or bad move.

-- Hard, the CPU makes the best move it can each round and shouldn't be beatable!

Please feel free to try the game and out and let me know if you manage to beat it on the hardest setting.

https://github.com/Pyro607/Tic-Tac-Tov-vs-AI

Discussion (0)