aboutsummaryrefslogtreecommitdiff
path: root/src/board/engine.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/board/engine.rs')
-rw-r--r--src/board/engine.rs13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/board/engine.rs b/src/board/engine.rs
index fb06fa4..f7139e5 100644
--- a/src/board/engine.rs
+++ b/src/board/engine.rs
@@ -87,16 +87,7 @@ impl Board {
} else {
-1.
};
- let multiplier = match piece_type.without_color() {
- PieceType::Pawn => 1.,
- PieceType::Bishop => 3.,
- PieceType::Knight => 3.,
- PieceType::Rook => 4.5,
- PieceType::Queen => 9.,
- PieceType::King => 0.,
- _ => panic!("Piece should be without color"),
- };
-
+ let multiplier = piece_type.static_eval();
eval += sign * multiplier * pop_count(*bitboard) as f32;
}
eval
@@ -124,9 +115,9 @@ impl Board {
let moves = match transposition {
Some(item) => {
- // println!("Cache hit! {:?}", item);
if item.node_type == NodeType::PV && item.depth >= depth_left {
+ // println!("Cache hit (depth_left={}): {:?}", depth_left, item);
vec![item.best_move]
} else {
self.generate_pseudolegal_moves(color)