stellar

Stellar - Chess engine written in C
Log | Files | Refs

transposition.h (577B)


      1 #ifndef STELLAR_TRANSPOSITION_H
      2 #define STELLAR_TRANSPOSITION_H
      3 
      4 #include "moves.h"
      5 #include "stats.h"
      6 #include "utils.h"
      7 
      8 #define TTABLE_UNKNOWN 100000
      9 
     10 #define T TTable
     11 
     12 typedef enum HasheFlag HasheFlag;
     13 enum HasheFlag {
     14     flagExact,
     15     flagAlpha,
     16     flagBeta
     17 };
     18 
     19 typedef struct T T;
     20 
     21 T *ttable_new(U64 size);
     22 void ttable_free(T **self);
     23 void ttable_clear(T *self);
     24 
     25 int ttable_read(const Stats *stats, Move *best, int alpha, int beta, int depth);
     26 void ttable_write(const Stats *stats, Move best, int score, int depth,
     27                   HasheFlag flag);
     28 
     29 #undef T
     30 #endif