Ludwig – a synthesis of chess and music

by Frederic Friedel
12/4/2006 – Do chess and music have anything in common? Can Fritz compose musical arrangements? The surprising answer to these questions is "yes!" This was driven home by Matthias Wüllenweber of ChessBase in a remarkable lecture held in the National Art Gallery in Bonn, where he introduced our latest software development: Ludwig. Da-da-da-daaa!

ChessBase 14 Download ChessBase 14 Download

Everyone uses ChessBase, from the World Champion to the amateur next door. Start your personal success story with ChessBase 14 and enjoy your chess even more!

Along with the ChessBase 14 program you can access the Live Database of 8 million games, and receive three months of free ChesssBase Account Premium membership and all of our online apps! Have a look today!


How chess programming applies to music

Chess and music — people love to bring them together. Wasn't Philidor, the great chess master, also a renowned composer of classical music? Mark Taimanov is an accomplished concert pianist, former world champion Vassily Smyslov an operatic singer. And isn't chess itself a form of art, in many ways related to music?

The answer is yes, chess has much in common with music. But not, perhaps, in a way that we normally think. Chess is related to music composition because the latter can be programmed in much the same way as chess is programmed. Surprised?

Matthias Wüllenweber introducing Ludwig in the theatre of the Art Gallery
in Bonn (where on alternate days Kramnik plays Deep Fritz)

The head of the programming department of ChessBase (and co-founder of the company) is Matthias Wüllenweber, originally a physicist, who in 1987 wrote the first professional chess database program. In 1991 he was directly involved in developing Fritz, the program that today is playing world champion Vladimir Kramnik.

Yes, say Matthias, in one sense a chess program can compose music

Matthias is also an amateur musician. He plays the piano very competently, fluidly improvising in classical or modern style. He also plays a number of other instruments, less proficiently but with great enthusiasm. The latest is the flute, which he is eagerly trying to learn in his spare time.

A few years ago Matthias started to experiment with music composition. Not with a pencil stub and sitting at the piano, but with the computer. He started to write algorithms and program code that assisted in finding harmonic and rhythmic arrangements to a tune. In this endeavour he discovered that he could use many of the techniques we find in computer chess: a brute force tree search, evaluation, cutoffs and pruning, and a host of other algorithms. Soon the program was not just supporting the musician, it was actually composing music all by itself.

Explaining the tree search of a chess playing program

... and the analogous search by Ludwig

A first module of this music composing software was introduced to the general public – to you in fact – with Fritz 9. You may have noticed that every visitor to the Playchess server has his own little musical theme, which is played when he enters one of the rooms. You yourself have one, and its exact composition depends on the name you have given yourself as a Playchess handle. The tunes allow you to recognise, acoustically, when friends enter the playing site. You will also hear a full melody if you start the program and allow the splash screen to remain on your monitor for a few minutes. These functions are, of course, also available in Fritz 10 (but are prudently switched off in the version that is playing Kramnik).

In the meantime, ChessBase has developed a full-fledged music composing program, appropriately named Ludwig. Matthias Wüllenweber appropriately introduced to the general public in the National Art Gallery during the Man vs Machine event – appropriately because the great German composer Ludwig (aha!) Beethoven was born and lived in Bonn.

Setting the type and style of the music in Ludwig

Speaking in front of a large audience that listened in visible awe, Matthias explained the mechanisms that Ludwig and Fritz have in common. Naturally he also played some of the fledgling compositions of the program, from classical to ballad to pop melody, in different selectable styles. Incidentally the pieces are composed on the fly – just like Fritz playing (composing?) a game of chess.

But how can Ludwig be genuinely useful to your average computer user? Do normal people need a program that can compose hundreds of nicely arranged songs every day? Obviously this would be a fairly restricted application. So Ludwig goes beyond that. It is a genuine musical companion.

Matthias Wüllenweber playing the flute together with Ludwig

The basic idea is that people who want to learn a musical instrument have problems finding appropriate scores to learn from. And appropriate partners to join in and make the learning process more enjoyable. This is where Ludwig comes in. You tell the program what instrument you are playing, and what level of proficiency you have reached. This can, for example, entail telling the program that you are playing the flute and know how to play ten notes. Then you tell the program what kind of music you like. After this Ludwig composes a piece for you, with the flute remaining within the ten notes you have specified. The piece has full accompaniment, with appropriate instruments. So while you are playing a very simple tune on the flute, the piece already sounds quite impressive. You can be playing the solo part in an orchestra, a string quartet or a big band.

Sounds great in theory, but does it actually work? Matthias Wüllenweber showed the audience in Bonn that it actually does, using himself as a prime example. He played the flute as a child, and after a 30-year pause last year bought himself a flute and started to play again. Now Ludwig was helping him practice. In an act of extraordinary courage, Matthias demonstrated to the audience how he was coming along.

Report by Frederic Friedel; photos by Wolfgang Rzychon

Examples of Ludwig compositions

Editor-in-Chief of the ChessBase News Page. Studied Philosophy and Linguistics at the University of Hamburg and Oxford, graduating with a thesis on speech act theory and moral language. He started a university career but switched to science journalism, producing documentaries for German TV. In 1986 he co-founded ChessBase.
Discussion and Feedback Join the public discussion or submit your feedback to the editors


Rules for reader comments


Not registered yet? Register