Chesthetica Composes Custom Mates

by Azlan Iqbal
4/7/2017 – He has written extensively about Chesthetica, an automatic and computationally creative composer of chess problems, in the past, and now would like to update interested readers and artificial intelligence (AI) researchers about a new feature he has implemented into the program. Dr Azlan Iqbal, who has a Ph.D. in artificial intelligence, thinks that his program could abide by all the requirements of a good, traditional chess problem, given a year’s additional work customizing the code.

The new feature is present in v10.43 of Chesthetica. I did it on my own time and based on my own interest in the area, as funding with regard to the development of the Digital Synaptic Neural Substrate (DSNS) technology behind it has long been exhausted. Essentially, the DSNS serves as the ‘spark’ of creativity in the program by combining stochastically, feature information taken from other domains such as paintings, music and other chess problems. Not unlike how a human might suddenly be ‘inspired’ to draw something original after looking at a photograph and listening to some music.

The new feature I am referring to enables Chesthetica to compose customized chess constructs (a type of chess problem or puzzle) based on a prespecified selection of pieces. Previously, Chesthetica used the DSNS approach to automatically compose original three-movers, four-movers, five-movers and studies that featured any number of piece combinations determined by the program. These were derived from relatively little chess knowledge and did not at all use endgame databases, which are presently limited to seven pieces anyway. While this sometimes led to somewhat complex positions and difficult mates and studies, I realized that the same technology could be expanded to include prespecified piece types and amounts, however absurd it may seem. So one might desire to see ‘interesting’ mates (and even studies, actually) of say, three rooks versus three knights or even where a queen, rook, bishop, knight and two pawns work together to checkmate or win against a lone king.

Eager to test this new feature but not being particularly creative chess-wise myself (I am more of an AI person than a master chess player) I decided to look into the piece distribution of one of Pal Benko’s recent compositions, specifically, the first one featured here.

I found it interesting how Mr Benko lined up all the pieces in a single file for a forced mate while featuring the somewhat unusual combination of two bishops, a knight and two pawns against a lone king. Of course, Mr Benko is quite unlike Chesthetica in that he is a master chess problem composer with many decades of experience and a wealth of chess knowledge in his sophisticated human brain.

He is also very particular about what constitutes a good, traditional chess problem. Chesthetica has no such constraints programmed into it and is more concerned about constructing an ‘interesting’ puzzle that would reflect some amount of creativity. For instance, the kind of thing a ten-year-old child who had been playing chess for say, a couple of years might be able to compose given those pieces or better. In AI, a system being able to equal or outperform the creativity of even a young child says a lot about the viability of a new computational approach, especially considering limited hardware resources (a simple notebook computer) running just for a few hours.

Anyway, here are a few examples of what Chesthetica managed to come up with in just a matter of hours using the same pieces as Pal Benko’s problem. Again, Chesthetica enforces no specialized traditional composing knowledge (such as an insistence that two bishops must be on different-colored squares) and ‘decided’ to place the pieces on the particular squares you see based on the DSNS technology it uses. So do not ask me why it composed these particular problems as I have no idea myself. You can move the pieces on the boards below to find the solutions. They are given on a JavaScript replay board at the end, with the main line chosen by Chesthetica based on its internal aesthetics model.

There were others like these as well but I do not want to take up too much space in this article. The point here is that should such positions have been composed with the given pieces by a ten-year-old child, most people would be impressed. From an AI perspective, it would be clear evidence of creativity which is what the DSNS delivers, at least in chess, where it has been tested for now. Given the likely hundreds of billions of possible positions that could have been formed with these pieces, why should Chesthetica have ‘stumbled’ upon these in just a matter of hours? Why should it have stumbled upon any checkmates at all? Hence the argument for machine creativity. Could Chesthetica compose highly specialized traditional chess problems and abide by all the requirements master composers say constitute a good, traditional chess problem? Probably, given a year’s additional work customizing the code, consulting with master composers and conducting various experiments to verify the results.

Alas, no one is interested in funding such research, including master composers themselves, and personally, I do not share their taste in beauty anyway; but to each his own. Chesthetica, even with no specialized composing knowledge and running on just a simple notebook computer is still a better composer than 99% of humans on the planet, I am fairly certain, and this says a lot from an AI perspective. Here is another composition featuring three rooks versus three bishops that I decided to give a try, just to see what Chesthetica might come up with.

There is actually theoretically unlimited potential to compose given the new feature of prespecified pieces and I would love to hear from readers about new piece combinations to try. Perhaps three knights and three pawns versus a queen? How about five queens versus five rooks, three bishops and a pawn? Send me your ideas and thoughts at azlan at uniten dot edu dot my.

Solutions to the Chesthetica mate problems

YouTube videos introducing Chesthetica constructs

Previous ChessBase articles on the subject by Prof. Azlan Iqbal

  • Pál Benkö: Can computers compose artistic problems?
    6/14/2016 – Some time ago Dr Azlan Iqbal presented a program, Chesthetica, that was composing chess problems. We published ten examples of three-movers by the machine. Now a leading expert in the subject, Pal Benko, who is one of the finest problem composers in the world, tells us what he thinks about the quality of the computer compositions – and also what are the criteria that make a chess problem valuable.

  • Azlan Iqbal: Studies and a Decade in Development
    5/31/2016 – Chesthetica, a computationally creative chess problem composer, has added studies to its repertoire. Dr. Azlan Iqbal shows us examples and looks back upon a decade of its development. He also describes the challenges he faced in trying to introduce the technology in the field of protein folding which might have yielded cures to diabetes, cancer and other deadly diseases. From chess to computers to medicine.

  • Azlan Iqbal: Recomposition contest II result
    4/30/2016 – Over Christmas we had an interesting problem: say you have found some moves somewhere, in coordinate notation without piece names – is it possible to reconstruct the original supposedly meaningful position to which they apply? Later the author, who has a Ph.D. in artificial intelligence, presented a second puzzle, and the winner gets a valuable prize.

  • Women and beautiful chess – a response to critics
    3/27/2016 – "I write for ChessBase because, as a kind of ‘community service’, we academics are expected to convey our research to the public in more palatable and widespread forms than just technical papers," writes Dr Azlan Iqbal. Unfortunately some readers interpreted his last article to be misogynistic, having “gratuitous sexist content”. The author replies to his critics and describes the application of the scientific method to an area as nebulous as aesthetics in chess.

  • Do women play more beautiful chess?
    2/26/2016 – Azlan Iqbal, senior lecturer at the Universiti Tenaga Nasional in Malaysia, has been working for years in the field of Artificial Intelligence, trying to program machines to evaluate aesthetics. After making the Chesthetica software that is able to create an unlimited number of problem-like chess constructs he has turned his attention to gender-based playing style. Here are first results.

  • Azlan Iqbal: Recomposition contest result
    2/24/2016 – Over Christmas we showed you an interesting problem: say you have found some moves somewhere, in coordinate notation without piece names – is it possible to reconstruct the original supposedly meaningful position to which they apply? The author, who has a Ph.D. in artificial intelligence, tried to do it, but with modest success. A reader presented a more plausible solution and won a valuable prize

  • ChessBase Chrismas Puzzles 2015 (5)
    12/29/2015 – Here's an interesting problem: say you have found some moves somewhere, in coordinate notation without piece names – e.g. 1.h7g5 d8g5 2.b5d5 d1c2 etc. Can one reconstruct the original supposedly meaningful position to which they apply? Azlan Iqbal, who has a Ph.D. in artificial intelligence, retraces his thought processes when he tried, in this unique exercise in forensic chess. Help him and you can win a special prize.

  • Chesthetica Composes Longer Mates!
    9/7/2015 – This program, written by Prof. Azlan Iqbal, is an ever-improving attempt to create an artificial intelligence that composes chess constructs, a type of chess problem, from scratch, using a new AI technology and a model of human aesthetic perception. As expected, there has been some criticism that the results are not up to the standard of top problem composition. Is this justified?

  • Celebrating 300 machine generated problems
    5/31/2015 – As we reported before, Chesthetica, a program by Azlan Iqbal, is autonomously generating mate in three problems by the hundreds, and the author is posting his selections in a very pleasing format on YouTube. The technology behind the program’s creativity is a new AI approach and Dr. Iqbal is looking for a substantial research grant for applications in other fields.

  • Computer generated chess problems for everyone
    2/6/2015 – Now they are composing problems that fulfil basic aesthetic criteria! Chesthetica, a program written by Azlan Iqbal, is churning out mate in three constructs by the hundreds, and the author is posting them in a very pleasing format on Youtube. How long will Chesthetica theoretically be able to generate new three-movers? Quite possibly for tens of thousands of years.

  • A machine that composes chess problems
    11/7/2014 – Chess problems are an art – positions and solutions, pleasing to the mind and satisfying high aesthetic standards. Only humans can compose real chess problems; computers will never understand true beauty. Really? Dr Azlan Iqbal, an expert on automatic aesthetic evaluation, imbued his software with enough creativity to generate problems indefinitely. The results are quite startling.

  • 7/26/2014 – Best ‘Chess Constructs’ by ChessBase readers
    Chess constructs are basically an intermediate form of composition or chess problem, lying somewhere between brilliancies from chess history – and artistic chess problems, between real game sequences and traditional award-winning compositions. A month ago Dr Azlan Iqbal explained the concept asked our readers to submit compositions of their own. Here are the winners.

  • Azlan Iqbal: Introducing ‘Chess Constructs’

    6/29/2014 – People love brilliancies from chess history – and artistic chess problems. But there is a big gap between the two. Positions from games demonstrate the natural beauty of actual play, while chess problems are highly technical, with little practical relevance. The author of this interesting article suggest an intermediate form, one you can try your hand at – and win a prize in the process.

  • Can computers be made to appreciate beauty?
    9/2/2009 – Or at least to identify and retrieve positions that human beings consider beautiful? While computers may be able to play at top GM level, they are not able to tell a beautiful combination from a bland one. This has left a research gap which Dr Mohammed Azlan Mohamed Iqbal, working at Universiti Tenaga Nasional, Malaysia, has tried to close. Here's his delightfully interesting PhD thesis.

  • A computer program to identify beauty in problems and studies
    12/15/2012 – Computers today can play chess at the grandmaster level, but cannot tell a beautiful combination from a bland one. In this research, which has been on-going for seven years, the authors of this remarkable article show that a computer can indeed be programmed to recognize and evaluate beauty or aesthetics, at least in three-move mate problems and more recently endgame studies. Fascinating.

  • A new, challenging chess variant
    2/2/2014 – Ever since desktop computers can play at its highest levels and beat practically all humans, the interest of the Artificial Intelligence community in this game has been sagging. That concerns Dr Azlan Iqbal, a senior lecturer with a PhD in AI, who has created a variant of the game that is designed to rekindle the interest of computer scientists – and be enjoyable to humans as well: Switch-Side Chain-Chess.

Dr. Azlan Iqbal has a Ph.D. in artificial intelligence from the University of Malaya and is a senior lecturer at Universiti Tenaga Nasional, Malaysia, where he has worked since 2002. His research interests include computational aesthetics and computational creativity in games. He is a regular contributor at ChessBase News.
Feedback and mail to our news service Please use this account if you want to contribute to or comment on our news page service


Rules for reader comments


Not registered yet? Register

AgainAgain AgainAgain 4/7/2017 02:44
Why Chessbase why??
benedictralph benedictralph 4/7/2017 03:10
Wow. I didn't realize chess programs could already do this kind of thing.
moonsorrow55 moonsorrow55 4/7/2017 03:28
Not this guy again... *groans*
Exabachay Exabachay 4/7/2017 04:36
Mate the naked king with 35 pieces; so much beauty.
Avenar Avenar 4/7/2017 05:58
This would have been a great article 6 days ago.
Mr TambourineMan Mr TambourineMan 4/7/2017 07:07
Iqbal there are no interested readers to update.
"Mr Benko is quite unlike Chesthetica in that he (---) has an sophisticated human brain."
Yeah fly me high, strap yourself to a tree with a root...
genem genem 4/7/2017 11:54
I find the second puzzle particularly interesting, with its two white bishops both dark squares. It takes a specialized tactical eye to detect or build the kind of cages which surround Black's doomed king. Nonmate shot puzzles do Not train this type of tactical perception. The majority of mate shot puzzles don't really teach it either. Hmm, a gap in the body of chess literature? Thanks.
TMMM TMMM 4/9/2017 07:39
Don't listen to them Azbal! They are pathetic people who do not understand! SAD! You can surely make chess compositions great again! Chesthetica first!
GeorgeTsavdaris GeorgeTsavdaris 4/9/2017 10:15
And where can we find this program to download or buy?