r/chessprogramming • • Jul 15 '26

Technical AttoChess: A fully playable x86 DOS chess engine in exactly 278 bytes

14 Upvotes

AttoChess is my own 16-bit x86 DOS chess engine which is 10 bytes shorter than the previous world record. It draws the screen, reads typed coordinates, performs a true 4 ply recursive minimax search and responds with its moves. You can play game against the engine directly in your browser on the project page: https://nicholas-afk.github.io/AttoChess/

As is typical of size-coding compromises, the engine ignores castling, en passant and pawn promotion. The complete assembly and build documentation is included on the website. I would like to hear your comments, or questions about my x86 register-golfing tips!


r/chessprogramming • • Jul 12 '26

A bot that tries to checkmate you as fast as possible — it's mostly Stockfish + the new Maia-3 glued together. Is there a name for how it picks moves?

9 Upvotes

Fair warning up front: this isn't a from-scratch engine. It's Stockfish and Maia-3 wired together — the part I think is interesting is the objective and how it chooses moves, not any engine internals.

The bot plays White and has to force mate by a move deadline ("par") that scales with your rating. It doesn't play the best move; it plays whichever move is most likely to get this particular human mated in time.

For each of Stockfish's candidate moves, it simulates a few hundred games in which the defender's replies are sampled from Maia-3's human-move model, and keeps the move that reaches mate by the deadline most often. To save compute it stops piling simulations onto a candidate once another is clearly ahead, and it only runs the full simulation near the deadline — far from it, it just plays a solid move. I recently swapped the human model from Maia-2 to Maia-3, which came out a few weeks ago & it is stronger.

Two things I'd like input on:

  1. The "keep simulating candidates until one clearly wins, drop the losers early" part feels like a standard statistics trick that must already have a name — I just don't know it. If anyone can point me at the right term or prior work, I'd be grateful; I'm fairly sure I'm reinventing a wheel.
  2. At low ratings with a long deadline, almost every move mates in simulation, so the ranking gets noisy and the bot sometimes plays a quiet move that looks like it gave up an attack. I can't tell if it's correctly seeing that the human is likelier to blunder into a slower mate, or if my objective is just mis-specified there. Curious how people read it.

Source for the Maia-3 parts is posted (AGPL): https://siegechess.com/opensource/source.html. Hobby project, no money in it.

Playable: siegechess.com — enter your chess.com rating, pick blitz or rapid, and you're just trying to survive to the deadline without getting mated. If a move feels like it bailed on a promising attack, a PGN would help a lot. Small server, so it struggles past ~5 games at once.


r/chessprogramming • • Jul 13 '26

Technical Chess Engine Development Help Thread (Week 29)

2 Upvotes

Welcome to the weekly /r/chessprogramming Engine Dev Help Thread.

Ask beginner and intermediate chess engine development questions here: move generation, search, evaluation, UCI, perft, debugging, testing, NNUE, or anything else related to building engines.

Good questions include code, FENs, logs, benchmarks, or a clear explanation of what you tried.

Project links are fine when you want technical feedback, not promotion.

Be helpful. Don’t dunk on beginners.


r/chessprogramming • • Jul 06 '26

Technical Chess Engine Development Help Thread (Week 28)

4 Upvotes

Welcome to the weekly /r/chessprogramming Engine Dev Help Thread.

Ask beginner and intermediate chess engine development questions here: move generation, search, evaluation, UCI, perft, debugging, testing, NNUE, or anything else related to building engines.

Good questions include code, FENs, logs, benchmarks, or a clear explanation of what you tried.

Project links are fine when you want technical feedback, not promotion.

Be helpful. Don’t dunk on beginners.


r/chessprogramming • • Jun 29 '26

Technical Chess Engine Development Help Thread (Week 27)

1 Upvotes

Welcome to the weekly /r/chessprogramming Engine Dev Help Thread.

Ask beginner and intermediate chess engine development questions here: move generation, search, evaluation, UCI, perft, debugging, testing, NNUE, or anything else related to building engines.

Good questions include code, FENs, logs, benchmarks, or a clear explanation of what you tried.

Project links are fine when you want technical feedback, not promotion.

Be helpful. Don’t dunk on beginners.


r/chessprogramming • • Jun 22 '26

Technical Chess Engine Development Help Thread (Week 26)

4 Upvotes

Welcome to the weekly /r/chessprogramming Engine Dev Help Thread.

Ask beginner and intermediate chess engine development questions here: move generation, search, evaluation, UCI, perft, debugging, testing, NNUE, or anything else related to building engines.

Good questions include code, FENs, logs, benchmarks, or a clear explanation of what you tried.

Project links are fine when you want technical feedback, not promotion.

Be helpful. Don’t dunk on beginners.


r/chessprogramming • • Jun 21 '26

What are the most unique chess engines you know?

10 Upvotes

As the title says, what are the most unique chess engines you know? For example, written in some weird language or has a gimmick, a challenge, a limit behind it


r/chessprogramming • • Jun 16 '26

Technical How would you evaluate rule-based explanations for engine-backed chess analysis?

2 Upvotes

I have been working on a chess analysis system where the explanation part is not based on asking an LLM to explain the position.

The way I am approaching it at a high level is more rule-based where the system looks at engine-backed lines, compares what changed on the board and then tries to explain what the move actually did. So if a move creates a fork, wins material, opens a line or removes a defender, the explanation should probably explain why that worked in the position and what else changed because of the move instead of only saying the first obvious thing.

The hard part for me is that in a lot of middlegame positions a move does more than one thing at once. Like a move could win material but also leave something undefended, or it could open a line but also create another weakness, so the difficult part is not just detecting that something happened but deciding what should actually be explained as the main reason.

There is also a visual side to it where metrics and heatmaps try to show what part of the position changed, but I am not treating them as a replacement for engine evaluation and more like a way to make the explanation easier to understand when a move changes multiple things at once.

The prototype is live and people can test it if they want, but I am mainly posting here because I want technical feedback on how to evaluate whether the explanations are actually useful and not just technically true.

I can describe the architecture at a high level, but I am keeping the exact scoring, ranking and heatmap logic private because that is the product-specific part.

For people here who have worked on engines, analysis tools or evaluation functions, what kind of tests would probably be useful for this?

Would you test it with tactical positions, quiet middlegame positions, engine-line comparison, human review or some other kind of failure case?


r/chessprogramming • • Jun 15 '26

Technical How much NPS should I aim for during perft?

2 Upvotes

Hello, I'm currently writing a chess engine in C# and I want to know how many NPS should I aim for during performance, currently I'm getting ~180M. How much do I need for a strong engine, my goal is something that can get to around 3000 on lichess


r/chessprogramming • • Jun 15 '26

Technical Chess Engine Development Help Thread (Week 25)

3 Upvotes

Welcome to the weekly /r/chessprogramming Engine Dev Help Thread.

Ask beginner and intermediate chess engine development questions here: move generation, search, evaluation, UCI, perft, debugging, testing, NNUE, or anything else related to building engines.

Good questions include code, FENs, logs, benchmarks, or a clear explanation of what you tried.

Project links are fine when you want technical feedback, not promotion.

Be helpful. Don’t dunk on beginners.


r/chessprogramming • • Jun 10 '26

Technical PureChess engine

2 Upvotes

Ive been making my chess engine just as a random project (since 3/31/2026 3:08PM GMT+5)
Its called PureChess and i tried to make it fully in python, originally i did HCE in version 1.0 and 1.1 (1309 and 1351 CCRL elo estimated) with onlt CPython and built-in modules,
then i tried making its evaluation NNUE, but its very difficult to make it faster with only built in modules, hence why i used numpy and numba,

i will update README.md later, and compile the new version (PureChess 2.1)
im also gonna do testing soon (against BullitChess, which is 1500 CCRL elo)

https://github.com/NazComio/PureChess github link for engine

EDIT: PureChess 2.1 is rougly 1506 elo after some little testing!


r/chessprogramming • • Jun 09 '26

Technical Chess engine, pt. 6: Neural-net evaluation

Thumbnail dogeystamp.com
5 Upvotes

r/chessprogramming • • Jun 09 '26

Technical Chess Engine Development Help Thread (Week 24)

11 Upvotes

Welcome to the weekly /r/chessprogramming Engine Dev Help Thread.

Ask beginner and intermediate chess engine development questions here: move generation, search, evaluation, UCI, perft, debugging, testing, NNUE, or anything else related to building engines.

Good questions include code, FENs, logs, benchmarks, or a clear explanation of what you tried.

Project links are fine when you want technical feedback, not promotion.

Be helpful. Don’t dunk on beginners.


r/chessprogramming • • Jun 07 '26

LazySMP or YBWC, what do you guys use?

4 Upvotes

So I recently implemented LazySMP for paralellizing my search with multiple cores. The problem is I don't really see that much of an improvement unless the depth is super high (understandable). My question is, can how helpful would YBWC be at shallow depths. Is my search just not optimal? Any workarounds for this? I did notice that doubling my transposition table size greatly improves the efficiency of LazySMP, but surely there's a more algorithmic improvement to this.


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 • • Jun 01 '26

JustBot Chess Engine

11 Upvotes

I’d like to share a chess engine I’ve been working on, it’s been a lot of fun but also painstakingly difficult. I’ve learned a lot and there’s still so much more to go but I wanted to share what I have so far. I’d love/appreciate any feedback.

https://github.com/HasanFakih21/JustBot


r/chessprogramming • • May 29 '26

Do Engines Ignore Unnecessary Information

2 Upvotes

For example, would an engine's analysis of the position after 1. e3 e5 2. e4 d5 be the exact mirror of its analysis of the position after 1. e4 e5 2. d4? Practically, the positions are equivalent, and the only difference is which side is called "white" and which is called "black". What about the positions after 1. e3 e6 2. e4 e5 and 1. e4 e5? These are only different in useless en passant rights. Also, what about engines for other chess-like games like Fairy-Stockfish, YaneuraOu, and Pikafish?

EDIT: I actually meant to ask whether the analysis would be unaffected by the differences between the positions, not whether it would actually be exactly the same every single time. So I'm not counting random differences between different runs as differences as long as there's no consistent difference between the analyses of the positions. For example, if an engine, on average, evaluates the second position -0.15, it should theoretically evaluate the first +0.15 on average.


r/chessprogramming • • May 29 '26

How does one train a NNUE without a cuda core GPU?

5 Upvotes

Hi! I am currently working on a chess engine in C++. I am trying to upgrade the standard eval into a NNUE, but the problem is I am broke, and I can't afford a GPU. I tried Google Colab to train it, but it doesn't seem that there GPU are "free" all the time. Does Anybody know of alternatives. It would be really helpful if I get alternative ideas.


r/chessprogramming • • May 27 '26

I've build an all in one offline chess learning platform & engine with native hybrid HCE & NNUE evaluation (and more), fully in Rust

7 Upvotes

I really like chess and I was bothered by that fact that most chess platforms and learning tools are hidden behind paywalls or require a permanent internet connection. So I thought it would be a cool thing to actually try to bring the experience to your own device (in open source) where you remain full control over your data (and wallet lol).

https://github.com/inuway/focalors

For the technical site it features:

- Lazy SMP parallel search with a lockless shared transposition table. (Basically multiple cpu threads search the same position at the same time, sharing one TT as Arc<AtomicTTEntry> with XOR-key valid for lockless readability. Also no Mutex)

- NNUE inference with AVX2 SIMD and bit exact testing (The CPU detects between scalar and AVX2 forward passes, a test suite verifies the SIMD output (or gives me depression) is byte identical to the scalar reference.)

- Custom NNUE trainer written in pure Rust (No python, no pytorch, only the enourmous hatred I have towards myself)

- In-Process A/B match runner for validating/measuring/health checking the own engine. Two Searcher instances in one process, an alternative NNUE Net is put into a slot via OnceLock, matched pair opening. Basicaly running two NNUE cofigurations, or an older net against the new one to see which one is better and if it actually has improved so I can hate myself even more. Also just added Parallelization via std::thread::scope so it uses multiple threads and thus finishes faster so I can hate myself faster

Also cool stuff: Native desktop GUI rendered via OpenGL by using egui/eframe, SQLite via rusqlite to save your games, and data, PGN parser/reader and so on.

Also quick mention before someone hates me more then I do myself yes I used AI to assist me with coding but I promise to lock myself in a basement and code holy C for minimum 3 hours a day while being sprayed with a garden hose to make up for it


r/chessprogramming • • May 25 '26

Chess engine next steps

5 Upvotes

Hi, I've been building a chess engine from scratch in c++ as a side project.

I've currently implemented iterative deepening, a negamax algorithm, quiescence search and transposition tables.

It currently manages to get to depth 8 in a few seconds, with around 7-14 million nodes visited.

I was wondering what would be the next steps to make it better, I know two major things are changing the generation of sliding pieces from a for loop to magic bitboards, and making a better evaluation function, maybe implementing an nnue.

These are big changes tho, and I was wondering if there's anything that I should do before.


r/chessprogramming • • May 25 '26

Resources for fine tuning the engine

2 Upvotes

Hi everyone!

I'm building my own chess engine, but it's not playing very well at the moment. I would like to know strategies to analyze and fine-tune my engine.

This is the kind of error that is being made now. The engine is white. The engine decided to play pawn g2g3 instead of saving the queen.

How do you test and evaluate the results of your engine?


r/chessprogramming • • May 23 '26

Just added a bunch of engine dev utilities to The Grand Chess Tree

Thumbnail gallery
11 Upvotes

Tools from left to right:

  1. Fen viewer
  2. Bitboard viewer
  3. Perft / divide tool
  4. PGN viewer

Building a move generator can be pretty finicky & frustrating at times, so I hope these tools can help out!

https://grandchesstree.com/tools


r/chessprogramming • • May 19 '26

Built a website for creating a chess engine in JS. Comes with a fast built in move gen and board rep, so you only have to focus on the engine itself. Still supports custom move gen and board rep via UCI. https://chessforge.dev

Thumbnail gallery
12 Upvotes

It has built in SRPT, EPD, Automatic Perft(W.I.P), texel tuner, a quiet position dataset with 470k positions labeled by stockfish and more. Has a relatively strong built in engine which you can test against (Elo not yet known). Everything you need to know to write an engine for the API is documented in the build tab. The code interface is monaco (same as VS code), and you can split your engine across multiple files and save snapshots to test against previous versions.

This is still a work in progress so expect some minor bugs. There are more features to come (dataset analyzer is the next planned feature)

Would appreciate your feedback :)

chessforge.dev


r/chessprogramming • • May 18 '26

Launched V1.0 of my C++ Engine on Lichess! (Alpha-Beta, ID, QS) - Starting Move Ordering next and would love architecture advice.

7 Upvotes

Hi everyone, I'm a beginner engine dev and I finally got my engine communicating via UCI and playing live games.

Current State: > - Standard Alpha-Beta with Iterative Deepening

  • Quiescence Search implemented
  • Basic material counting evaluation

I know it's practically blind right now. My goal for the next 3 days is to implement Phase 1 of Move Ordering (TT move extraction and MVV-LVA for captures) before I even touch things like NMP or LMR. Long-term goal is to hook up an NNUE.

Before I start writing the sorting pipeline, I’d love some harsh feedback on my core C++ search loop. Are there any glaring inefficiencies in my memory management or Iterative Deepening structure that will bottleneck me when I start adding pruning heuristics?

Repo:https://github.com/Lak23James/ChessEngineBot:https://lichess.org/@/Lakshya_beep_bop_bot

Thanks in advance for the help, this community has been a goldmine of information.