Coding Global Background
Coding Global

Chess Engine crashing for recursion search with depth = 4

Archiviert 2 months ago
1 Nachrichten
2 Mitglieder
3 months ago
In Discord öffnen
A
Adorian
Verified

Hi, im currently making a chess engine in Godot, using C++, rn im testing the speed of searching all moves posible. I made a version in which each time i did a move i copied all the variables (in a struct called GameState) and when i undo the move i just set the current state to the prevous one (saved in a variable GameSTate* prev_state). But i saw that wasnt very fast, so i searched what i could improve, castling checking, implementing magic bitboard, and move undoing. So instead of coping the whole state, i just undo the moves in place, with the same varibales and just encapsulate some variables like castling_rights and en_passant_square, in GameState, this make it around 2x-1.5x faster, but now for some reason when i try to search with a depth = 4 it just crashes. If someone thinks that can help me, or maybe need some fragments of the code he can text me in private. Thanks.

Chess Engine crashing for recursion search with depth = 4

Antworten (1)