BimmerBass / Loki

C++17 chess engine
GNU General Public License v3.0
9 stars 2 forks source link

UCI default parameter crash #7

Closed BimmerBass closed 3 years ago

BimmerBass commented 3 years ago

When the engine boots, it does exactly as is stated in the UCI-protocol (http://wbec-ridderkerk.nl/html/UCIProtocol.html), and if a "go" is given, the engine will crash:

Initialized 16MB (524288 entries)  transposition table.
Resized transposition table to 16MB (524288 entries).

uciok
id name Loki 1.2.0
id author Niels Abildskov
option name Hash type spin default 16 min 1 max 1000
option name Threads type spin default 1 min 1 max 8
uciok
go
time: -1 start: 1615292690980 stop: 0 depth: 100 timesetAssertion failed: pos->pieceBBS[KING][me] != 0, file C:\Users\<USER>\Desktop\Loki\Loki\movegen.cpp, line 411

This is not necessarily a bug or an error, but it is unwanted behaviour, and should be fixed.

This should be easy to do by setting a "go" command without any elaboration equal to "go infinite" while also just loading the starting position when booting. This won't take any time which in turn won't "disobey" the protocol

BimmerBass commented 3 years ago

This has now been fixed as of the latest commit.