I programmed my own chess website and I have Stockfish included (v16) to play against.

I’m trying to make an evaluation bar like on chess.com but I can’t seem to figure out how. I thought about using the "eval" command on the current position, let Stockfish calculate with a depth of 20 and evaluate each position add up and take the average.

But first I don’t know if that’s how chess.com is doing it, and second, I can’t get an eval when a king is checked.

Also it seems a bit difficult to get the results from eval out of the cmd. I’m using angular for frontend and C# for my backend.

  • 3
    It would help a lot if you could include one sentence with a question mark at the end.
    – Brian Towers
    Commented Jul 21, 2023 at 17:44
  • are you familiar with UCI protocol?
    – qwr
    Commented Jul 21, 2023 at 20:44
  • The stockfish engine already looks at moves in depth, so it is not necessary to average possible positions (which would result in faulty evaluations because the engine assumes best play). Chess.com's eval is just the stockfish evaluation of the current position
    – BanjoMan
    Commented Jul 22, 2023 at 3:34

1 Answer 1


The evaluation on chess.com is simply a graphical display of the result of the eval command of the UCI interface for Stockfish. Likely they are using a WebAssembly version of the engine.

How you display that graphic is up to you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.