Resources


About

Codfish 2000 is a javascript chess engine:

  • The name ‘Codfish’ is inspired by the famous chess engine stockfish
  • The ‘2000’ is the approximate rating

For the first few moves, the engine will randomly choose one of the three most popular lines played by grandmasters in over-the-board games. If the user plays an unknown opening move or the opening book ends, then the engine will start playing moves by itself, using a basic minimax algorithm with alpha-beta pruning optimization

All the rules of chess are implemented except for the repetition rule (if the same board appears three times, then the game ends in a draw)

The algebraic notation used (the standard method for describing moves) is also slightly simplified and does not consider checks (+) and checkmates (#)

The website offers the possibility to use Codfish 2000 to analyze any chess position, specified via the standard FEN notation, and also offers the possibility to watch the engine play against itself

Registered users can save the result of each analysis to a database and can also, during a match against the engine, create a bookmark of a particular position to analyze later

See it in action

Play against the CPU

Analyze position

Note: Security was NOT a priority in this project (at least passwords are hashed)