U of T Engineering researchers use chess AI to understand human creativity

From left to right: Kamron Zaidi (EngSci 2T3 + PEY) and Professor Michael Guerzhoy (MIE, EngSci) use game trees and deep neural networks to enable chess engines to recognize brilliant moves. (photo by Safa Jinje)

From left to right: Kamron Zaidi (EngSci 2T3 + PEY) and Professor Michael Guerzhoy (MIE, EngSci) use game trees and deep neural networks to enable chess engines to recognize brilliant moves. (photo by Safa Jinje)

Researchers at the University of Toronto’s Faculty of Applied Science & Engineering have designed a new chess AI that understands how humans perceive creativity in chess.  

This development could lead to chess engines that can find the most creative and clever path to victory in game, rather than just making moves to maximize its win rate. It could also have implications for other creative endeavours that employ AI.  

In a recently published study, Professor Michael Guerzhoy (MIE, EngSci) and Kamron Zaidi (EngSci 2T3 + PEY) use techniques such as game trees and deep neural networks to enable chess engines to recognize brilliant moves.  

“A chess move can be perceived as brilliant, or creative, when the strategic payoff isn’t clear at first, but in retrospect, the player had to follow a precise path in gaming out all the possibilities to see so far into the future,” says Guerzhoywho wrote about the research on his Substack.  

“We wanted our system to understand human perception of what constitutes brilliance in chess and distinguish that from just winning.”  

Most of the current research into chess AI is focused on enabling moves that create a higher chance of winning to maximize the chess engine’s win rate. But this doesn’t always make for an exciting game.   

Skilled human chess players, on the other hand, can play in a more dramatic or imaginative way, making moves that may break traditional rules, such as sacrificing a piece in a way that may look bad at first, but ultimately paves the way to a win.  

The team worked with Leela Chess Zero, currently one of the top chess engines, which learns through self-play and has played over 1.6 billion games against itself. They also employed Maia, a human-like neural network chess engine developed by U of T computer science researchers  

“We used the two neural network chess engines to create our game trees at different levels of depth in a game,” says Zaidi.   

“Using these game trees, we extracted many different features from it. We then fed the features into a neural network that we trained on the Lichess database of online chess games, which are labelled by human users of the database.” 

A close up of a chess game depicting a move from the “Game of the Century,” where Bobby Fischer (black) sacrifices his queen in a celebrated brilliant move.
A chess move can be perceived as brilliant when it breaks traditional rules, such as sacrificing a piece in a way that may look bad at first, but ultimately paves the way to a win. Chess board depicts a move from the “Game of the Century,” where Bobby Fischer (black) sacrifices his queen in a celebrated brilliant move. (photo by Safa Jinje)

A game tree in chess represents the current state of a chess board along with all the possible moves and counter moves that can occur. Each board position is represented as a node and the game tree can be expanded on until the game is either won, drawn or lost. 

The researchers began with small game trees then slowly increased the size, adding more nodes to the tree. They found that when the neural network looks at all the game tree features and makes a prediction as to whether the move is brilliant or not, it reached an accuracy of 79% using the test data set.  

The research — based on Zaidi’s undergraduate Engineering Science thesis, which was supervised by Guerzhoy — was presented at the International Conference on Computational Creativity in Jönköping, Sweden.   

“There were people from all over the world presenting research on more traditional aspects of creativity, but we were all focused on the same thing, which is, ‘how can we use AI to enhance our interactions and understandings of creativity?’” says Zaidi.  

The work has also received media coverage in outlets, including New Scientist, where English chess grandmaster Matthew Sadler says that a model that can understand brilliance could be used as a training tool for professionals, and potentially lead to a more entertaining engine opponent for amateur players.  

The team sees their system as having broad applicability when it comes to perception of creativity and brilliance.  

“One of the biggest areas that is of interest to me is characterizing what we perceive as creativity,” says Guerzhoy.   

“Not just in board games but in other creative endeavours, including music and art, where there is a formal framework and rules that need to be followed. Highly creative work involves planning in advance and gaming out the possibilities. 

“But everyone I’ve talked to since the paper came out wants to know when they can play against our brilliant chess engine. So, I think making that possible is the obvious next step for us.” 

– This story was originally published on the University of Toronto’s Faculty of Applied Science and Engineering News Site on July 22, 2024, by Safa Jinje.

 


© 2024 Faculty of Applied Science & Engineering