Course 2, lesson 20 of 100, Ages 6+

AI that plays games

From noughts and crosses to Go

Like I’m 5

Some AIs are very good at games. They practise against themselves millions of times, so they learn clever moves that even experts haven't tried.

The big idea

Simple games like noughts and crosses can be solved by checking every possible move. Chess and Go have more possible games than there are atoms in the universe, so AI can't check them all.

Instead, game AI learns which positions look good by playing itself over and over, then looks a few moves ahead. In 2016 an AI called AlphaGo beat a world champion at Go with a move experts called beautiful.

Examples

  • Noughts and crosses: A computer can check every move, so it never loses.
  • Chess apps: They help players practise and explain their mistakes.
  • AlphaGo: It learned from human games, then improved by playing itself.

How it works

  1. Look at the current game position.
  2. Imagine a few possible moves ahead.
  3. Pick the move that leads to the best-looking positions.

Check your understanding

How did game AI get so good?
Options: By playing itself millions of times; By reading the rules once; By guessing randomly forever.
Answer: By playing itself millions of times. Playing itself gives it huge amounts of practice and feedback.
Why can't AI check every possible game of Go?
Options: There are far too many possible games; Go has no rules; Computers can't count.
Answer: There are far too many possible games. The number of possible Go games is astronomically large.

Remember

Game AI practises against itself and looks ahead to choose strong moves.

Talk about it

Which game would be hardest for an AI to learn? Why?

Go deeper

AlphaGo combined deep neural networks with Monte Carlo tree search. Its successor, AlphaZero, learned chess, shogi and Go purely by playing itself.