Code Monkey home page Code Monkey logo

supertorpe / equalizing-chess Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 35.95 MB

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.

Home Page: https://supertorpe.github.io/equalizing-chess/

License: MIT License

HTML 13.12% Rich Text Format 16.91% TypeScript 46.63% SCSS 21.56% JavaScript 1.07% Dockerfile 0.10% Shell 0.60%
chess equalize stockfish

equalizing-chess's Introduction

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:

equalizing-chess's People

Contributors

supertorpe avatar

Stargazers

 avatar Steven Yau avatar  avatar

Watchers

 avatar

equalizing-chess's Issues

Slider colors not affected by dark mode

Current
Current

Changed
Changed Color

Developer tools

I couldn't find the file location of this code, but this change will make the untoggled slider in dark mode have a dark background in the same way that the untoggled slider has a white background in light mode.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.