Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation #77

Open
A-Beille opened this issue Jul 10, 2023 · 5 comments
Open

Evaluation #77

A-Beille opened this issue Jul 10, 2023 · 5 comments

Comments

@A-Beille
Copy link

Hi,
I recently started using this package, and I want to create an evaluation bar of the position using it. How can I manage to do what I want to?
Thanks you !

@Jochengehtab
Copy link

Jochengehtab commented Jul 25, 2023

Stockfish is a UCI chess engine, so you can send the eval command to get the Evaluation.

@samuraitruong
Copy link

@A-Beille

My implementation as below

  • Assume that you have current position FEN
  • search for bestmove with current position (using depth, go time or.....)
    -after you get the CP score -> you can calculate the wining chance
Win% = 50 + 50 * (2 / (1 + exp(-0.00368208 * CP)) - 1)

This is the percentage of your ELO bar. if current move is black then white Elo = 100-blackElo. with this you can render the elobar.

Read more here - https://lichess.org/page/accuracy

@A-Beille
Copy link
Author

the thing is that here, you get a percentage. If you put 0 centipawns, then the winning rate in percentage is 50%. But that's not what I want: I want to calculate the evaluation from the centipawns given by the engine (like an eval bar)

@samuraitruong
Copy link

samuraitruong commented Sep 16, 2023 via email

@bondia
Copy link

bondia commented Nov 23, 2024

This thread helped a lot. Thank you! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@samuraitruong @bondia @A-Beille @Jochengehtab and others