fix
This commit is contained in:
parent
c54f3a7493
commit
189a5aef58
@ -176,8 +176,8 @@ impl PlayerArena {
|
|||||||
(
|
(
|
||||||
(i, j),
|
(i, j),
|
||||||
(
|
(
|
||||||
(&self.players[i].1)(Piece::Black),
|
(self.players[i].1)(Piece::Black),
|
||||||
(&self.players[j].1)(Piece::White),
|
(self.players[j].1)(Piece::White),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -322,7 +322,7 @@ impl FutureMoves {
|
|||||||
.unwrap_or(0);
|
.unwrap_or(0);
|
||||||
|
|
||||||
self.arena[idx].value.value =
|
self.arena[idx].value.value =
|
||||||
self.arena[idx].self_value.value as i32 + child_value;
|
self.arena[idx].self_value.value + child_value;
|
||||||
}
|
}
|
||||||
ChildrenEvalMethod::MinMaxProb => {
|
ChildrenEvalMethod::MinMaxProb => {
|
||||||
let child_value = if self.arena[idx].color == self.agent_color {
|
let child_value = if self.arena[idx].color == self.agent_color {
|
||||||
|
|||||||
@ -8,7 +8,7 @@ pub enum MVSGameState {
|
|||||||
Loss = -1,
|
Loss = -1,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Allocative, PartialEq, Eq, Default, PartialOrd)]
|
#[derive(Clone, Copy, Debug, Allocative, PartialEq, Eq, Default)]
|
||||||
pub struct MoveValueStats {
|
pub struct MoveValueStats {
|
||||||
state: Option<MVSGameState>,
|
state: Option<MVSGameState>,
|
||||||
wins: u16,
|
wins: u16,
|
||||||
@ -74,6 +74,12 @@ impl MoveValueStats {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl PartialOrd for MoveValueStats {
|
||||||
|
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||||
|
Some(self.cmp(other))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Ord for MoveValueStats {
|
impl Ord for MoveValueStats {
|
||||||
fn cmp(&self, other: &Self) -> Ordering {
|
fn cmp(&self, other: &Self) -> Ordering {
|
||||||
if self.state.is_some() || other.state.is_some() {
|
if self.state.is_some() || other.state.is_some() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user