https://github.com/bjarkehautop/orbischessengine.jl
A Chess Engine written in Julia
https://github.com/bjarkehautop/orbischessengine.jl
chess chess-engine chess-game julia julia-package
Last synced: about 2 months ago
JSON representation
A Chess Engine written in Julia
- Host: GitHub
- URL: https://github.com/bjarkehautop/orbischessengine.jl
- Owner: BjarkeHautop
- License: mit
- Created: 2025-09-23T14:42:18.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2026-04-28T19:54:09.000Z (about 2 months ago)
- Last Synced: 2026-04-30T12:25:17.844Z (about 2 months ago)
- Topics: chess, chess-engine, chess-game, julia, julia-package
- Language: Julia
- Homepage: https://bjarkehautop.github.io/OrbisChessEngine.jl/
- Size: 9.3 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# OrbisChessEngine.jl
[](https://BjarkeHautop.github.io/OrbisChessEngine.jl/stable)
[](https://BjarkeHautop.github.io/OrbisChessEngine.jl/dev)
[](https://github.com/BjarkeHautop/OrbisChessEngine.jl/actions/workflows/Test.yml?query=branch%3Amain)
[](https://codecov.io/gh/BjarkeHautop/OrbisChessEngine.jl)
[](https://github.com/JuliaTesting/Aqua.jl)
[](https://github.com/SciML/SciMLStyle)
[](https://github.com/JuliaBesties/BestieTemplate.jl)
A Julia package that implements chess from scratch alongside a chess engine, **Orbis**. It provides functionalities to represent the chessboard, validate moves, and evaluate positions.
Particularly, *OrbisChessEngine* implements:
- All chess rules
- Bitboard representation
- Legal move generation (tested with [perft](https://www.chessprogramming.org/Perft))
- [FEN](https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation) parsing
- Opening book support
- Minimax search with alpha–beta pruning, iterative deepening, quiescence search, transposition tables, null move pruning, and move ordering heuristics
- Evaluation function based on piece-square tables
## Installation
`OrbisChessEngine` can be installed directly from the Julia package manager.
In the Julia REPL, press `]` to enter the Pkg mode, then run:
```julia
pkg> add OrbisChessEngine
```
## Example
Here we show an example of how to let the engine play a "1+1" game against itself and plot it afterwards to view it.
```julia
game = Game("1+1")
plots = []
while game_status(game.board) == :ongoing
engine_move!(game)
push!(plots, display(game))
end
for i in eachindex(plots)
sleep(0.5)
display(plots[i])
end
```
## Resources
View the documentation at [https://BjarkeHautop.github.io/OrbisChessEngine.jl/dev/](https://BjarkeHautop.github.io/OrbisChessEngine.jl/dev/).
Visit chess programming wiki for useful articles on chess engine programming: [https://www.chessprogramming.org/Main_Page](https://www.chessprogramming.org/Main_Page).
## TODO
- Improve search performance by minimizing allocations
- Improve evaluation function (e.g. add pawn structure, king safety, trapped pieces, etc.)
- Add support for multiple threads in search (e.g. lazy SMP)
- Implement (some of) [UCI](https://en.wikipedia.org/wiki/Universal_Chess_Interface) protocol
- Make executable with [PackageCompiler.jl](https://julialang.github.io/PackageCompiler.jl/dev/)
- Add magic bitboards for faster move generation (added for bishops, but not yet used. Minimal performance improvement observed - see [Benchmarks](https://bjarkehautop.github.io/OrbisChessEngine.jl/dev/40-benchmarks/) for details.)
- Implement into Lichess bot (see )