#Segmentation fault (core dumped)

20 messages · Page 1 of 1 (latest)

lunar mountain
#

hi i tried in the cli to find the best move for this valid fen notation "1r2k2r/5pb1/2p1p1p1/1pnpPn1p/3R1P1P/1P3P2/PqP1Q3/2KR4 b k - 5 27" but after go depth i get an. Segmentation fault.

position fen 1r2k2r/5pb1/2p1p1p1/1pnpPn1p/3R1P1P/1P3P2/PqP1Q3/2KR4 b k - 5 27
go depth 7
info string NNUE evaluation using nn-ad9b42354671.nnue enabled
Segmentation fault (core dumped)

does somebody know how to fix this? thanks 🙂

shy sinew
#

Looks like the fen isn't valid, my own engine also crashes on an aseert

#

lemme check

onyx turret
#

Black to move while white in check

tawny latchBOT
lunar mountain
#

eval just works fine. but go depth crashes

dusk bobcat
#

obviously.. illegal fen

lunar mountain
#

why is it an illegal fen?

shy sinew
#

because black is to move while white is in check

#

so black can capture the king

lunar mountain
#

oh ok thanks, do u have any clue how to detect those cases, when i try to programm (python) a chess game engine (for like AI vs stockfish)?

onyx turret
#

Use the chess library

dusk bobcat
lunar mountain
#

i am using this but i dont find any methode to detect it 😦

#

i am using simplEngine for stockfish. i am letting alternating my ai and stockfish do a move. when stockfish is in a postion like this it should end the game. is there a way?

dusk bobcat
#

is_valid()

shrewd wren
#

I guess OP should check is_game_over() before sending new position to the next engine

gray salmon
#

Please note that passing weird chess positions in chess, let alone illegal position, to Stockfish, is an undefined behavior.

#

Stockfish optimizes for typical chess games that humans or machines could face.