Skip to content

macsmol/magog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

129 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magog Chess Engine

UCI chess engine written from scratch in Golang. Started as a competitor to my previous engine done in Java - Machess. But generally it's just an excuse to learn some Go.

Currently, it plays with modest strength and I expect it to be around 1350-1450 ELO on CCRL blitz list.

Feel free to try it out! Please report any obvious bugs or crashes you may find. :)

Features

Search

  • Alpha-beta search with iterative deepening
  • Quiescence search
  • Move ordering
    • PV-move
    • Captures/promotions according to material difference
    • killer moves

Board representation

  • 0x88 board
  • piece lists (3 per player): king, pawns, other pieces

Evaluation

  • Lazy evaluation between:
    • Tapered variant of Simplified Evaluation Function
    • Tapered variant of Simplified Evaluation Function + mobility

Non-Uci commands

  • perft <depth> - count number of moves possible from current position
  • tperft <depth> - same as perft but at <depth> count only captures and promotions. Useful for testing movegen in quiescence search.
  • tostr - print board representation of current position

Compilation

To build *.exe file run this in repository root:

go build .

To run perft test suite run:

go test .\engine -v

Credits

This engine would not have been possible if it weren't for many people who shared their knowledge: