MCPcopy Index your code
hub / github.com/MitchelPaulin/Walleye

github.com/MitchelPaulin/Walleye @1.6.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.6.0 ↗ · + Follow
206 symbols 494 edges 11 files 42 documented · 20% updated 10mo ago1.6.0 · 2022-03-10★ 1343 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Walleye

tests

Walleye is a UCI-compatible chess engine written using the classic alpha-beta style AI.

Play Against It

Challenge me on Lichess! https://lichess.org/@/Walleye_Bot

The engine should also work in any chess program that supports UCI, at this time however it has only been tested with Cute Chess.

Example Usage

By default, the engine launches in UCI mode and expects to be loaded into a chess GUI. \ However, you can run some commands from the terminal, such as -P to watch the engine play against itself or -T to benchmark move generation and evaluation.

# helpful when profiling, will accept a FEN string
./walleye -T --depth=5
# start a game from a FEN string and have the engine play against itself
./walleye --fen="r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1" -P

demo

Use ./walleye --help for a complete list of commands.

Building

It is strongly recommended you compile the engine with --release for the best performance.

cargo build --release

Portability

In the cargo/config file the target CPU is set to native. During testing I saw modest performance improvements using this setting. If however you plan to compile Walleye and use the binary on multiple systems you should delete these lines before compiling.

About

Board

  • Square Centric 12x12 Array

Extra board squares are sentinel squares to make boundary checking easier.

Search

  • Alpha-Beta Pruning
  • Iterative Deepening
  • Capture/Check Extension
  • Killer Moves
  • MVV-LVA
  • PV Search

Evaluation

  • Piece Square Table

Other

  • Terminal based games with unicode chess boards
  • Robust logging

Tests

Walleye comes with a suite of unit tests and perft tests. It has been verified on a variety of positions to around depth 5.

# run perft tests
cargo test perft
# run all tests
cargo test

Rating

Walleye was ranked by CCRL, you can find its rating between versions here

Resources

Some resources and tools I found helpful when creating this engine.

Issues

If you find an issue with the engine please include the walleye_{PID}.log file along with the report, you can enable this by setting DebugLogLevel to Info in the UCI options.

License

Walleye is under the MIT license.

Core symbols most depended-on inside this repo

take_away_castling_rights
called by 36
src/board.rs
is_empty
called by 21
src/board.rs
move_piece
called by 17
src/board.rs
get_val_for_piece
called by 16
src/zobrist.rs
pawn_moves
called by 14
src/move_generation.rs
is_check_cords
called by 10
src/move_generation.rs
unset_pawn_double_move
called by 10
src/board.rs
send_to_gui
called by 10
src/uci.rs

Shape

Function 150
Method 44
Class 7
Enum 5

Languages

Rust100%

Modules by API surface

src/move_generation.rs87 symbols
src/board.rs58 symbols
src/uci.rs17 symbols
src/draw_table.rs10 symbols
src/search.rs7 symbols
src/evaluation.rs7 symbols
src/zobrist.rs6 symbols
src/utils.rs6 symbols
src/engine.rs5 symbols
src/time_control.rs2 symbols
src/main.rs1 symbols

For agents

$ claude mcp add Walleye \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact