r/chessprogramming • • Feb 24 '26

I built an AI Chess Coach with an actual LLM feature

0 Upvotes

Over the last year I have been working on an AI chess Coach that is able to aid chess players by giving real understandable feedback which requires finding reasoning in stockfish moves. Finally i have reached a solid point where the AI,though not perfect, works. Its completely free. Heres the link - https://chess-coach-ai-seven.vercel.app/

would really appreciate some feedback.


r/chessprogramming • • Mar 28 '26

Building a 73-Plane AlphaZero Engine on Kaggle: Solving for 16-bit Overflow and "Mathematical Poisoning"

0 Upvotes

I recently finished a deep-dive implementation of an AlphaZero-style chess engine in PyTorch. Beyond the standard ResNet/Attention hybrid stack, I had to solve two major hardware/pipeline constraints that I thought might be useful for anyone training custom vision-like architectures in constrained environments.

  1. The Float16 AMP "Masking" Trap

Standard AlphaZero implementations use -1e9 to mask illegal moves before the Softmax layer. However, when training with Automatic Mixed Precision (AMP) on consumer/Kaggle GPUs, autocast converts tensors to float16 (c10::Half).

- The Issue: The physical limit of float16 is roughly -65,504.0. Attempting to masked_fill with -1e9 triggers an immediate overflow RuntimeError.

- The Fix: Scaled the mask to -1e4. Mathematically, e^-10000 is treated as a pure 0.0 by the Softmax engine, but it sits safely within the 16-bit hardware bounds.

2. RAM Optimization (139GB down to 4GB)

Mapping a 73-plane policy across 8x8 squares for millions of positions destroys system RAM if you use standard float arrays.

- The Pipeline: Used np.packbits to compress binary planes into uint8 and utilized np.memmap for OS-level lazy loading.

- The Result: Reduced a ~139GB dataset down to 4.38GB, allowing the entire 7.5 million position training set to stream flawlessly from disk without OOM kills.

3. The "Antidote" Security Lock (Fine-Tuning)

To prevent unauthorized usage of weights, I implemented a custom "security key" during the fine-tuning phase:

- The Attack: An intentional offset (poison) is injected into the BatchNorm2d bias (beta). This renders the model's evaluations garbage.

- The Defense: I injected a calculated "antidote" scalar back into the center pixel [1,1] of the first convolutional kernel.

- The Calculus: Using delta_x = -poison * sqrt(run_var + eps) / gamma, the antidote scalar traverses the linear layers to exactly cancel out the BN bias shift. Because I fixed the 8 perimeter pixels of the 3x3 kernel to 0.0, the 1-pixel padding on the edges prevents any spatial artifacts from leaking into the board boundaries.

Metrics:

- Architecture: Hybrid (12-block ResNet + Squeeze-and-Excitation + Self-Attention).

- Input State: 24-Plane Security Architecture (includes 4-bit cryptographic plane).

- Efficiency: ~5000 positions per second on GPU T4 x2.

This is a short summary of my architecture, if you are interested in learning more deeply, you can read this free article on my website: https://www.atlaschess.me/architecture


r/chessprogramming • • Mar 31 '26

I coded an optimized chess logic program in Python.

1 Upvotes

I embarked on developing an AI that plays chess in native Python. And I coded a chess program that handles Python logic and is about twice as efficient as python-chess.

I don't know if we can do much better (apart from adding a lazy evaluation) and I would like to have your opinion on how to improve it.

Here's the repo: ChessCore (don't hesitate to leave a star).

I've finished the AI, but it's not open source yet. It reaches 2100 on Lichess, which seems like a very good score without any NNUE.


r/chessprogramming • • Jan 02 '26

Chess LLM Website

0 Upvotes

Link:

https://chess-llm-316391656470.us-central1.run.app

My experience:

I’m like 2100 on Lichess bullet and generally find it more enjoyable to play against than the 1+0 games I play on Lichess (mostly cheap traps and time scrambles) and it’s definitely more human-like than most chess bots (e.g. Stockfish Levels 1-8, the bots on chesscom, and probably even things like Maia and Noctie) since it’s an LLM rather than a fork of stockfish so the randomness feels human (does it pass the Turing test for chess?)

still a work in progress (vibe coded it up in a couple days) so I have a ton of optimization ideas and features I haven’t implemented yet, so feedback or ideas would be greatly appreciated. I’ll consider open sourcing if there’s enough interest (tbf it’s basically just a UI wrapper, so don’t think there’s much special sauce if you wanna replicate it)

Technical details:

LLM: Adam Karvonen‘s ChessGPT trained on Stockfish and Lichess games Architecture: nanoGPT (50M params)

If you’re into AI, you might find my blog post about it interesting: https://chinmaysnotebook.substack.com/p/chessllm-what-a-50m-transformer-says


r/chessprogramming • • Nov 30 '25

Iframe embed loading issue

0 Upvotes

Hi all,

I am a main developer behind chessreads.com, we started collaboration with GM Mauricio Flores Rios, and while embedding his platform, I get an annoying white background during Iframe load.
The embed can be found on https://chessreads.com/review/learn-from-the-legends-10th/.

Can I fix it from my side, or I have to ask them to fix it?


r/chessprogramming • • Apr 12 '21

Automatic Chess Playing Bot for Chess.com

0 Upvotes

Hello Guys , I just created a bot that communicates with Stockfish API and automatically plays the moves on chess.com

I have programmed it to play only for unrated Guest account.
The Installation steps and source code is available at
https://github.com/sarrocks1/AutoChess
I am a beginner in programming stuff like this and it would mean a lot to me if you guys could take a look , play around and suggest improvement/open issues through the Issues tab.
Thank You.


r/chessprogramming • • Nov 25 '25

Would you like to see a new modern chess website/app to visualize or study games or player stats?

0 Upvotes

I am considering developing a new chess website/app to search for chess games, find players, and view statistics, openings, and other relevant information.

What would you like to see?

Give me ideas to build your dream chess tool!


r/chessprogramming • • Oct 17 '26

Stockfish and other chess engines explaining their logic and reasoning

3 Upvotes

Apologies if this has been asked before, but why are Stockfish and other engines currently unable to explain why the moves they conclude are best in their games against each other, and in your own games and games played by humans in general, are the best ones? Especially with the ongoing improvements in A.I. and LLMs? Wouldn't explanations for each move be more valuable to humans for new ideas on how to play better rather than being told the move we should've played?

Sure, the engines are way beyond our level, and most people probably think this would be useless because it might be next to impossible for us to understand. But what if that's not the important part? What if it's knowing the explanations from "entities" that no human will ever surpass? Perhaps the mere knowledge of the why, and not just the what, can help with gaining new insight (different things to do/try out, different mindsets to have, different ways of playing, etc.), all of which could potentially be a little bit more effective and helpful than being told the individual moves you could've played in any position, but specifically the "human" things, like reading books, watching videos, etc.


r/chessprogramming • • Aug 24 '26

Technical I'm building an open-source C++ chess engine and I'd really like to build a community around it

4 Upvotes

I've been working on an open-source, UCI-compatible C++ chess engine called Volatile for a while now, and I've reached a point where I'd really like to get other people involved.

It's currently somewhere around the 2200–2400 Elo range, and the engine already has a proper Alpha-Beta search backend, with the architecture designed to support both HCE and NNUE evaluation. Right now, I'm focusing primarily on the HCE.

The reason I started Volatile is somewhat different from the usual "I'm going to make another chess engine" story.

I've always found computer chess fascinating, but I've also noticed that getting into the internals of a very strong engine can be intimidating. Projects like Stockfish have evolved for many years and are incredibly optimized, but for someone new who wants to experiment with the search or evaluation, there can be a pretty steep learning curve.

I wanted to see if it was possible to take a different approach.

The main idea behind Volatile is to have a highly maintainable architecture, using modern C++ design patterns while still being fast enough to play serious/strong chess.

I'd prefer a codebase where another developer can open the repository, understand how the pieces fit together, modify the evaluation or search, run an experiment, and contribute the result without having to spend months on understand the entire engine.

Obviously, this is something I still need to prove. I'm not claiming that abstraction automatically makes a chess engine better or that Volatile has somehow solved engine architecture. That's exactly the experiment I'm interested in.

And this is where I'm hoping to find some people who are interested in joining me.

I'm not just looking for someone to give the project a quick star(although I don't mind if you do) or tell me it looks interesting. I'd really like to find developers who enjoy computer chess and C++ and would be interested in actually experimenting with the engine.

That could mean:

  • improving evaluation

  • experimenting with search heuristics

  • benchmarking

  • finding architectural problems

  • reviewing PRs

  • suggesting better designs

  • or simply trying something weird and seeing whether it works

I'd especially love to have people who disagree with some of my architectural decisions and are willing to discuss them. If something I've designed is unnecessarily complicated or slower than it needs to be, I'd rather have someone point it out and help improve it.

My long-term goal is pretty ambitious: I want Volatile to become a genuinely community-developed engine.

I'd love to eventually look at the repository and see a constant stream of experiments, PRs, discussions and improvements from different people rather than everything coming from one developer.

And yes, eventually I'd love to see how far this architecture can actually go in terms of playing strength. Maybe one day Volatile can get close to the very top engines. Maybe it won't. I honestly don't know yet.

But that's what makes the experiment interesting to me.

Even if you don't want to contribute code, feedback on the architecture, things that look wrong, or ideas for where the engine should go next would be extremely valuable.

Maybe this is a bit ambitious but, I'd really like to build this engine with other people rather than just build it by myself.

Repository:
https://github.com/PriyojitRoy/Volatile


r/chessprogramming • • Feb 19 '26

I built a full-featured Chess game in Python with Stockfish AI (400–3000 ELO)

Thumbnail reddit.com
0 Upvotes

r/chessprogramming • • Sep 15 '23

Has anyone ever written a cheat bot that can outsmart statistical analyses?

0 Upvotes

For a given position evaluation score, a human will play the top engine move some proportion of the time, the second engine move some proportion of the time etc. When one player is cheating, the variation in both players’ accuracy will change and over enough games, you can say with 99.99999% certainty that someone is cheating. Anti-cheating software likely does this and more.

Has anyone written software that aims to cheat more covertly by playing moves that don’t impact the accuracy you can expect from your opponent?


r/chessprogramming • • Nov 25 '20

HELP, my Minimax algorithm is not working properly.

0 Upvotes

So I'm just gonna include the TREE that generates positions and the algorithm.

class Node:
    def __init__(self, depth, board, value, move):
        self.depth = depth
        self.board = board
        self.value = value
        self.move = move
        self.turn = board.turn
        self.children = []
        self.state = self.convert(self.board)
        self.positional = {}
        self.material = {'p':-1,'P':1, 'B':3,'b':-3,'N':3,'n':-3,'R':5,'r':-5,'Q':9,'q':-9,'k':-1000, 'K':1000}
        self.createChildren()
        
    def createChildren(self):
        if self.depth >0:
            all_pos = list(self.board.legal_moves)
            for item in all_pos:
                self.move = chess.Move.from_uci(str(item))
                alt_board = deepcopy(self.board)
            
                alt_board.push(self.move)

                self.children.append(Node(self.depth-1,alt_board,self.eval_pos(self.state), str(item)))
                
    def eval_pos(self, state):
        value = 0
        for row in range(8):
            for col in range(8):
                if state[row][col] != '.':
                    

                    value += self.material[state[row][col]]

        return value
                
        

    def convert(self, board):
        board_state = []
        s = str(board)
        s = s.split()
        alt = 0
        for i in range(8):
            board_state.append([])
        for i in range(8):
            for j in range(8):
                board_state[i].append(s[j+alt])
            alt += 8
        
        
        return board_state

def Minimax(node, board, depth, maxPlayer):
    
    if (depth == 0):
        
        move = chess.Move.from_uci(node.move)
        print(node.value)
        
        return node.value, move
    if board.is_checkmate():
        move = chess.Move.from_uci(node.move)
        
        if node.turn == True:
            return float('-inf'), move
        else:
            return float('inf'), move
    if maxPlayer:
        best_move = None
        maxEval = float('-inf')
        for child in node.children:
            eval, move = Minimax(child, child.board, depth-1, False)
            
            maxEval = max(maxEval, eval)
            
            if maxEval == eval:
                best_move = move
 
        best_move = chess.Move.from_uci(str(best_move))            
        return maxEval, best_move
        
    else:
        best_move = None
        minEval = float('inf')
        for child in node.children:
            eval, move = Minimax(child, child.board,depth-1,True)
            
            minEval  = min(minEval, eval)
            
            if minEval == eval:
                best_move = move
                
        
        best_move = chess.Move.from_uci(str(best_move))
        return minEval, best_move

r/chessprogramming • • Apr 06 '26

I built a Chrome Extension that uses AI to scan chessboards from YouTube videos/PDF books etc. and exports them to Lichess/Chess.com with one click

0 Upvotes

Hey everyone!

As a chess fan, I always found it frustrating when I was watching a high-level game analysis on YouTube or a stream on Twitch and wanted to explore a specific line myself. Manually setting up the position on an analysis board is a pain and kills the flow of learning.

So, I decided to fix this and built ChessInsights AI.

What it does: It uses Computer Vision (AI) to "look" at your browser tab, find a chessboard (even in a video or a PDF), and instantly convert it into a digital format.

Key Features:

  • Video to Board: Scan any frame from YouTube or Twitch.

  • Instant Export: One click and the position opens in Lichess or Chess.com Game Review.

  • Universal: Works on news sites, blogs, and even online chess books.

  • Stop Blundering: You can quickly check why a move you thought was good is actually a mistake while watching your favorite GM.

It’s completely free to try, and I’d love to get some feedback from this community. Does it catch the boards correctly for you? Are there any features you’d like to see next?

Check it out here:
Chrome web store
Firefox Addons

I really hope this helps some of you gain those extra ELO points!

TL;DR: I made an extension that captures chessboards from videos/images and opens them in analysis tools so you don't have to set up positions manually.


r/chessprogramming • • Dec 17 '25

I built a chess engine + AI entirely in JavaScrip

9 Upvotes

I’ve just finished a browser-based chess engine and AI written entirely in JavaScript, running fully client-side.

This started as a learning project after building a Sudoku bot, and turned into a ~1.5 month deep dive into chess engine design and search optimization.

The engine currently searches ~11k nodes/sec in the browser and plays at a solid amateur level.

You can try it here:
👉 https://dig0w.github.io/JavaScript-Chess-AI/main.html

Source code:
👉 https://github.com/dig0w/JavaScript-Chess-AI

This was mainly a learning project, so feedback is very welcome.


r/chessprogramming • • May 04 '26

I updated the GPT-structured chess bot

3 Upvotes

I updated the GPT structured chess bot by adding a bit of calculation. I imitated MCTS searching process by letting previous model (which, frequently make mistakes) be the policy head (provides top 8 moves and probabilities) , and use stockfish (strictly limiting its depth) as value head, return (N, Q).

It is like dividing one Alpha0 model into 2 parts.

Model reduces 80% of blunders, while previous model is still dominating the search. After this, I will change the stockfish into handcraft evaluation, or thinking of training an individual network.

Updated model has been put on lichess: https://lichess.org/@/CatieChess-Magnus

and will soon be put on main web catiechess.com


r/chessprogramming • • Dec 27 '25

Requesting feedback from chess players on a new analysis & study workflow

0 Upvotes

Hi all,

I’m an adult chess player and I’ve been building a personal tool to improve my own training and post-game analysis. It’s grown into a full app, and before releasing it publicly I’d really appreciate feedback from other players.

The focus is on:

  • Structured post-game analysis (annotations, variations, engine checks)

  • Organising study goals and training plans

  • Working with your own games rather than generic puzzles

I’m not selling anything and I’m not linking publicly here. I’m simply looking for a few players willing to test the workflow and give honest feedback on what works and what doesn’t.

If you’re interested in giving feedback, feel free to DM me.

Thanks.


r/chessprogramming • • Sep 25 '25

Help me debugging the UnmakeMove

0 Upvotes

} //function for UnmakeMove template <Color c> void Position::unmakemove(Move& move) { // Restore saved state storeCount--; State safeState = StateInfo[storeCount]; enpassantSquare = safeState.enpassantCopy; castlingRights = safeState.castlingRightsCopy; halfMoveClock = safeState.halfmoves;

if (move == nullMove) 
    return;

// Swap sides and decrement fullmoves
sideToMove = (sideToMove == Color::White) ? Color::Black : Color::White;
fullMoveCounter--;
//Color us = ~sideToMove;
// Extract move info

//just a helper function
//Color movingColor = (sideToMove == Color::White) ? Color::Black : Color::White;
//Piece piece = makePiece<c>(move.Piece()); //this is moved piece
Piece piecemoving = makePiece<c>(move.Piece());           // piece of template color <c>
Piece pieceopposite = makePiece<~c>(move.Piece());        // same type, opposite color
Square source = move.source();
Square target = move.target();
Piece capture = safeState.capturedPiece;
Piece movingPiece = pieceAt(target); // what is currently on target square
//Piece capture = 

// Detect en passant bool enPassantMove = false; Square capSq; Piece capturedPawn = None; if (movingPiece == makePiece<c>(Pawn)) { int srcFile = source % 8; int tgtFile = target % 8; if (srcFile != tgtFile && pieceAt(target) == None) { enPassantMove = true; capSq = (sideToMove == White) ? Square((int)target - 8) : Square((int)target + 8); //pawn to restore is alway opposite of moving side capturedPawn = makePiece<~c>(Pawn); } }

if (enPassantMove) { // Restore captured pawn placePiece(makePiece<~c>(Pawn), capSq); // Restore moving pawn removePiece(movingPiece, target); placePiece(makePiece<~c>(Pawn), source); } else if (move.promoted()) { // promotion move remove promoted piece and put pawn back removePiece(movingPiece, target); // the pawn back should have same color as moving side placePiece(makePiece<c>(Pawn), source); if (capture != None) placePiece(capture, target); } else { // Normal move (non-promotion, non-en-passant) removePiece(movingPiece, target); placePiece(movingPiece, source); if (capture != None) placePiece(capture, target); }

// Handle castling
if (movingPiece == makePiece<c>(King)) {
    if constexpr (c == White) {
        if (source == SQ_E1 && target == SQ_G1) {
            removePiece(WhiteRook, SQ_F1);
            placePiece(WhiteRook, SQ_H1);
        } else if (source == SQ_E1 && target == SQ_C1) {
            removePiece(WhiteRook, SQ_D1);
            placePiece(WhiteRook, SQ_A1);
        }
    } else {
        if (source == SQ_E8 && target == SQ_G8) {
            removePiece(BlackRook, SQ_F8);
            placePiece(BlackRook, SQ_H8);
        } else if (source == SQ_E8 && target == SQ_C8) {
            removePiece(BlackRook, SQ_D8);
            placePiece(BlackRook, SQ_A8);
        }
    }
}

}

Here by debugging the code I can find that the problem in enpassant and promotion and to be specific in enpassant move it does place the target piece(Pawn) and in promotion codeblock the problem is when unmake the move the then board is restored but the promotion pawn is restored as opposite color.


r/chessprogramming • • Apr 10 '26

While making a game on CHESS came across FEN strings | Breakdown

Thumbnail
karanb.dev
1 Upvotes

r/chessprogramming • • Feb 10 '25

Multidimensional Skill Factors into Chess Outcome Predictions

1 Upvotes

I’ve been experimenting with a method to predict chess match outcomes using ELO differences, dynamic skill estimates, and prior performance data. My hypothesis is that ELO—a one-dimensional measure of skill—is less predictive than a multidimensional assessment that could capture aspects like playing “style” or even psychological factors (imagine a rock-paper-scissors dynamic between different types of players).

I’m working with a dataset structured as:

playerA, playerB, match_data

where match_data represents computed features from the game. Essentially, I want to develop a factor model that represents players in multiple dimensions, with ELO being only one of the factors. The challenge is figuring out how to both extract these factors from the game data and have them predict outcomes effectively.

Specifically:

  • I have chess match data in PGN format and need to mass convert games into feature vectors. I’ve generated a massive list of potential features (thanks to ChatGPT’s help), but I’m concerned about scalability given the dataset size.

  • Once I have these feature vectors, what are some good approaches for constructing a factor model? I’m comfortable with various statistical methods (I did my bachelor’s in maths and am currently doing my MSc in statistics), but if someone has done something similar in the past, I would be interested in hearing about it.

  • Has anyone tackled a similar problem or have insights on managing datasets of player matchups that include multidimensional factors?

BY THE WAY: If you're interested in helping me in this project in some sort of ongoing capacity (or interested to see if it works) I'd love it if you could contact me on discord: ".cursor".

Thanks :D


r/chessprogramming • • May 15 '23

Piece square tables

1 Upvotes

How do I implement piece square tables? (I am using Gamemaker studio 2)


r/chessprogramming • • May 05 '25

Function for computing all squares in the +x+y direction until the edge of the board or an occupied square in 2.34ns.

1 Upvotes
// calculate diagonal sliding moves in the +x+y delta 
// 2.34ns performance on Ryzen 5 7040U
pub const fn diag_ray_pos_pos(sq: Square, occ: BitBoard) -> BitBoard {
    let s = sq.rank - sq.file;
    let a = s.unsigned_abs();
    let mut i = a << 3;
    if s < 0 { i = 64 - i }
    let mut m = (1 << i) - 1;
    if s > 0 { m = !m }
    let mut r = 0x8040201008040201;
    if s > 0 { r = (r >> a) & m }
    if s < 0 { r = (r << a) & m }
    let i = sq.file | (sq.rank << 3);
    r &= !0u64 << i;
    let o = r & occ.0;
    if o != 0 { r &= (0b10u64 << o.trailing_zeros()).wrapping_sub(1) }
    BitBoard(r)
}

r/chessprogramming • • Mar 10 '25

How chess.com classifies moves?

1 Upvotes

So, if you have played on chess.com you might have used game review, and it shows the following moves:
Best, Blunder, Book, Brilliant, Excellent, Good, Great, Inaccuracy, Miss, Mistake.
I have read many articles, but none mentioned how to program that stuff. An article showed they use the expected point model to calculate the move calculation, another article showed that you can't calculate brilliancy by only analyzing data, you have to take some account factors. Apart from that I am making a website, that analyzes your chess game for free. So, I use stockfish.js and stockfish.wasm web workers in frontend, and it gives data like
info depth 22 seldepth 29 multipv 1 score cp 37 nodes 3976016 nps 496071 hashfull 913 time 8015 pv d2d4 d7d5 c2c4 d5c4 e2e4 e7e5 g1f3 e5d4 f1c4 f8b4 b1d2 b8c6 a2a3 b4d6 e1g1 g8e7 f1e1 c8g4 e4e5

info depth 22 seldepth 30 multipv 2 score cp 35 nodes 3976016 nps 496071 hashfull 913 time 8015 pv e2e4 e7e5 g1f3 b8c6 f1b5 a7a6 b5a4 g8f6 e1g1 b7b5 a4b3 f6e4 f1e1 d7d5 b1c3 e4c3 d2c3 c8e6 f3e5 c6e5 e1e5 f8d6 e5d5 e6d5 b3d5 e8g8 d5a8 d8a8

info depth 22 seldepth 28 multipv 3 score cp 26 nodes 3976016 nps 496071 hashfull 913 time 8015 pv g1f3 d7d5 d2d4 g8f6 c2c4 c7c6 e2e3 c8f5 b1c3 e7e6 f3h4 f5e4 f2f3 e4g6 d1b3 d8c7 c1d2 b8d7 h4g6 h7g6 c4d5 f6d5 c3d5 e6d5 e1c1

This is for starting position fen.

Can I get those CP (centipawn) and classify moves? The naive idea is you make a move, calculate the delta of that CP, take the abs value, and classify it. And for miss, if you have a mate in the data and you move a trash move, then it's a miss. Please help me out.


r/chessprogramming • • Nov 25 '25

I built a fast multi-engine Stockfish API + AI coach, is this actually monetizable, and what would you improve?

6 Upvotes

I’ve been messing around with building my own AI chess coach, and before I go too deep into it I wanted to hear from people who actually understand engines and analysis tools.

This isn’t a concept. It’s already running, integrated into a frontend, and I’m using it to analyze games. Now I’m trying to figure out:

  • Is this approach technically sane?

  • Is there anything obviously dumb in the design?

  • Is this something people would actually pay for (coaches, clubs, etc.)?

1. Custom Stockfish API (batch engine)

I am not using lichess cloud evals or any external review service. I made my own backend.

Right now it:

  • Runs 4 to 8 Stockfish instances in parallel

  • Uses depth 18, multipv 3 for every position

  • Takes up to 50 FENs per batch (limit can be increased)

  • Evaluates a full game by sending a list of FENs in one or a few batch requests

  • Caches evals globally, so repeated positions are basically free and come back instantly

  • Returns cached evaluations in under 100ms

  • Normalizes eval POV correctly so I never accidentally flip signs

On free-tier infrastructure, a full game's worth of positions (around 50 moves / 100 FENs) comes back clearly under a minute. Smaller batches are much faster. With paid infrastructure I can realistically make it about 4x faster by using more CPU and more parallel engines.

Overall it feels like a tiny, simplified version of lichess cloud eval running on my own backend.

2. AI "coach" layer on top of the engine

On top of the Stockfish output I added a lightweight coaching system. It does the following:

  • Detects basic tactics from the position: forks, pins, skewers, loose pieces, overloaded pieces, simple mate threats

  • Builds simple attack/defense maps

  • Checks whether the best-move PV involves a sacrifice or tactic

  • Feeds only verified engine data + static analysis into a small language model

  • Produces short, human-style explanations like:

"Your knight on c3 is loose, Black threatens Nxc2+, and Be3 stops the fork while developing."

Important part: the AI never invents moves. It only comments on information that is already confirmed by the engine and static analysis. So there are basically no hallucinated moves or squares.

In practice it turns raw Stockfish evaluations into something that feels more like a coach talking you through the position.

3. What I am considering next

Since it is already stable and working, I am thinking about:

  • Upgrading to paid infrastructure to make it roughly 4x faster

  • Turning it into a small "Pro" tool mainly aimed at:

    • coaches who want fast annotated game reports

    • parents or kids who want a simple AI coach

    • small clubs

    • people who want "upload PGN -> get full annotated report in a few seconds"

So I am wondering if:

  • This has real monetization potential in a niche way

  • Or if this is just a fun personal project with no real business angle

Not trying to compete with lichess or Chess.com. Just wondering if this is useful as a side-tool.

4. Things I am considering adding

  • Deeper analysis (depth 22 to 24)

  • More parallel engines (8 to 12 instead of 4 to 8)

  • Better tactic detection

  • Opening classification and tree comparison

  • Automatic training puzzles generated from your mistakes

  • Per-user progress tracking

  • Cloud storage for analyzed games

  • Blunder clusters (example: "you repeatedly miss forks on dark squares")

  • More structured report format with diagrams

5. What I want feedback on

From people who have built analysis tools or worked with engine internals:

  • Is depth 18 / multipv 3 too shallow for meaningful explanations?

  • Are simple static tactic detectors going to fall apart quickly?

  • Any serious pitfalls in doing evaluation through batch engines?

  • Is using a small LLM for commentary a reasonable idea or a dead end?

  • Any must-have heuristics for a serious coaching tool?

And on the practical side:

  • Would coaches or clubs realistically pay for fast annotated reports?

  • Would automatic training puzzles from your own mistakes be valuable?

  • Or do people expect this kind of thing to be free in 2025?

I know the system works. What I don't know is whether this approach has real potential or if I'm eventually going to hit a wall design-wise.

Any thoughts or criticism is welcome. Honest feedback is better now than after investing more time or money into it.


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