@@ -67,6 +67,7 @@ enum MoveGeneratorStage {
6767 AllGenerated ,
6868}
6969
70+ /// Wrapper for the entry point of the regular search, look at `run_internal` for more information.
7071pub fn run < const DIAG : bool > ( context : & mut SearchContext , depth : i8 ) {
7172 let king_checked = context. board . is_king_checked ( context. board . active_color ) ;
7273 run_internal :: < true , true , DIAG > ( context, depth, 0 , MIN_ALPHA , MIN_BETA , true , king_checked) ;
@@ -688,7 +689,7 @@ fn static_null_move_pruning_get_margin(depth: i8) -> i16 {
688689///
689690/// Conditions:
690691/// - only non-PV nodes
691- /// - depth >= [NULL_MOVE_MIN_DEPTH ]
692+ /// - depth >= [NULL_MOVE_PRUNING_MIN_DEPTH ]
692693/// - game phase is not indicating endgame
693694/// - beta score is not a mate score
694695/// - friendly king is not checked
@@ -707,8 +708,8 @@ fn null_move_pruning_can_be_applied<const PV: bool>(
707708 && allow_null_move
708709}
709710
710- /// Gets the null move pruning depth reduction, called R, based on `depth`. It returns [NULL_MOVE_SMALL_R ] if `depth` is less or equal
711- /// to [NULL_MOVE_R_CHANGE_DEPTH ], otherwise [NULL_MOVE_BIG_R ].
711+ /// Gets the null move pruning depth reduction, called R, based on `depth`. It returns [NULL_MOVE_PRUNING_SMALL_R ] if `depth` is less or equal
712+ /// to [NULL_MOVE_PRUNING_R_CHANGE_DEPTH ], otherwise [NULL_MOVE_PRUNING_BIG_R ].
712713fn null_move_pruning_get_r ( depth : i8 ) -> i8 {
713714 if depth <= NULL_MOVE_PRUNING_R_CHANGE_DEPTH {
714715 NULL_MOVE_PRUNING_SMALL_R
0 commit comments