bot/src/beam.cpp
/*
* Reset the beam search
* Call this when we want to search from a new root state
*/
Reset the beam search
Call this when we want to search from a new root state
Reset the beam search Call this when we want to search from a new root state
void beam::reset()
{
	for (int i = 0; i < max_depth; ++i) {
		queue[i] = PIECE_NONE;
	}
	queue_count = preview;
	for (int i = 0; i < max_reward; ++i) {
		reward[i].visit = 0;
		reward[i].score = 0;
	}
	reward_count = 0;
	for (int i = 0; i < depth; ++i) {
		layer[i].clear();
	}
}
void beam :: reset ( ) { for ( int i = 0 ; i < max_depth ; ++ i ) { queue [ i ] = PIECE_NONE ; } queue_count = preview ; for ( int i = 0 ; i < max_reward ; ++ i ) { reward [ i ] . visit = 0 ; reward [ i ] . score = 0 ; } reward_count = 0 ; for ( int i = 0 ; i < depth ; ++ i ) { layer [ i ] . clear ( ) ; } }
Reset the beam search
Call this when we want to search from a new root state
Reset the beam search Call this when we want to search from a new root state
// Setting things
 // Clear vector
