Chess Engines: A Zero to One Guide
Before you start on your engine, you need a board representation and some form of visualization. I’ve chosen Chess.js and Chessboard.js to start. Of course, you could build this yourself, but that isn’t really the point of this project. If you’re interested in learning about chess engine board representations, lookup “bitboards” and go from there - lots of interesting ways move generation and board state can be handled with maximum efficiency. In looking for a good library to work in, I found the Chess.js package. This is a great place to start. It handles all move generation, board state, FEN notation (will get to that in a sec if you don’t know what that is), etc. chess.js jhlywa ⋅ 2 months ago I do most of my work in Javascript, so this is perfect for me. Super simple (not the fastest) but great for speed and learning fast. Lots of space to mess around, though I’d recommend porting to a strongly typed and compiled language once you start optimizing for performance. Even if you don’t
♟️ This a guide on how to build a Chess engine from scratch , updated periodically as I further explore the space. This assumes some basic knowledge of Chess, search algorithms, and coding. Want to know how chess engines work? Or how AI is now better than every human on earth in chess? Or maybe how you can beat your younger brother who is stupidly good at chess? This is the place. 👋 This is getting a lot more traffic than I thought it would! This is one of my weekly projects, so if you like it, consider following me on Twitter to get updates when I release something new. - Thanks, Will DePue.
Explore this link on the map →saved by
related reading
- A Very Unlikely Chess Game | Slate Star Codexslatestarcodex.com
- Alpha–beta pruning - Wikipediaen.wikipedia.org
- Notes on Puzzles — Nabeel S. Qureshinabeelqu.co
- Can chess be solved? – Rising Entropyrisingentropy.com
- What is Chess? What to think and how long for - Alex Cromptonalexcrompton.com
- Chess Booksgoodreads.com
- Principal variation search - Wikipediaen.wikipedia.org
- OthelloGPT learned a bag of heuristics — LessWronglesswrong.com
- AlphaZero: Shedding new light on chess, shogi, and Go — Google DeepMinddeepmind.com
- Building a web search engine from scratch in two months with 3 billion neural embeddingsblog.wilsonl.in
- Monte Carlo tree search - Wikipediaen.wikipedia.org
- James Stanley - Hiding messages in chess gamesincoherency.co.uk