nits
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
use crate::repr::{Board, Piece, Winner};
|
||||
|
||||
use super::board_value::BoardValueMap;
|
||||
use crate::repr::{Board, Piece, Winner};
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Move {
|
||||
@@ -27,10 +25,13 @@ pub struct Move {
|
||||
/// Value of this move (including children)
|
||||
pub value: i128,
|
||||
|
||||
/// What is the inherit value of this move (not including children)
|
||||
pub self_value: i64,
|
||||
|
||||
/// Which color made a move on this move?
|
||||
pub color: Piece,
|
||||
|
||||
/// Should the children of this move be lazily generated?
|
||||
pub lazy_children: bool,
|
||||
}
|
||||
|
||||
@@ -69,7 +70,7 @@ impl Move {
|
||||
(self.i, self.j)
|
||||
}
|
||||
|
||||
pub fn compute_self_value(&self, agent_color: Piece) -> i64 {
|
||||
fn compute_self_value(&self, agent_color: Piece) -> i64 {
|
||||
if self.winner == Winner::Player(!agent_color) {
|
||||
// if this board results in the opponent winning, MAJORLY negatively weigh this move
|
||||
// NOTE! this branch isn't completely deleted because if so, the bot wouldn't make a move.
|
||||
|
||||
Reference in New Issue
Block a user