Skip to content

Commit e2e9371

Browse files
committed
Documentation fixes
1 parent 15765fd commit e2e9371

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/engine/search.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
7071
pub 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].
712713
fn null_move_pruning_get_r(depth: i8) -> i8 {
713714
if depth <= NULL_MOVE_PRUNING_R_CHANGE_DEPTH {
714715
NULL_MOVE_PRUNING_SMALL_R

src/engine/see.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl SEEContainer {
4949
self.evaluate_internal(attacking_piece_index, target_piece_index, attackers, defenders, evaluation_parameters)
5050
}
5151

52-
/// Recursive function called by [evaluate] to help evaluate a static exchange evaluation result.
52+
/// Recursive function called by `evaluate` to help evaluate a static exchange evaluation result.
5353
fn evaluate_internal(&self, attacking_piece: u8, target_piece: u8, attackers: u8, defenders: u8, evaluation_parameters: &EvaluationParameters) -> i16 {
5454
if attackers == 0 {
5555
return 0;
@@ -84,7 +84,7 @@ impl SEEContainer {
8484
}
8585
}
8686

87-
/// Gets a piece value based on `piece_index` saved in SEE format (look [get_see_piece_index]).
87+
/// Gets a piece value based on `piece_index` saved in SEE format (look `get_see_piece_index`).
8888
fn get_piece_value(&self, piece_index: u8, evaluation_parameters: &EvaluationParameters) -> i16 {
8989
match piece_index {
9090
0 => evaluation_parameters.piece_value[PAWN as usize] as i16, // Pawn

0 commit comments

Comments
 (0)