/Catto

A working-in-progress, experimental UCI chess engine

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0



The Catto Chess Engine

Dependencies

  • Node.js & npm

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

Configure

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

module.exports = {
    // Search depth
    searchDepth: 5,
    // Set to true to turn on debug mode, will log out useful info
    debug: true,
    // If you disable stable mode, features that are in-dev and might cause issues will be turned on
    stable: true,
    // Leave true if you want UCI enabled, otherwise it will ask for a FEN string and log out the best position
    uci: true,
    // The starting position represented as a FEN string
    fen: "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
    // Current version to show in UCI
    version: "v0.4.2",
    // Late move reduction config
    lmrFullDepth: 4, // Number of moves to be searched in full depth
    lmrMaxReduction: 3 // Only apply LMR above this depth
}

What do we currently have?

The engine

  • Negamax search algorithm with Alpha-Beta pruning.
  • Move ordering:
    • MVV-LVA heuristic.
    • Killer heuristic.
    • History heuristic.
    • Countermove heuristic.
  • Transposition table (enabled without Zobrist hashing).
  • Null-move pruning.
  • Late move reductions.
  • Search extensions:
    • Check extensions.
    • One reply extensions.
  • Quiescence search.
  • Evalution:
    • PeSTO evaluation.
    • Pawn structure.
  • Checkmate and draw detection.
  • UCI.

Todos

See todos for Catto here.

This looks familiar...

This used to be the Meow chess engine but I have decided to rebuilt it from the ground up because the old codebase is too messy and I lost track of what I was doing. Catto is written in Typescript and is designed to be more modular.

Copyrights

Copyrights © 2024 Nguyen Phu Minh.

This project is licensed under the GPL-3.0 License.