21 Tic-Tac-Toe: Exploring state

One of my favorite movies is the 1983 release War Games starring Matthew Broderick, whose character, David, plays a young hacker who enjoys cracking into computer systems ranging from his school’s grade book to a Pentagon server that has the potential to launch intercontinental ballistic missiles. Central to the plot is the game of Tic-Tac-Toe, a game so simple that it usually ends in a draw between the two players.

In the movie, David engages Joshua, an artificial intelligence (AI) agent, who is capable of playing lots of nice games like chess. David would rather play the game Global Thermonuclear War ...

Get Tiny Python Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.