r/chessprogramming • • Apr 01 '23

Play chess in your terminal

74 Upvotes

I've been working on a program for a while which allows playing chess (online or offline) in your terminal. I published the initial release a couple days ago and have been excited to share it around! The project is called cli-chess.


r/chessprogramming • • Jul 05 '22

Draw rates among top players: Who are the most drawish?

Post image
55 Upvotes

r/chessprogramming • • Jun 01 '26

State of this sub

49 Upvotes

This sub has just become a 24/7 stream of vibecoded crap with some gems in between.

To all you folks posting this stuff: If you have any capability of self-reflection, before purchasing a domain and letting it expire after a year because of losing interest or because your app is just re-iterated garbage that's been posted in many forms here already, just scroll through this sub and convince yourself the world really doesn't need your chess app even though uncle Chat thinks you're a fucking genius.


r/chessprogramming • • 18d ago

Could a modern chess engine on a Pentium have defeated Kasparov in 1996?

Thumbnail
nicholas.carlini.com
47 Upvotes

r/chessprogramming • • Jan 08 '26

The most beautiful game of chess ever played was most likely played between two engines on a server somewhere and never seen by human eyes

38 Upvotes

Given the thousands of playtest games developers run to test their engines, it's almost guaranteed that the best or most beautiful game of chess ever played was played between two engines, never seen by human eyes, and no record exists of it anymore.


r/chessprogramming • • Dec 11 '25

Chess-tui: Play lichess from your terminal

34 Upvotes

Hey everyone! 👋
I'm Thomas, a Rust developer, and I’ve been working on a project I’m really excited to share: a new version of chess-tui, a terminal-based chess client written in Rust that lets you play real chess games against Lichess opponents right from your terminal.

Would love to have your feedbacks on that project !

Project link: https://github.com/thomas-mauran/chess-tui


r/chessprogramming • • Jan 16 '25

I created an app to manage databases and visualize them like this.

Post image
34 Upvotes

r/chessprogramming • • Apr 18 '26

I built a chess position search engine

Post image
33 Upvotes

Hey! How is it going? I've been toying with this idea for a while and finally came around to it! Its a tool that let's you find positions in real games (from Lichess only for now) based on specific pieces in the board or specific positional patterns.

I though this could be useful for chess coaches to find material for classes but maybe there's other use cases! I'd love to hear your thoughts!

https://insights64.com/


r/chessprogramming • • Feb 19 '26

Lichess Stockfish Blocklist

32 Upvotes

As many of y'all know, there is a huge amount of strong, low-effort lichess bots (typically running stockfish) that do nothing but to waste compute and take rating points from original effort engines we are trying to test.

For the past year, another engine developer and I have been curating a blocklist of such engines for almost a year. We've been updating it regularly as new ones pop up. We now have a comprehensive list of around 700 usernames.

Link: https://github.com/xu-shawn/lichess-bots-blocklist

We've integrated this to work seamlessly with the lichess-bot client. Simply add the following field under challenge and matchmaking:

  online_block_list:
    - https://raw.githubusercontent.com/xu-shawn/lichess-bots-blocklist/refs/heads/main/blocklist

...and it'll automatically pull the up-to-date list and regularly check for updates!

Contributions are welcome! Please open an issue or PR if you know a bot that should be on here (or was added by error).


r/chessprogramming • • Sep 03 '25

Quantum chess

Post image
31 Upvotes

I made an implementation of quantum chess, as a free public play zone, it's online already at http://q-chess.com/. The rules are more or less usual for quantum chess (if there's such a thing), all described in detail and with illustrations. Split and merge moves, superposition and observations, I tried to stick to the canon as closely as possible.

There's a computer opponent, you can invite somebody to play against you, and theoretically you can just get paired with somebody, like in normal chess apps.

The engine behind the computer opponent is of course not really an engine - I couldn't make use of any open-source engine because it doesn't work like with quantum chess, also I'd rather see people playing against each other than the computer. So it's just a simple minimax algorithm, with a somewhat random decision making for split and merge moves.


r/chessprogramming • • Apr 23 '22

Post your chess engines!

28 Upvotes

Hey everyone, post a link to your chess engines! Include the programming language it's written in, the approximate rating and a description of your engine and any unique design choices you made. I'm super interested in what everyone's working on, especially amateur engines. Chess programming is a complex and diverse topic, and there is certainly a range of skill sets within the chess programming community, so let's be supportive and share!


r/chessprogramming • • Sep 08 '26

Technical Chal v2.0.0 is now ~3100 Elo under 1k lines of C

26 Upvotes

A few months ago I posted here about hitting a wall with v1.4.0/v1.4.1 (~2700–2750 Elo), well the architecture was simple and readable by design, but I'd run out of easy wins without breaking that.

I ended up stepping away for a while rather than forcing it. I came back and did a full rewrite instead of another round of tuning.

v2.0.0 replaces the old 0x88 board with magic bitboards, and adds a simple NNUE (768->32->1, 256-bit SIMD accumulation) trained on v1.4.1 self-play data. SPRT vs v1.4.1 came out at +368 Elo, and speed is about 5x faster (800k -> ~4M NPS).

The part I'm proud of is that it's 934 lines. 65 fewer than the old 0x88 version, despite the full NNUE on top. Most bitboard+NNUE engines run 8,000–16,000 lines.

Same goal as always to see how much engine you can build with as little code as possible while keeping it readable.

Repo: https://github.com/namanthanki/chal


r/chessprogramming • • Mar 09 '26

Chal v1.3.0 is out now just hit ~2100 Elo under 827 lines of code

25 Upvotes

A while ago I posted about Chal, a small UCI chess engine I've been building as a learning project. The goal is to stay under 1000 lines of code while pushing strength as high as possible. I've released v1.3.0.

This version is a major overhaul. The evaluation was completely replaced with PeSTO/Rofchade Texel-tuned tables, a pile of correctness bugs in the search were fixed, and move ordering was rewritten. The result is a +224 Elo jump over the previous version confirmed by SPRT, and it now beats Stash v14 (~2054 Elo) convincingly in gauntlet testing across thousands of games.

Repo: https://github.com/namanthanki/chal


r/chessprogramming • • Feb 11 '25

How to determine your chess bot's ELO

25 Upvotes

I recently built my first chess bot and wanted to estimate its ELO rating. I encountered some challenges along the way, so I created a guide to help others do the same.

Hopefully, this will make the process easier for anyone looking to estimate their bot’s rating in the future.

Link to guide: https://anmols.bearblog.dev/how-to-determine-chess-bot-elo-lichess/


r/chessprogramming • • Oct 09 '26

Technical ChessOS: I created an operating system that can play Chess at approximatly 2750 elo

24 Upvotes

Requirements: x86 with legacy BIOS support

I spent about six months making an operating system whose only job is playing chess. It boots straight into Chess. It is not a full OS with a file system or scheduling but it can boot from bare metal.

It runs in QEMU, other virtual machines and hardware with legacy BIOS from a USB or CD drive. I spent about 6 months across the boot loader and chess engine. It is entirely open-source for you to tinker with. There is also a Windows Installer for less technical users.

The engine

Main source:

The engine's code can be found in the repo under kernel/chess_ai.cpp and kernel/chess_rules.cpp

A faster computer will search deeper within the allotted 7.5s the engine is allowed to compute due to the low-level nature of ChessOS. This is the main limiting factor that made it difficult to rate the engine properly. My engine against Stockfish 17 set to 2800 elo achieved a 5 win and 9 draws across 16 games.

The engine stores the board as a 64 square array and discards all moves that place it's king in check.

https://chessprogramming.org/PeSTO's_Evaluation_Function

Positions are scored with PeSTO’s piece-square tables that are blended between middle game and endgame values. Bonuses and penalties are applied for pawn structure, passed pawns, rooks on open files, and bishop pair.

The search uses alpha-beta with negamax. It uses iterative deepening until time runs out or elo's depth limit prunes moves that place it at a disadvantage. Deepening stops early once a mate within the current depth is found.

https://chessprogramming.org/Zobrist_Hashing

Rules and transposition tables are indexed by Zorbist hashing. Each entry stores score, depth, bound type and best move found. The moves are ordered by best TT move, captures of most valuable piece, promotions, killer moves and then all other moves.

To keep games varied white and black contain a few hard-coded opening moves.

The lower elos play at their rated elo except for a rare terrible blunder from random noise. I theorize that non-max elos play above their actual elo rank but the rare blunders would lower the overall score by approximately 100 to 200 points.

All feedback is welcome!

Thank you for Paledoptera for the artwork. Find more of their work here: https://linktr.ee/paledoptera

Website: https://chessos.xyz (Open source with Github link and installer)


r/chessprogramming • • May 02 '26

We made a GPT-structured chess bot - Reaching 2700 WITHOUT calculation

24 Upvotes

I’m the author of a small research project on sequence-based chess models.

The model is not a traditional search engine. It does not run engine-style tree search over future positions. Instead, it treats a chess game as a sequence of moves and predicts the next move autoregressively, similar to how language models predict the next token.

The part I’m trying to evaluate more rigorously is whether the model is using full game history in a meaningful way, or mostly imitating local move patterns.

Challenge it on https://lichess.org/@/CatieChess-Magnus


r/chessprogramming • • Oct 07 '26

Glimmer - A chess engine under 30,000 bytes (estimated 2700–2900 Elo)

Thumbnail
github.com
23 Upvotes

Hi everyone,

I’ve been tinkering with a little experimental chess engine written in pure C. It’s called Glimmer.

The whole point of the project was to see how strong I could make it while keeping the final standalone binary strictly under 30 KB. The target strength was something in the 2700–2900 Elo range.

It’s been a fun constraint to work under — every byte counts.

Happy to answer questions if anyone’s curious about the approach.


r/chessprogramming • • Apr 01 '26

Chal v1.4.0 ~2650ELO under 1k lines of C

23 Upvotes

Chal v1.4.0 is now ~2650ELO under 1k lines of C

A few weeks ago I posted about Chal hitting ~2400 Elo in v1.3.2. I've just released v1.4.0, and this one's a bit of a different story to tell.

The gains this time came entirely from search stack rewrite and speed optimizations, no new eval terms, just making the existing code faster.

The fun part: Fruit 2.1 is ~8,000 lines of C++. Chal is under 1,000 lines of C99.

The less fun part: I think I've hit a ceiling. The architecture is intentionally simple and readable, which is great for a learning project but there's only so much you can optimize before the design itself becomes the bottleneck. I've largely run out of easy wins.

It's a weird feeling and part disappointment at hitting the wall sooner than I'd hoped, part satisfaction that a sub-1k line purely HCE engine got this far at all. The whole point was never raw strength, it was to see how much you could do with as little code as possible while keeping everything readable.

Repo: https://github.com/namanthanki/chal


r/chessprogramming • • Apr 16 '25

I built cython-chess: a high-speed move generation library for Python chess engines (now on PyPI)

23 Upvotes

Hi everyone,

Building a chess engine has been a lifelong dream of mine, and over the last few years I finally dove deep into it, writing everything from scratch in Python. I explored everything from custom move generation to neural networks and even experimenting with visuals.

Eventually, I hit the same problem many of you probably have: performance. I switched over to using the python-chess library to get better move generation, but as with most pure Python code, it wasn’t fast enough for what I wanted to build.

That’s when I discovered Cython, a way to write Pythonic code that compiles down to near C/C++ speeds. It was a game changer. I even started writing custom C++ functions and calling them directly from Cython for extra gains.

The engine started as a personal project, but I realized that the Cython and C++ wrappers I built for python-chess could help others too. So I extracted that part into a separate open-source package called cython-chess.

What it does:

  • Speeds up legal move generation by up to 40%

  • Uses python-chess as the base, but with Cython-accelerated components

  • Lightweight and easy to drop into existing Python chess projects

  • Works out of the box, installable via pip

PyPI: cython-chess

GitHub: github.com/ranuja01/cython-chess

Note: Since this package uses both Cython and custom C++ code, you’ll need a C++ compiler installed to build it from source.
Full setup instructions are available in the README and on the PyPI page.

If you're curious about the bigger chess engine project that this came out of, I also wrote a comprehensive article about it here. It's more of a deep dive into the engine itself, with a small section on performance and how I got into using Cython.

This was a labor of love for me, and I’d love to hear what you think. Feedback, critiques, suggestions all welcome! Especially if you’ve worked on performance optimization in chess engines or Python/Cython projects.

Thanks


r/chessprogramming • • Oct 19 '26

Technical AggroChess v3.2: a Tal-style engine that sacrifices in almost every game

21 Upvotes

I’ve released v3.2 of AggroChess, my aggressive UCI chess engine written in Rust. It’s built to be fun to play against, not to beat Stockfish.

What’s new:

* It now plans sacrifices a move or two ahead, and sacrifices in about 9 out of 10 games

* It hates trading pieces and avoids draws

* When it has a forced mate, it goes for the flashy one (queen sacs into mate)

* New built-in gambit repertoire: King’s Gambit, Evans, Smith-Morra, Blackmar-Diemer, Stafford, Albin, Benko, a three-pawn Scandinavian and more

It’s deliberately weaker than v3.0 against engines because most of its sacrifices are speculative, but it holds up well against people. It beats the 2500 chess.com bots and gets close against the 2800 ones.

Source + Windows exe: https://github.com/PhelRin/AggroChess

Happy to hear feedback, especially your best games against it.


r/chessprogramming • • Aug 05 '26

Looks like chessprogramming.org now hosted by lichess.org

21 Upvotes

https://chessprogramming.org/ has been down for a few days, but I checked just now and see a message that it's now hosted by lichess.org


r/chessprogramming • • Jul 31 '26

chessprogramming.org down?

20 Upvotes

is it just me or is it down for everybody


r/chessprogramming • • Jan 14 '26

Chess in VSCode? AwaitChess!

20 Upvotes

Hey there!

What do you guys do while waiting your agent to finish coding? Or your tests to finish? Instagram? No, don't do it.

I introduce you... AwaitChess!

Without leaving VS Code, you can now play a quick chess match with AwaitChess. You sign in using your GitHub account easily and play with fellow developers! If no developers available, you can play with the chess bot too.

You can view the extension by clicking here.

I just released it so I'd appreciate if you can report the bugs you came across. Thank you so much.


r/chessprogramming • • May 28 '25

bulletchess, A high performance python module for chess

20 Upvotes

Hey everyone,

I've spent the past few months building a python module for chess as a C extension, similar to how NumPy works. It has many of the features of `python-chess`, but is up to almost 400x faster.

I started working on it after being frustrated with how slow `python-chess` was at engine building tasks, as well as data processing for machine learning. I'm pleased with how its turned out. I hope it can be useful for others as well.

https://zedeckj.github.io/bulletchess/index.html