π Search
- Regular search: fail hard -> fail soft (#1039, #1040, #1041)
- QSearch: fail hard -> fail soft (#1052)
- Fail soft TT cutoffs (#1044)
- Remove
pvNode
condition for first move full search (#1045) - History pruning: quiet history (#972)
- Improve queen promotion with capture move ordering (#1061)
- Make
TranspositionTableElement.Key
anushort
instead of ashort
(#1070) - SPSA 2024-10-1 (#1074)
βοΈ Evaluation
- Enemy king related PSQTs (#924)
- Friendly and enemy king distance to passed pawn (#955)
- Passed pawns: bonus for not enemy pieces ahead (#998, #1008)
- Pawn phalanx (#1009, #1010)
- Bishop penalty: same color pawns (#1022)
- Bishop penalty: blocked central pawns (#1029)
- Checks (#1027)
- Mobility: exclude squares attacked by opponent's pawn (#958)
- Add 50 moves rule scaling, down to 50% of the score (#965)
- Improve endgame scaling with pawn count (#928)
- Bucketed passed pawns (#945)
- Index queen mobility bonus by attacks count excluding own pieces (#774)
- Tuning: use some Ethereal FRC data (#916)
- Tuning: tune at 5k epochs (50k epochs -> 10k epochs -> 5k) epochs (#1031)
β Time management
- Use expected moves to go (#996)
β‘ Speedups
- Move
Move
serialization toWriter
thread (#999) - Add a
Board
array toPosition
to track where pieces are indexed by square (#849) - Remove good old
_isFollowingPV
and_isScoringPV
(#1034) - Make
TaperedEvaluationTerm
an integer I (#935) - Add PSQT class to store
PackedPSQT
(#939) - Flatten PSQTs [][][][] (#927)
- Flatten capture history (#870)
- Pin 1 dimension arrays (#953)
- Pin attack-related arrays (#985)
- Reverse killer moves arrays (#861)
- Replace Chebyshev distance calculation with lookup table (double array) (#957)
- Refactor additional evaluations: pass piece side (#963)
- Speedup
InfoCommand.SearchResultInfo
(#984) - Make
SearchResult.Moves
an array and optimize its population (#986) - Refactor
Game.PositionHashHistory
into a private array (#991) - Remove
Position.MakeMoveCalculatingCapturedPiece
, usingPosition.Board
instead (#1021) - Only update PV table on PV nodes (#1042)
π§ Memory usage (!)
- Remove unnecessary, initial TT initializations (#989)
- Allocate TT only once, clearing it afterwards on
ucinewgame
(#990) - Avoid
static readonly
flat array initial allocations for inline arrays (#948) - Use
ArrayPool
to reduce recurrent allocations (#983) - Stop generating
logs/log-β.log
files by default (#1004) - Cache
Move.UCIString
results in aDictionary
(#1001) - Optimize
go
command parsing (#1005) - Remove unused props from
SearchResult
and re-order the ones left (#1006)
π Bug fixes
- Don't prune moves in regular search while being checkmated (#1060)
- Prevent negative checkmate scores from being lower than
EvaluationConstants.MinEval
(#1063)
Non-strength winning changes:
Relevant for testers:
- By default log files are no longer generated under
logs/
dir unless warnings or errors happen (#1004) - Lynx process' memory usage won't skyrocket to twice the expected (TT) value anymore, as it could briefly happen in the past, providing there was such memory available for it.
- Simplify
appsettings.json
(#1075)
Relevant for developers that consume the NuGet package:
- Lynx allocates way less than before when searching, which implies much lower GC pressure.
- You have control now of UCI
info
andbestmove
string allocations if you're usingSearcher
class to interact with the engine, since now the channel doesn't send the information pre-serialized (details below). - API changes:
Channel<string>
->Channel<object>
, you're now expected to invoke.ToString()
on whatever comes from the channel to print it. Alternatively, you can just consume it by checking object types (they are either strings,Lynx.Model.SearchResult
orLynx.UCI.Commands.Engine.BestMoveCommand
) (#999)- Remove
Position(Position, Move)
constructors, now you're forced to useMakeMove
/UnMakeMove
methods (#976) - Remove parameterless
Game
constructor, a fen or a parsing result is always required now (tip:Constants.InitialPositionFEN
can be used) (#980) - Make
Position.UniqueIdentifier
anulong
instead of along
(#1078)
Full Changelog: v1.6.0...v1.7.0