File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -24,29 +24,30 @@ pub(crate) fn formula(depth: usize, move_count: usize) -> f64 {
2424#[ cfg( test) ]
2525mod tests {
2626 use super :: * ;
27+ const ZERO : f64 = 0.0 ;
2728
2829 #[ test]
2930 fn test_lmr_formula ( ) {
3031 let depth = 5 ;
3132 let move_count = 10 ;
3233 let result = formula ( depth, move_count) ;
3334 assert ! ( result. is_finite( ) ) ;
34- assert ! ( result > 0.0 ) ;
35+ assert ! ( result > ZERO ) ;
3536 }
3637
3738 #[ test]
3839 fn test_lmr_formula_zero_depth ( ) {
3940 let depth = 0 ;
4041 let move_count = 10 ;
4142 let result = formula ( depth, move_count) ;
42- assert_eq ! ( result, LMR_OFFSET ) ;
43+ assert_eq ! ( result, ZERO ) ;
4344 }
4445
4546 #[ test]
4647 fn test_lmr_formula_zero_moves ( ) {
4748 let depth = 5 ;
4849 let move_count = 0 ;
4950 let result = formula ( depth, move_count) ;
50- assert_eq ! ( result, LMR_OFFSET ) ;
51+ assert_eq ! ( result, ZERO ) ;
5152 }
5253}
Original file line number Diff line number Diff line change @@ -26,5 +26,5 @@ pub(crate) const IIR_DEPTH_REDUCTION: ScoreType = 1;
2626pub ( crate ) const NMP_MIN_DEPTH : ScoreType = 3 ;
2727pub ( crate ) const NMP_DEPTH_REDUCTION : ScoreType = 2 ;
2828
29- pub ( crate ) const LMR_OFFSET : f64 = 0.0 ;
29+ pub ( crate ) const LMR_OFFSET : f64 = 0.2 ;
3030pub ( crate ) const LMR_SCALING_FACTOR : f64 = 3.0 ;
You can’t perform that action at this time.
0 commit comments