Ever since the movie “Wargames,” it’s clear: an AI doesn’t like to lose. And even a draw can be just as frustrating.
Still, a game of Tic Tac Toe can be a lot of fun – here is a version in Python, implemented using Turtle.
The turtle (from the Tkinter library) allows you to create simple to complex graphics on screen using Python. It is controlled with understandable commands like forward, left, right, etc. Older programmers already know it from Logo (1967), COMAL (1973), etc. - younger programmers know something similar from Scratch (2007) with the so-called “pen”.
🐢 Here’s a complete Turtle cheat sheet suitable for both beginners and advanced users – regardless of age. It covers everything: from basic functions through colors, shapes and loops to events, coordinates, animations and complex drawings.