Preferences

ViktorRay parent
This is a cool program.

What system is it using for the “play with computer”? Is it custom or one of the available chess engines?

I wonder if there is a way to alter the difficulty of the computer program.


omoikane
Looks like computer moves randomly:

    /*************************************************************
     * Computer Move (random)
     *************************************************************/
    function computerMove(){
      if (gameOver) return;
      let wasWhite=whiteToMove;
      let moves=generateLegalMoves(wasWhite);
      if (moves.length===0){
        detectGameState();
        return;
      }
      let randIndex=Math.floor(Math.random()*moves.length);
      let move=moves[randIndex];
      makeMove(move);
      renderBoard();
      detectGameState();

      if (!wasWhite){
        fullmoveNumber++;
      }
    }
zamalek
What could be interesting is playing against a full-strength engine, that is forced to sacrifice a piece every N moves (I initially wrote "blunder," but the top sacrificial Stockfish move would likely still be a viable strategy).
mkoryak
Close your eyes when you make your moves to increase difficulty

This item has no comments currently.