stellar

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

transposition.h (532B)


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