Skip to content

Equalizing chess allows you to play against stockfish in such a way that it does not try to beat you with all its strength, but rather balance the game with each move to try to keep the evaluation as balanced as possible.

License

Notifications You must be signed in to change notification settings

supertorpe/equalizing-chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

equalizing-chess

Equalizing chess allows you to play against stockfish in such a way that it does not try to beat you with all its strength, but rather balance the game with each move to try to keep the evaluation as balanced as possible.

Selection funtion

The webapp uses a selection function to choose the move among the candidates provided by stockfish. It supports externalized functions (i.e. hosted in a gist), so that YOU can write your own selection function:

export function selectCandidate(candidates) {
  // TO DO: select and return a candidate from the list
}

"candidates" is an array containing the moves provided by stockfish, i.e.: [{"type":"cp","score":689,"pv":"h7h5"},{"type":"cp","score":-703,"pv":"h8g7"}, {"type":"mate","score":14,"pv":"a2d2"},{"type":"mate","score":16,"pv":"a2a4"},...]

When type=cp, the higher the score, the stronger the movement. When type=mate, the score is the distance to mate.

There are already these functions available:

The webapp dynamically loads the function from the URL and uses it to choose the movement of the engine.

You can write your own function and set its URL in the settings screen.

Initial position

It's possible to set an initial FEN: https://supertorpe.github.io/equalizing-chess/#/equalizing-chess/fen/7k/7p/8/8/8/8/P7/K7 w - - 0 1

Acknowledgments

Following software and resources has been used:

About

Equalizing chess allows you to play against stockfish in such a way that it does not try to beat you with all its strength, but rather balance the game with each move to try to keep the evaluation as balanced as possible.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published