Part IV: Testing - Level Up as a Software Engineer by Writing a Chess Engine

Healthy software requires testing. Today, testing is inseparable from the development cycle because it improves reliability and eases refactoring which speeds up features development. This article covers common testing strategies used in chess engine development. These strategies follow tech industry best practices and can be applied to any software project. Component Testing A chess engine requires a move generation function to calculate legal moves. This is a foundational component of the chess engine’s overall quality. ...

February 20, 2022 · 4 min

Part III: Move Generation - Level Up as a Software Engineer by Writing a Chess Engine

How does a computer think? It must know two things: what is possible and what is optimal. A chess move generation function calculates what is possible from a given position. An evaluation function determines what is optimal. Move generation is the marriage of these two capabilities and the focus of this article. A note about the evaluation function No computer can “see” to the end of a chess game but the engine still needs to find advantageous positions. This is why an evaluation function is necessary to score the approximate advantage of a position. ...

February 12, 2022 · 6 min

Part II: Data Structures - Level Up as a Software Engineer by Writing a Chess Engine

Internal board representation is a good place to start if you are building a chess engine. In other words, how will the program represent a chess position? Resolving this question correctly requires thinking through the entire solution before going to the keyboard. Naive Approach The naive approach is to simply look at the board and come up with a structure that can encode the information. For example, you might use an array of length 64, encoding the pieces as single characters. ...

February 4, 2022 · 9 min

Part I: Introduction - Level Up as a Software Engineer by Writing a Chess Engine

I’ve always learned better working on projects rather than reading theory. So, when I started to learn Golang I wanted to find a challenging project requiring a variety of software engineering concepts. I ended up writing a chess engine and it turned out to be more challenging than I had anticipated. It also greatly improved my skill in applying important software engineering concepts. I want to share the challenges that make chess programming such a great way to level up as a software engineer. ...

January 25, 2022 · 4 min