ruicoelhopedro / pawn

An experimental UCI chess engine
GNU General Public License v3.0
10 stars 1 forks source link

Pawn thinks while only 1 move possible #7

Closed tissatussa closed 1 year ago

tissatussa commented 2 years ago

Often Pawn is thinking for many seconds while only 1 move is possible .. i think you should fix this, with instant benefit ..

ruicoelhopedro commented 2 years ago

This needs to be tested. Even when only one move is possible, time is not wasted as we are filling the hash table. I'm down to reducing the allocated search time if it proves beneficial.

tissatussa commented 2 years ago

OK. I'm certain you're aware of this issue .. i don't know how to implement such thing in code, but i guess all valid moves in a position are known before starting any eval, so when the movelist has only one move, why not instantly play it ?

ruicoelhopedro commented 2 years ago

I'm not fond of moving immediately without searching. It is good practice to always output scores and PVs to the GUI before a bestmove is sent. Reducing search time for these positions seems a lot more appropriate, as long as there are no regressions in strength.