Skip to content

2024

Chess: Forsyth-Edwards Notation

FEN - Forsyth-Edwards Notation

Part of the How to Program a Chess Engine in Lisp series.

Now that we have pieces and a board, we need a convenient way of setting pieces on the board in specific positions. We'll use this, not only for the initial position of a game, but also to configure a board with specific game scenarios for testing and debugging.

The standard way to do this is to use FEN, or Forsyth-Edwards Notation: [Wikipedia] [Chess Programming Wiki]

Here is the source for fen.rkt

Chess: the chess board

The Chess Board

Part of the How to Program a Chess Engine in Lisp series.

One of the most significant design decisions for a chess engine is how to model the chess board. I think the most competitive engines use a bitboard representation; however, for our purposes, a mailbox representation is more intuitive and easy to visualize. In particular, we will use a 10 x 12 board.

Here is the source for board.rkt