Skip to content

nguyenphuminh/Catto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



The Catto Chess Engine

Play Catto

If you just want to play or use Catto, you can download the engine in the releases page and import it into a chess GUI (e.g. Arena, Cute Chess or Lucas Chess).

If you want to use Catto for development, follow the steps below.

Dependencies

  • Node.js & npm

Note that you may also want to use Bun which is a much faster JS runtime env than Node.js.

Setup

  1. Clone the repository to your machine.

  2. Go to ./Catto/, install the packages:

npm install
  1. Compile Catto:
npx tsc
  1. Fire up Catto!
node .

Build into executable

In your console, type:

npm run build

If you are using Bun:

npm run bun-build

Configure

There are several configurations for Catto that you can change in catto.config.js if you want:

module.exports = {
    // Current version to show in UCI
    version: "v0.7.0",
    // Late move reduction config
    lmrFullDepth: 4, // Number of moves to be searched in full depth
    lmrMaxReduction: 3, // Only apply LMR above this depth
    // Search extensions config
    maxExtensions: 2 // Seach extension limit
}

Note that the config file is compiled with the engine itself, so if you are using the built version, like catto.exe, creating a catto.config.js file will have no effect.

What do we currently have?

The engine

  • Principle variation search.
  • Move ordering:
    • Hash move ordering.
    • PV move ordering.
    • MVV-LVA heuristic.
    • Killer heuristic.
    • History heuristic.
    • Countermove heuristic.
  • Transposition table.
  • Pruning:
    • Reverse futility pruning.
    • Null-move pruning.
    • Razoring.
    • Futility pruning.
    • Delta pruning.
  • Late move reductions.
  • Search extensions:
    • Check extensions.
    • One reply extensions.
  • Quiescence search.
  • Iterative deepening.
  • Aspiration windows.
  • Time control:
    • Fixed time per move: 1/30 of the remaining time.
  • Evalution:
    • PeSTO evaluation (PST, materials, and tapered evaluation).
    • Isolated, doubled and passed pawns bonus/penalty.
    • Mobility:
      • Rook on open/half-open file bonus.
      • Bishop legal moves.
      • Queen legal moves.
    • King safety:
      • Penalty if king is on half-open file.
      • Bonus if king has pieces nearby.
  • UCI.

Todos

See todos for Catto here.

Copyrights

Copyrights © 2024 Nguyen Phu Minh.

This project is licensed under the GPL-3.0 License.