Linux Format

Build a noughts and crosses playing AI

The solution presented in this article was first inspired by the movie WarGames (1983) where strategy games such as poker, backgammon and noughts and crosses were featured in the movie that depicted AI opponents not only playing against human players but also having the ability to figure out how to beat them. The AI opponent built for this project mainly uses the minimax1 AI algorithm to help beat a human opponent. In addition, various YouTube videos were viewed for common implementation techniques and approaches already attempted by others.

The aim of this project was to create an AI player that would prove very difficult to beat for a human player even though not completely impossible. In the end, to get this projected to a reasonably completed state, various strategies were implemented so that the AI player was very difficult to beat. In addition to using the minimax algorithm, various scenarios have been considered, such as where the human player would likely start the game from and how that starting position would affect the chances

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format4 min read
Linux
The #1 open source mag Future Publishing Limited, Quay House, The Ambury, Bath, BA1 1UA Email contact@linuxformat.com EDITORIAL Editor-in-chief Neil Mohr Art editor Fraser McDermott Production editor Katharine Davies Group editor-in-chief Graham Bar
Linux Format2 min read
Suitability For Beginners
These distros are focused on a technical area of computer use, penetration testing, but that doesn’t mean they’re T not suitable for beginners in this discipline. It’s not much of a surprise that a Gentoo-based distro like Pentoo is more complicated
Linux Format3 min read
Hacker Distros
Kali has it all if you want a pre-made networkhacking distribution. It has an impressive number K of editions to cover most installation scenarios, plus a slick-looking lightweight desktop and a huge set of built-in, well-categorised hacking tools. I

Related Books & Audiobooks