A Rust-based re-write of the Stockfish Chess Engine
Mostly little fixes, but most importantly, Pleco now compiles on stable Rust!
pleco
changes:nightly
feature for advanced optimizations on nightly toolchain.move_list::MAX_MOVES
to adjust for cache size based on target pointer width.prefetch
dependency and added a new prefetch.PRNG::singular_bit()
's randomness (Better distribution of bits).Alloc
, not GlobalAlloc
.bit_scan_forward
now does an unchecked lookup on the De Bruijn tableminimax
cleanup.pleco_engine
changes:pleco::prefetch_write
threadpool.rs
Features fixes to work around nightly
breaking changes, dependency changes, and bug fixes.
Seems to be around a 10-15% speed bump from the last release. Wahoo! Though, this can be mostly attributed to compiler updates, rather than any of the changes in this release.
pleco
changes:PieceLocations
Iterator from recursion to loop, to prevent stack overflowconst
arrays to static
clippy
cfgs.pleco_engine
changes:clippy
cfgs.crossbeam
, as unsafely scoped threads are available in the standard library.lazy_static
statics before benchmarking.Nothing too significant, mostly fixing issues with the new allocation system.
pleco
changes:zobrist
typo#[cold]
attributes to startup functions.pleco_engine
changes:#[cold]
attributes to startup functions.VERSION
string to a macro referencing current cargo versionThis release addresses the recent nightly breakages in allocation. No other changes since 0.1.2.
Binary included as well.
Significant bug fixes and optimizations, especially for evaluation. Many of Stockfish's searching features are implemented with this release, such as depth extensions / reductions, shallow depth pruning, and many more.
This is due to recent changes in std::alloc
and similar modules. As such, there will be no binary for this release, as that'll come with 0.1.3 to address the recent changes in nightly. This will land very soon.
pleco
to 0.4.1pleco_engine
to 0.1.2pleco
changes:Castling::player_can_castle()
returning incorrect results.Board::castling_bits()
to return the raw u8 of the castling rightsBoard::non_pawn_material_all()
to return the sum of both player's npm.Board::opposite_bishops()
to check if the only non Pawn/King pieces are two bishops of opposite players, being on opposite square types.File::bb()
and Rank::bb()` for returning the BitBoards of Files/RanksScore::centipawns()
for returning the value of a score in centipawns. This is a value mostly for UCI displaying purposes.Display
for Score
. This returns a nicely formatted version of the score in centipawns.SQ::opoosite_colors(other: SQ)
for quick determining if two squares lie on oppositely colored squares.PreFetchable
trait, containing only two methods, prefetch
. Allows for memory prefetching of certain structures. This is created for use by pleco_engine
in applying a move. It prefetches the location of a pawn table and material table. Applying a move can still be done without prefetching, due to the use of a "dummy" structure, which gets optimized away.apply_unknown_move
to apply_move_pft_chk
, and added generic prefetching parameters. These are used for a Pawn Table and Material table respectively, as mentioned above.TranspositionTable
now implements prefetching!pleco_engine
changesInCheck
parameter from qsearch (As Stockfish has done so recently as well). This has simplified the calling of qsearch
, as the callee doesn't need to know if it's in check, as qsearch now does that automatically.depth
is now a i16 across the board. This is for having negative depths with qsearch
, as it's searching past the horizon.Eval
changes:
Eval
function as a method.EvaluationInner
to distinguish internal vs. External access to evaluation.attacked_by_all
and attacked_by_queen_diagonal
from EvaluationInner
Evaluation::scale_factor()
method to further scale between mid and end-game scoresexcluded_move
search for pruning the possibility of a better non-tt move.tt_move
now defaults to the first root move when at root.improving
factor to futility pruning.cut_node
and ski_early_pruning
fields for search
Material
changes:
PreFetchable
.PawnEntry
changes:
PreFetchable
.Search
tables for continuity checking.TableBase
now has a const size associated with it, to allow for constant indexing. Also means no more resizing.lazy_static
, and instead perform any needed statics with init_globals
. This also means calls to TIMER
have been changed to timer()
, and respectively with the transposition table.mated_in
and mate_in
for returning scores within a mate value.value_from_tt
and value_to_tt
for retrieving and setting tt values with respect to the current ply.Searcher::pv
now returns results correctly, including ignoring infinite values. Also can return the distance to a mate, if available.Initial Public Release of Pleco.