Is Unmake Move truly necessary?
Posted: 18 May 2017, 18:47
Hello,
I'm new to this forum and have a question about unmake move. Currently my move generator achieves perft 6 from the starting position with a speed of about 20M nodes/second (single threaded). However, I would like to improve this. Granted, I'm using horrible hardware (an old laptop from 2006 - no joke) but I still feel like my move generator is extremely slower than some other top chess engines.
I wanted to focus on unmake move. It seems to me like there is a lot of overhead storing the information, and all of the checks involved whenever you unmake a move. Instead all of my moves are stored in an array, with the root initialized at index 0. My current state is simply a pointer to this array. When I want to make a move, I use std::memmove (I should probably note I'm using c++), to the next index. When I want to unmake a move, I simply move my pointer back one index.
While this is definitely less code, do you guys think I'm losing a lot of speed with this method? Do you think it's absolutely necessary to have a traditional unmake function?
I'm new to this forum and have a question about unmake move. Currently my move generator achieves perft 6 from the starting position with a speed of about 20M nodes/second (single threaded). However, I would like to improve this. Granted, I'm using horrible hardware (an old laptop from 2006 - no joke) but I still feel like my move generator is extremely slower than some other top chess engines.
I wanted to focus on unmake move. It seems to me like there is a lot of overhead storing the information, and all of the checks involved whenever you unmake a move. Instead all of my moves are stored in an array, with the root initialized at index 0. My current state is simply a pointer to this array. When I want to make a move, I use std::memmove (I should probably note I'm using c++), to the next index. When I want to unmake a move, I simply move my pointer back one index.
While this is definitely less code, do you guys think I'm losing a lot of speed with this method? Do you think it's absolutely necessary to have a traditional unmake function?