fix failing test
This commit is contained in:
parent
e468464956
commit
4a82c01d64
@ -13,10 +13,10 @@ pub struct ComplexAgent {
|
||||
impl ComplexAgent {
|
||||
pub const fn new(color: Piece) -> Self {
|
||||
const CONFIG: FutureMoveConfig = FutureMoveConfig {
|
||||
max_depth: 10,
|
||||
max_depth: 13,
|
||||
min_arena_depth_sub: 3,
|
||||
top_k_children: 2,
|
||||
up_to_minus: 4,
|
||||
up_to_minus: 3,
|
||||
max_arena_size: 10_000_000,
|
||||
};
|
||||
Self {
|
||||
|
||||
@ -255,6 +255,10 @@ impl FutureMoves {
|
||||
!self.agent_color,
|
||||
self.agent_color,
|
||||
));
|
||||
// because we have to regenerate root from a [`Board`]
|
||||
// we need to reset the current_depth (fixes `skip_move_recovery`)
|
||||
self.current_depth = 0;
|
||||
|
||||
self.set_root_idx_raw(0);
|
||||
}
|
||||
|
||||
@ -557,7 +561,7 @@ mod tests {
|
||||
board: Board::new(),
|
||||
winner: Winner::None,
|
||||
parent: None,
|
||||
children: vec![1],
|
||||
children: vec![],
|
||||
value: None,
|
||||
self_value: 0,
|
||||
color: Piece::Black,
|
||||
@ -638,8 +642,9 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
/// tests whether or not FutureMoves can recover from multiple skips and then manually regenerating the arena
|
||||
#[test]
|
||||
fn best_move_failure() {
|
||||
fn skip_move_recovery() {
|
||||
let mut futm = FutureMoves::new(Piece::Black, FUTURE_MOVES_CONFIG);
|
||||
let mut board = Board::new().starting_pos();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user