abahm / Chess.jl

Chess engine written in Julia
34 stars 4 forks source link

Julia Logo

Chess.jl

Julia module which can play chess and chess960.

The goal is to create a reasonably performant chess engine, that can generate legal moves, and play with minimal interface (i.e. in the REPL). Bitboards are used to represent the state. This code is a learning exercise in both engine building, and performant Julia code, and is still "in progress".

Please note - this is not the Chess.jl that is in the packages library! For Romstad's more complete chess package, see romstad Chess.jl.

Playing a game in the REPL

julia Chess.jl -repl

The chess board and move history is printed every move in the REPL. Enter moves as "e2e4" or "h7h8q". Type "?" to see a full list of commands. (Note active directory must be src.)

Play a game with winboard/xboard

In Linux/Max OSX: xboard -fcp 'julia Chess.jl -xboard'

In windows: winboard.exe /debug /fcp="julia Chess.jl -xboard"

(Note active directory must be src.)

Developers

As it is during development, to load the module, you will have to add the path to your .juliarc.jl in your home directory:

] add "<path-to-local-repo>/Chess.jl"

Start julia (v1.7 or higher), then execute

using Chess

Chess.play()

Resources

Resources

History

History