What can we learn from losing?

That’s the question at the heart of the documentary AlphaGo, about an AI program designed to play the ancient Chinese board game Go. The film follows AlphaGo and its creators, the Google-owned firm DeepMind, as the program defeats first the European champion, Fan Hui, then the legendary player Lee Se-dol. Fan and Lee are forced to answer this question as they’re overwhelmed by AlphaGo’s uncanny play style. And as artificial intelligence imitates more of the qualities we consider uniquely human, their conundrum is an important preview for the rest of us, who may soon be asking ourselves the very same things: What will do when a computer takes our jobs? When we prefer its company to human company? When it makes art we love? How will it feel to be usurped?

After Fan’s first losses against AlphaGo at DeepMind’s London headquarters, he goes for an hourlong walk to calm his nerves. He returns and loses again, laughing in exasperation and disbelief. He later joins DeepMind to help train the AI that beat him, and stays in the film as a primary narrator, offering the most open, guileless, and poetic perspective on what takes place. In the televised matches between AlphaGo and Lee in South Korea, he acts as a referee, but it becomes clear he isn’t neutral: he’s an AlphaGo convert.

Lee starts out confident he’ll win — but the tables are soon turned

When it’s Lee’s turn to face the music, he approaches the match with understandably fake humility. He’s quiet and shy in interviews, but confident he’ll win all five games. The film’s experts agree: Go is much more complex than chess, with more possible board configurations than atoms in the observable universe. Computers cannot brute-force their way to victory by plotting out every conceivable move, so they’ll have to show something akin to human ingenuity when they play. Nevertheless, Lee loses his first three matches in a row.

AlphaGo’s footage at this point is a slow-motion car crash of understanding, as Lee gradually realizes what he’s up against. In the first match, he instinctively looks up at the man tasked with moving pieces for the computer — AlphaGo’s lead programmer, Aja Huang — before remembering that this isn’t his opponent. After his first loss, he rages on the board: going on the attack in uncharacteristic fashion, then retreating to contemplate a single move for 12 minutes. AlphaGo, meanwhile, weighs every decision equally, pausing for a minute and a half before making its response. There’s torture in this regularity. AlphaGo’s pauses are implacable, consistent: it doesn’t respond to Lee’s struggle; it plays the game as if he simply wasn’t there.

The film teases out Lee’s evolving relationship with AlphaGo wonderfully, alternating close-up shots of his face (frustration and shock are his most common reactions) with his relaxed and almost otherworldly comments after the games. If you don’t remember how the matches went, I won’t spoil the film for you, but suffice to say that humanity does land at least one blow on the machines, through Lee’s so-called “divine move” — Go terminology for a play that is both unexpected and entirely original.

The film’s third act drags a little. The behind-the-scenes footage of the DeepMind team gives insight into the emotions that go into such matches (they respect the game immensely, and are as stricken as Lee is at his losses), but not everyone will be satisfied with lots of shots of people looking at computer screens, and the narrative arc feels a little by-the-numbers. Similarly, while the music score is effective, it’s oddly conspicuous. It prods and pokes viewers with unsubtle emotional cues, like a reality TV show would. “Now, you should be nervous; now you should feel relieved.”

Lee’s relationship with AlphaGo develops from frustration to collaboration

The film transcends this clumsiness, though, for two reasons. First, the emotions of everyone on-screen, from programmers to Go players, feel authentic and honest. No one cares about the cameras; they care about the game, for their own reasons. And second, the broader narrative affects us all. Artificial intelligence isn’t going to go rogue and grab the nuclear codes any time soon, but the algorithms it helps produce are already having a massive impact on society. They’re speeding up automation and threatening jobs; they’re manipulating your news feed and shaping your online addictions.

When Lee confronts the AI software, the experience is humbling, but it lets him improve his game. It grants him his “divine move” (a very literal deus ex machina) and the film’s final scene frames this as both heroic and a pattern which humanity should always try to replicate in our future encounters with AI. You fight and you don’t give up. You learn something.

But while this works in the context of Lee’s battle with DeepMind’s AI, it feels a little limited with regards to the wider challenges posed by artificial intelligence. We’d all be lucky to have a confrontation with the machines as neat and well-defined as the one in AlphaGo. More likely, the forces of automation we’ll face will be impersonal and incomprehensible. They’ll come in the form of star ratings we can’t object to, and algorithms we can’t fully understand. Dealing with the problems of AI will take a perspective that looks beyond individual battles. AlphaGo is worth seeing because it raises these questions — but don’t be surprised if it doesn’t offer answers. It’d take some sort of super-intelligent AI to work out what’ll happen next.

AlphaGo originally premiered at the Tribeca Film Festival this Spring and is currently in limited release in the US and UK.