Author: Pat King
Date: 08:56:15 03/18/02
Go up one level in this thread
Like most of the respondants, I use a global move list. I can tell you with
certainty that 1024 moves is too small. I can also tell you that it would be
very helpful in your debug version to be able to catch move list overruns so you
KNOW rather than suspect that your move list is too small. Currently I am using
C++ vectors, C style assertions, and an inline function call to accomplish this.
vector<move> ML; // Global Master Move List
int main() {ML.reserve(ML_SIZE);...} // Make sure it's big enough to prevent
// reallocations, which will slow speed and invalidate iterators
inline void add_move(const move &m) {
assert(ML.size()<ML.capacity()); // Adding a move will not cause reallocation
ML.push_back(m);
}
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.