#shogi #game-engine #nnue #japanese-chess

rshogi-core

A high-performance shogi engine core library with NNUE evaluation

15 releases

Uses new Rust 2024

0.2.4 Mar 30, 2026
0.2.3 Mar 27, 2026
0.2.2 Feb 27, 2026
0.1.9 Feb 13, 2026
0.1.6 Jan 30, 2026

#435 in Game dev

Download history 135/week @ 2026-01-29 6/week @ 2026-02-05 5/week @ 2026-02-12 24/week @ 2026-02-19 20/week @ 2026-02-26 67/week @ 2026-04-02

67 downloads per month

GPL-3.0-only

2.5MB
44K SLoC

rshogi-core

A high-performance shogi (Japanese chess) engine core library written in Rust.

Features

  • Bitboard-based board representation - Fast move generation and position evaluation
  • NNUE evaluation - Neural network-based evaluation with HalfKP architecture support
  • Alpha-beta search - With various pruning techniques (null move, futility, LMR, etc.)
  • Transposition table - Lock-free concurrent hash table
  • Time management - Adaptive time control for various time settings
  • Multi-threaded search - Lazy SMP parallel search support

Installation

Add this to your Cargo.toml:

[dependencies]
rshogi-core = "0.2"

Usage

use rshogi_core::position::{Position, SFEN_HIRATE};
use rshogi_core::search::{Search, LimitsType};

// Create a new position (starting position)
let mut pos = Position::new();
pos.set_sfen(SFEN_HIRATE).unwrap();

// Create search engine (transposition table size: 64MB)
let mut search = Search::new(64);

// Set search limits
let mut limits = LimitsType::new();
limits.depth = 10;

// Run search
let result = search.go(&mut pos, limits, None::<fn(&_)>);
println!("Best move: {}", result.best_move.to_usi());

License

GPL-3.0-only License

参考・影響 / Acknowledgements

本クレートは将棋エンジン YaneuraOu およびチェスエンジン Stockfish を参考にしています。

Dependencies

~0.8–15MB
~125K SLoC