SFU student creates his own chess engine

Vincent Yu designs computer with chess rating higher than any human player has achieved

a chess board with pieces
PHOTO: Jon Tyson / Unsplash

By: Gabriel Kitsos, SFU Student

Editor’s Note: Gabriel Kitsos and Vincent Yu are both affiliated with SFU’s chess club. 

Vincent Yu, a fourth-year computing science student, received recognition for his chess computer in August 2020. Today, Yu’s chess computer is among the top 100 in the world. He spoke with The Peak about his motivation and the process of designing his chess computer.

Yu is a self-taught chess player who began playing his first online chess games to kill time while waiting for class to start. With his background in computing science, Yu realized he could make a program that plays chess.

“I wanted to make a chess board at first,” Yu said. He then added pieces such as kings, queens, knights, and pawns. 

Yu said he did not know any chess players and decided to build a program using artificial intelligence to play with him. After some games with his computer, Yu saw places for improvement. 

From there, Yu started making his current chess engine, naming it Mr. Bob

“I knew nothing about chess engines before,” Yu said. He relied largely on intuition along with online resources that show techniques of other chess programs.

Explaining the different components that went into Mr. Bob, Yu said he input “if/then” statements giving the computer commands, such as if there is a piece that’s one space diagonally above a pawn, then the pawn can capture it. 

He also told the engine how much each piece is worth. A queen is worth nine points, while pawns are only worth one; this is called “material advantage.” Engines must also learn to value how the pieces are arranged, otherwise known as “positional advantage.”

When the computer decides on a move, it will be whichever leads to the highest number value advantage. For example, if there’s an enemy knight (worth three points) which you can capture, but if the move also makes your king more vulnerable, the computer might value this at 2.6, as opposed to three. 

Yu can set the engine to look at least 20 moves ahead or further, depending on various factors such as how much time is allowed for each move.

He released his engine on GitHub,a software developing website where people build and contribute software. Yu entered new versions of the engine as he improved it. 

Mr. Bob was discovered by Chessdom’s Computer Chess Ratings List in August 2020. On September 11, 2021, Mr. Bob played 1,089 games, earning a ranking of 91 in the world in the blitz category. Blitz is a style of chess where the player has a few minutes to complete all the moves in the game; if the timer runs out, that player loses.

Yu continues to find his chess engine, and others, fascinating. They are known to play moves that almost make no sense to humans, and require patience to understand.“Even the weak engines are interesting to play because they play a lot of non-human moves. You’ll be like ‘ohh what is that move?’ But then it turns out to be an amazing move.” 

For those interested in chess, SFU’s chess club is recruiting new members. You can also watch Mr. Bob play chess on Youtube.

SHARE