#Stuck with my chess project

1 messages · Page 1 of 1 (latest)

nova wharf
#

I'm currently building an API that fetches chess games from Chess.com. The goal is to analyze these games using Stockfish in order to identify all mistakes and blunders.

The problem I'm facing now is that it's difficult to reliably detect mistakes in the games, because the evaluation I get back from Stockfish isn't consistent or trustworthy enough.

What I do is send each move to Stockfish, which returns an evaluation for the given position. I then calculate the evaluation difference between consecutive moves, and if the difference exceeds a certain threshold, I classify it as a mistake or blunder.

However, the issue is that even after just two opening moves (e4 e5), Stockfish sometimes returns an evaluation of +1.06, which is clearly unreasonable at such an early stage in a balanced opening.

So I'm currently unsure how to move forward. I haven’t found any other APIs that can analyze PGN-format games reliably, but I know there are websites that provide similar analysis, so there must be a way to do it.

How should I proceed?

cold ploverBOT
#

<@&987246399047479336> please have a look, thanks.

covert parrot
nova wharf
#

im not doing anything wrong, this is taken from their api https://stockfish.online/

with depth 15 and this FEN rnbqkbnr/pppp1ppp/8/4p3/4P3/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2

In other words, after 1. e4 e5. its impossible its +1.06

covert parrot
covert parrot
nova wharf
#

what do you mean host directly? do you have a link with documentation?

and i think i also got 0.11 with depth 12

covert parrot
#

It seems that there is something wrong with this api

#

And since they don't give any info about the setting or the version of stock fish they are using

#

It's better to download stock fish directly and use it in local

nova wharf
#

Okay, I’ll check that out. Maybe this is straightforward, but can my API use Stockfish locally? I mean, my idea is to eventually host this on a website or app, would it still be possible to use a locally downloaded and running version of Stockfish?

The reason I used the Stockfish API instead was because I didn’t know it was possible to run the same engine locally.

chilly sable
#

I dont know how lichess does it, so you can look at the source code for it or wait for someone who already knows to tell you

covert parrot
misty ruin
#

Yeah you would just run your API and the Stockfish app on the same server, and instead of requesting Stockfish's API you communicate with the local service (i.e., localhost) instead. Should work fundementally the same, you just need to use another host in your network requests.

nova wharf
#

Thank you! I think I now have a better understanding of how to move forward with my project and what I need to look into next