Chess Endgame Tablebase in Python: Finding Forced Mates (PyMinMaximus Part 5)
Learn how to build and integrate a simple King + Rook vs King (KRK) endgame tablebase into the PyMinMaximus chess engine. This pre-computed database ensures perfect play in KRK positions, finding the quickest mate in O(1) time using the principles of retrograde analysis. The implementation covers position encoding, symmetry reduction, and the final search integration for a complete Book → Tablebase → Search hierarchy, saving thousands of search nodes.
PyMinMaximus Part 4: Creating an Opening Book
In or previous posts, we created a chess engine, but we have a glaring weakness: PyMinMaximus wastes time "thinking" about well-known opening positions that have been analyzed for centuries. While PyMinMaximus calculates for 5 seconds to decide between 1.e4 and 1.d4, it could instantly play proven opening theory and save that time for complex middlegame positions.
With an opening book, PyMinMaximus plays the move instantly (0.001 seconds), saving 20-30 seconds in the opening phase. It plays mainline theory with proper move orders and avoids known tactical pitfalls. That's a massive practical advantage! In this post, we’ll solve this problem by implementing opening books from scratch, using the Polyglot format and Zobrist hashing.
PyMinMaximus Part 3: Position Evaluation – Teaching the Engine Chess Strategy
This post is part of the PyMinMaximus series — a step-by-step guide to building a chess engine in...
PyMinMaximus Part 2: Game Trees and MinMax Algorithm – The Brain of the Engine
This post is part of the PyMinMaximus series — a step-by-step guide to building a chess engine in...
Building PyMinMaximus: A Chess Engine from Scratch
Building a chess engine in Python starts with a deceptively simple question: how do you represent a board in code? In Part 1 of the PyMinMaximus series, we tackle board representation and legal move generation — the foundation everything else is built on.
Building a Wi-Fi Temperature Monitor with Raspberry Pi Pico W: From Breadboard to Dashboard
In my last post, I referenced a temperature collector app that we implemented in Flask. The purpose of...
Modular Flask Apps: A Guide to Application Dispatching
In our prior post, we showed how to create a basic Flask app (in our case to choose...
From Indecision to Delicious: How Flask Solved Our Dinner Dilemmas
Recently, after a long day of work and school, my family decided to go out to eat. There...
How to Convert GLSL Shaders to OSL in Blender (With Working Examples)
GLSL and OSL share C-style syntax but differ in execution. This guide shows how to adapt GLSL examples for Blender's OSL renderer, with working shader code.
Fun with Prime Numbers
This week, I was helping my son with prime number factorization in his math homework. Beyond a basic...