2025-09-07 15:45:25 +02:00
|
|
|
#ifndef SEARCH_H
|
|
|
|
|
#define SEARCH_H
|
|
|
|
|
|
|
|
|
|
#include "movegen.h"
|
|
|
|
|
|
2025-11-01 20:11:45 +01:00
|
|
|
typedef struct
|
|
|
|
|
{
|
2025-09-07 15:45:25 +02:00
|
|
|
int depth;
|
|
|
|
|
int nodes;
|
|
|
|
|
} SearchLimits;
|
|
|
|
|
|
2025-11-01 20:11:45 +01:00
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
int from;
|
|
|
|
|
int to;
|
|
|
|
|
} PrincipalVariation;
|
|
|
|
|
|
2025-09-07 15:45:25 +02:00
|
|
|
// Evaluate position in centipawns from the side-to-move perspective.
|
|
|
|
|
int evaluate(const Position *pos);
|
|
|
|
|
|
|
|
|
|
// Negamax alpha-beta returning score in centipawns from side-to-move perspective.
|
2025-11-01 20:11:45 +01:00
|
|
|
int alphabeta(Position pos, int depth, int alpha, int beta, PrincipalVariation *pv);
|
2025-09-07 15:45:25 +02:00
|
|
|
|
2025-11-30 13:42:16 +01:00
|
|
|
#endif // SEARCH_H
|