reduce size of ints that represent value
This commit is contained in:
@@ -277,8 +277,8 @@ impl FutureMoves {
|
||||
let children_value = match self.config.children_eval_method {
|
||||
ChildrenEvalMethod::Average => children_values
|
||||
.into_iter()
|
||||
.sum::<i128>()
|
||||
.checked_div(self.arena[idx].children.len() as i128),
|
||||
.sum::<i32>()
|
||||
.checked_div(self.arena[idx].children.len() as i32),
|
||||
ChildrenEvalMethod::Max => children_values.into_iter().max(),
|
||||
ChildrenEvalMethod::Min => children_values.into_iter().min(),
|
||||
}
|
||||
@@ -288,7 +288,7 @@ impl FutureMoves {
|
||||
// we should really setup some sort of ELO rating for each commit, playing them against
|
||||
// each other or something, could be cool to benchmark these more subjective things, not
|
||||
// just performance (cycles/time wise)
|
||||
self.arena[idx].value = Some(self.arena[idx].self_value as i128 + children_value);
|
||||
self.arena[idx].value = Some(self.arena[idx].self_value as i32 + children_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user