Skip to content

zexk/weeb-ce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weeb-ce

A UCI chess engine written in C.

Features

  • 120-square mailbox board representation with piece lists
  • Pawn bitboards with precomputed set/clear masks
  • Zobrist hashing for position keys and repetition detection
  • Pseudo-legal move generation validated by perft
  • Iterative deepening alpha-beta search with quiescence
  • Move ordering: PV move, MVV-LVA, killer moves, history heuristic
  • Principal variation hash table
  • UCI protocol with time management

Building

make            # release build -> ./weebce
make debug      # debug build with ASSERT checks enabled
make clean

With Nix:

nix build       # result/bin/weebce
nix develop     # dev shell with gcc + make

Usage

weebce speaks UCI; point any UCI-compatible GUI (cutechess, Arena, en-croissant, ...) at the binary, or drive it by hand:

position startpos moves e2e4
go depth 6

Testing

Move generation is verified against the standard perft suite in src/perfsuite.epd (FEN positions with known node counts at depths 1-6).

Layout

File Purpose
src/chess-engine.h shared types, constants, macros
src/board.c board state, FEN parsing
src/genmove.c move generation
src/makemove.c make/unmake move
src/attack.c square attack detection
src/search.c alpha-beta + quiescence search
src/evaluate.c material + piece-square evaluation
src/pvtable.c principal variation table
src/uci.c UCI protocol loop
src/perft.c perft move-generation testing

About

chess engine written in C

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages