# Expecting inspiration

## by Geraint Wiggins and Paul Curzon, Queen Mary University of London

An important part of creativity is inspiration - ideas appear from somewhere. If we are writing programs to be creative, how do we get them to have creative ideas or even "Aha!" moments? It may be all about what they expect.

A clue to why expectation is important lies amongst all the cute animal videos on the web: videos of magic tricks for dogs! The magician makes treats disappear and we see the dog's confused reaction. The dog tries to find the missing snack by looking down, then around, then further away. This demonstrates expectation. The dog made predictions of what would happen, creating a scenario where they got the biscuit. It then used them to search, gradually looking in more unexpected places.

We too have evolved to predict our world so we pay more attention to unexpected things - its how we survive. It's been suggested that, as a result, changes in uncertainty are important to the way we experience music. Music is creative when it defies our expectations. Giving computers expectations may therefore be a key to creating creative computers. So can we write programs that have expectations?

One way, being explored by the Queen Mary 'Information Dynamics of Thinking' project, is to build a system that learns expectations based on a mathematical idea called Markov Models. Imagine a game where you are shown sequences of shapes. You have to work out what will come next. As you see more sequences you can start to make predictions, working out the probability that the next card is a given shape. A simple way would be based on just how often a card has come up - on the assumption that the most common symbols are more likely to come up again. You can do better though, starting from the first symbol you can work out, from the sequences seen, the probability of chunks (pairs, of triples, ...) occurring. You are now taking context into account. This is a very general approach that applies to understanding conversations or music, for example. You have a model of expectation, of what will come next, based on experience, that can be implemented as a program.

This gives a way to approach composing creative music, for example. First work out the expectations of what comes next based on what already exists. Then choose something that is unlikely to actually come next. Fit this with models of other thought processes such as judging "pleasingness" of the things created and we may be a step closer to understanding 'Aha!' moments in humans (and maybe even dogs).