Bobby.jl
A mediocre chess moves validator
Install / Use
/learn @alemelis/Bobby.jlREADME
Bobby.jl
Bobby is a chess move validator, i.e. given a position and a candidate move, Bobby tells you whether the move is legal or not. He can also look for check/mates and stalemates.
Features
- 64-bit magic bitboards
- perft and divide calculation
- check check
- castling
- en-passant
- promotion
Install
julia> ]add Bobby
Play
You can't really play against Bobby yet, if you want to play a proper game try Chess.jl. However, you can compute the perft from any valid position. In the case of the starting position
julia> using Bobby
julia> b = Bobby.setBoard();
julia> pt = Bobby.perft(b, 5);
julia> pt.nodes
5-element Array{Int64,1}:
20
400
8902
197281
4865609
You can also import the position from its FEN
julia> b = Bobby.loadFen("r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 0");
julia> Bobby.plainPrint(b)
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
8 █Π ⋅ ⋅ ⋅ + ⋅ ⋅ Π █
7 █o ⋅ o o Ψ o Δ ⋅ █
6 █Δ ζ ⋅ ⋅ o ζ o ⋅ █
5 █⋅ ⋅ ⋅ o ζ ⋅ ⋅ ⋅ █
4 █⋅ o ⋅ ⋅ o ⋅ ⋅ ⋅ █
3 █⋅ ⋅ ζ ⋅ ⋅ Ψ ⋅ o █
2 █o o o Δ Δ o o o █
1 █Π ⋅ ⋅ ⋅ + ⋅ ⋅ Π █
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
a b c d e f g h
julia> pt = Bobby.perft(b, 4).nodes
4-element Array{Int64,1}:
48
2039
97862
4085603
Benchmarks
julia> ]activate .
julia> using Bobby
julia> using PkgBenchmark
julia> bm = benchmarkpkg(Bobby)
julia> export_markdown("benchmark.md", bm)
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
