Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Rockfish

A microscopic chess engine that barely knows what it's doing.

Rockfish is a deliberately tiny and obscure chess engine written in Python. It uses a simple minimax search, material counting, and a tiny amount of center-control evaluation. No opening book, no transposition tables, no alpha-beta pruning, and absolutely no grandmaster aspirations.

Features

  • Legal chess move generation
  • Material-based evaluation
  • Center control evaluation
  • Minimax search
  • Tiny codebase

What Rockfish Does Not Have

  • Alpha-beta pruning
  • Transposition tables
  • Piece-square tables
  • Quiescence search
  • Opening books
  • Endgame tablebases

Installation

Install Python 3 and the required dependency:

pip install chess

Clone the repository:

git clone https://github.com/username/Rockfish.git
cd Rockfish

Running

python Rockfish.py

The engine will play moves automatically until the game ends.

Evaluation Function

Rockfish evaluates positions using:

Material

Piece Value
Pawn 100
Knight 320
Bishop 330
Rook 500
Queen 900
King 0

Center Control

Additional points are awarded for attacking:

  • d4
  • e4
  • d5
  • e5

Strength

Estimated playing strength:

  • Approximately 300–700 Elo
  • Strong enough to play legal chess

Design Philosophy

Most engines attempt to find the best move.

Rockfish attempts to find a move.

Example Output

r n b q k b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
R N B Q K B N R

Engine: e2e4

Roadmap

Possible future improvements:

  • Alpha-beta pruning
  • Better evaluation
  • Move ordering
  • Opening knowledge
  • Basic tactical awareness

License

Do whatever you want with it. But do inform me of what you plan on doing please.

If Rockfish accidentally defeats Stockfish, please open an issue immediately please.

About

A microscopic chess engine that barely knows what it's doing.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages