pensquid / yobmef

Weird toy chess engine written *very much from scratch* in Rust.
14 stars 1 forks source link

Incrementally update Board.attacked #14

Open UlisseMini opened 3 years ago

UlisseMini commented 3 years ago

As of right now, ~78% of make_move_mut is in update_attackers. Incrementally updating instead of fully re-computing would be ideal.

https://www.chessprogramming.org/Incremental_Updates#Attack_table Flamegraph of make_move_mut (from perft(6)) flamegraph

Lazily evaluating update_attackers doesn't help much, if we're searching legal moves we'll need it every time anyway.