diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-02-01 01:38:13 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-02-01 01:38:13 +0300 |
commit | 41389a25e6e2aac395810029cce070cddec6ae86 (patch) | |
tree | ae014eae16b3bba6fc7e13cfab81a94f9eeeaf0d /src | |
parent | afe7cb91c0ef7f6a07f38447a1b08376f7b9fa5d (diff) | |
download | chessnost-41389a25e6e2aac395810029cce070cddec6ae86.tar.gz |
fix: assign negative values for E2/E7 king squares
Diffstat (limited to 'src')
-rw-r--r-- | src/board/engine.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/board/engine.rs b/src/board/engine.rs index 835a9b6..10fb604 100644 --- a/src/board/engine.rs +++ b/src/board/engine.rs @@ -84,7 +84,7 @@ const KING_BONUS: [f32; 64] = [ -0.30, -0.40, -0.40, -0.50, -0.50, -0.40, -0.40, -0.30, -0.20, -0.30, -0.30, -0.40, -0.40, -0.30, -0.30, -0.20, -0.10, -0.20, -0.20, -0.20, -0.20, -0.20, -0.20, -0.10, - 0.20, 0.20, 0.00, 0.00, 0.00, 0.00, 0.20, 0.20, + 0.20, 0.20, 0.00, -0.10, -0.10, 0.00, 0.20, 0.20, 0.20, 0.10, 0.30, -0.20, 0.00, 0.10, 0.30, 0.20 ]; @@ -671,11 +671,13 @@ mod tests { assert!(KING_BONUS[Square::G1.mirror() as usize] > 0.0); assert!(KING_BONUS[Square::C1.mirror() as usize] > 0.0); assert!(KING_BONUS[Square::D1.mirror() as usize] < 0.0); + assert!(KING_BONUS[Square::E2.mirror() as usize] < 0.0); assert_eq!(KING_BONUS[Square::E8 as usize], 0.0); assert!(KING_BONUS[Square::G8 as usize] > 0.0); assert!(KING_BONUS[Square::C8 as usize] > 0.0); assert!(KING_BONUS[Square::D8 as usize] < 0.0); + assert!(KING_BONUS[Square::E2 as usize] < 0.0); } mod evaluation { |