Dynamic Programming and Chess

Ido Ben Artzi
3 min readApr 17, 2021

Back in 1965, when Richard Bellman wrote his article ‘On the Application of Dynamic Programing to the Determination of Optimal Play in Chess and Checkers’, the goal was to create a chess-playing computer. However, today in 2021, when chess engines are already the chess player’s best friend, maybe we have an opportunity to learn back from them about how to calculate more effectively in the game we taught them.

Dynamic programming refers to a solution method to problems in which you need to calculate a repeating part of the problem (see figure 1). Imagine you need to find the best way to commute from home to work (In case your country got fully vaccinated). To do that, you’ll need to calculate how long it will take you in any of the possible paths. Your goal is to maximize the efficiency of your calculation by not repeating it for the same sub-road twice.

Dynamic programming navigation example
Figure 1 — Try to identify the repeating sub-structures in the three possible solutions to this navigation problem.

The question we address here is whether chess players can use the methods we trained computers to implement? Through the process of analyzing a chess position, we can also identify those repeating sub-structures. After evaluating those repeating sub-structures, we can establish some rules which can guide our calculation in future variations. For example: “Trading queens is good for me, cause my king is weaker”; “If I don’t hurry up with the attack, he’s in time to fix his pieces’ positions”; This endgame is winning (see figure 2). Doing this may save us time and energy and make our calculations more concise.

The opposition in chess
‘The Opposition’ — The most basic substructure in chess. White to play is winning and black to play is a draw.

However, I think this issue is more complex than it seems. Unlike computer calculation, human calculation in chess is filled with uncertainty. We usually don’t know if we’re right or wrong and if we’re missing a move that didn’t appear to us yet. Moreover, usually after calculating a sequence of chess moves the player has to evaluate the position. This evaluation process requires drawing upon past knowledge and may feel even more obscure. Furthermore, many mistakes are made due to rigid conclusion making, in which players hurry up to assume things about the position, which then blind their thinking process.

To sum it all up, the ‘dynamic programming’ technique of identifying repetitive sub-structures in your chess calculation may be a useful method to improve the clarity of your decision-making process. However, one should beware not to over-generalize and to get used to healthy skepticism and self-chess critical thinking.

I hope you enjoyed the article. Please follow me to get updates about future articles :)

--

--

Ido Ben Artzi

Chess International Master, PhD candidate in Cognitive Neuroscience in Tel Aviv University. I mentor kids in their chess journey for more than 10 years now.