Skip to content

Commit

Permalink
Tagged Possible-ID-Fix-20230326
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-moreton committed Mar 26, 2023
1 parent ef95d27 commit c051d42
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
Binary file added scripts/.cute-rusty.sh.swp
Binary file not shown.
4 changes: 4 additions & 0 deletions src/mvm_test_fens.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use crate::types::Score;

// Rival blunders analysed on Chess.com - Ra2 is a blunder
// position fen 4k3/1r3p2/n2Bb1r1/p1p2N2/2P3P1/5P2/3R4/4R1K1 w - - 4 42


pub fn get_test_fens() -> Vec<(&'static str, &'static str, Score, u32)> {
vec![
("8/8/2p5/2P4p/4Pk1P/8/5K2/8 b - - 0 45", "f4e4", 500, 250), // 250
Expand Down
11 changes: 9 additions & 2 deletions src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,15 @@ pub fn iterative_deepening(position: &Position, max_depth: u8, search_state: &mu
}

if aspire_best.1 > aspiration_window.0 && aspire_best.1 < aspiration_window.1 {
search_state.current_best = aspire_best;
//println!("Found a move within the aspiration window {} {} {} {}", aspire_best.1, aspiration_window.0, aspiration_window.1, c);
if aspire_best.1 > search_state.current_best.1 {
println!("Found a better move {} {}", aspire_best.0[0], aspire_best.1);
search_state.current_best = aspire_best;
}
//println!("Current best move at iteration {} is {} {}", c, search_state.current_best.0[0], search_state.current_best.1);
break;
} else {
//println!("Move score was outside the aspiration window {} {} {} {}", aspire_best.1, aspiration_window.0, aspiration_window.1, c);
c += 1;
if c == aspiration_radius.len() {
aspiration_window = (-MAX_WINDOW, MAX_WINDOW);
Expand All @@ -122,6 +128,7 @@ pub fn iterative_deepening(position: &Position, max_depth: u8, search_state: &mu
} else if aspire_best.1 >= aspiration_window.1 {
aspiration_window.1 = min(MAX_WINDOW, aspiration_window.1 + aspiration_radius[c]);
}
//println!("New aspiration window {} {}", aspiration_window.0, aspiration_window.1);
};
}

Expand Down Expand Up @@ -261,7 +268,7 @@ pub fn draw_value(position: &Position, search_state: &SearchState) -> Score {
#[inline(always)]
pub fn extend(predicate: bool, these_extentions: u8, ply: u8, search_state: &SearchState) -> u8 {
if these_extentions == 0 && predicate && ply < search_state.iterative_depth * 2 {
1
0
} else {
0
}
Expand Down
2 changes: 1 addition & 1 deletion src/uci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ fn calc_from_colour_times(mut uci_state: &mut UciState, millis: u64, inc_millis:

fn cmd_uci() -> Either<String, Option<String>> {
Right(Some(
r#"id name Rusty Rival |Extend-20230325-1|
r#"id name Rusty Rival |Possible-ID-Fix-20230326|
id author Chris Moreton
option name Clear Hash type button
option name MultiPV type spin default 1 min 1 max 20
Expand Down

0 comments on commit c051d42

Please sign in to comment.