The game of Go played between a DeepMind computer program and a human champion created an existential crisis of sorts for Marcus du Sautoy, a mathematician and professor at Oxford University. “I’ve always compared doing mathematics to playing the game of Go,” he says, and Go is not supposed to be a game that a computer can easily play because it requires intuition and creativity.

So when du Sautoy saw DeepMind’s AlphaGo beat Lee Sedol, he thought that there had been a sea change in artificial intelligence that would impact other creative realms. He set out to investigate the role that AI can play in helping us understand creativity, and ended up writing The Creativity Code: Art and Innovation in the Age of AI (Harvard University Press).

The Verge spoke to du Sautoy about different types of creativity, AI helping humans become more creative (instead of replacing them), and the creative fields where artificial intelligence struggles most.

This interview has been lightly edited for clarity.

Let’s start by breaking down “creativity.” In the book, you talk about three types of creativity. What are those and what do those breakdowns mean for the role of AI?

Many people think that artistic creativity is about expressing what it means to be human, and therefore, how could AI get anywhere close to that? I look at a lot of artists and show that quite a lot of art has pattern and structure behind it, which is quite mathematical in character. That’s why I believe artistic creativity may be more about pattern and algorithm than we give it credit for, and very often the patterns are hidden, and maybe that’s something AI can discover because it seems to be very good at discovering hidden patterns.

There’s exploratory creativity, which is taking the rules of the game and pushing them to the extreme, like Bach. There’s combinatorial creativity, where you’re taking two ideas that have nothing to do with each other to see how associations in one can help stimulate new ideas in the other. The third creativity, which is somehow the most mysterious, are those moments that somehow seem to come out of nowhere — those phase changes when suddenly you’re boiling water, and water becomes steam and changes state completely.

And where does AI fit into each of these patterns?

Each of those creativities offers a different challenge to AI. Exploratory creativity seems perfect for a computer because that’s what a computer can do, so many more calculations than a human brain could ever do. Combinatorial creativity is interesting, [an AI] could learn patterns and apply them to new areas. But I think the most challenging one is the idea of getting something new and breaking out of the system.

Traditionally, it was thought, “How could AI break the rules? Isn’t it stuck within a system because it’s programmed to do work in a particular way? How could it leap outside?” But if an AI is told, “I”m going to break the rules,” that is a rule in itself. You have a meta-code which tells the program to break the code underlying it.

In the book, you talk about a lot of creative AI projects. Which ones were particularly interesting to you?

One of the interesting ones was the jazz Continuator, which took the music that a jazz musician was playing, learned the patterns, and started to play that music for the jazz musician. What was striking was the jazz musician’s reaction. He said, “Everything I hear, I understand. That’s my world of music. It’s playing like how I play, except it’s playing things I’ve never thought of doing before with my musical sound world.”

So I think this is one of the exciting roles that AI will play going forward. Very often, humans start repeating patterns of behavior. Funnily, we become more like machines because we just repeat things, so what I think is exciting is that the jazz Continuator kind of gave the musician a little bit of a kick and stopped him behaving like a machine. It helped reawaken his creativity because he was shown that there were things he could do with the ingredients that he already had and that he hadn’t realized was possible. I wanted to show that the role an AI can play in creativity is perhaps to enhance human creativity, that this will be a partnership going forward, that together we can make things more interesting than if we just worked on our own.

The other interesting story that I think is really important to this whole book is actually from the world of visual arts and that’s Google’s DeepDream. Google asked its visual recognition software to see what it saw in a random array of pixels, and by dialing up the images that it was seeing we learned something about how the AI was thinking, how it was seeing, and how it was programmed.

What’s the significance of that?

One of the challenges of AI today is that many of the machine learning programs produce code, but we don’t understand quite how it’s working. The Google DeepDream project is helping us find a way to understand how that happens. So just as art for us as humans is a way of helping us get inside the mind of another human, maybe art produced by AI will help us get inside the workings of this code that is quite mysterious.

Take a project like Microsoft’s Rembrandt project [which creates AI-generated images in the style of Rembrandt]. You might say, “Well, what on earth is the point of producing another Rembrandt? Don’t we have fantastic Rembrandts already?” There is a point, which is that it might help us understand new things in the work of art. If you look at Jackson Pollock’s work from a mathematical standpoint, we can see new things that we missed before. So there’s an interesting role that AI can play in revealing new structures that we might have missed in works of art that we now take for granted.

That sort of pattern-detection isn’t limited to just the visual arts, right?

Well, in the world of film, let’s take the Netflix algorithm that recommends the films we might like. It can divide films in interesting new ways. Some of the groupings we could identify as “it grouped all the comedies together,” but sometimes it was grouping films in clusters based on humans’ expressions of likes and dislikes where we couldn’t understand what was the common theme. It’s almost like the AI identified a new genre of film that we didn’t even have a word for. It’s like saying, “there is another kind of flavor inside here and you need to name this.” It can take our creative output and perhaps see things that, subconsciously, we’re expressing but haven’t made conscious yet. It can help us consciously articulate what might be there inside our art.

“If an AI is told, ‘I’m going to break the rules,’ that is a rule in itself.”

There are many creative fields. Is there one that you find AI struggles with the most?

One of the surprises for me was how challenging the written word is. There’s so much written word available for AI to learn on. I was quite surprised that although AI is now quite good at writing short-form literature, it’s still not able to really sustain the written word over a long term. It doesn’t have a good sense of narrative arc, for example. I haven’t seen anything that keeps a coherent story going beyond three pages. I’m really looking to see whether that is achievable, and I don’t see why it can’t be, but it might be very challenging for AI to be able to articulate language as sophisticated as we do. Maybe it needs more than just exposure to data, maybe it needs a period of evolution as we have been through, and the question is: How long will it need?