BTW, I tried (good old) Fruit, seem to work also. It's just that the NPS of FRED (FR)uit by (ED) is about 3 times slower. Perhaps something more need to be done. But you can try.
Code: Select all
// eval()
#define REBEL 1
#if REBEL
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include "source/defines.c"
#include "source/tables.c"
#include "source/pst.c"
#include "source/vars.c"
#include "source/attack.c"
#include "source/eval1.c"
#include "source/eval2.c"
#include "source/init.c"
#include "source/quadrant.c"
#endif
int eval(const board_t * board) {
#if REBEL
int fruit_square[] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, A1, B1, C1, D1, E1, F1, G1, H1, -1, -1, -1, -1,
-1, -1, -1, -1, A2, B2, C2, D2, E2, F2, G2, H2, -1, -1, -1, -1,
-1, -1, -1, -1, A3, B3, C3, D3, E3, F3, G3, H3, -1, -1, -1, -1,
-1, -1, -1, -1, A4, B4, C4, D4, E4, F4, G4, H4, -1, -1, -1, -1,
-1, -1, -1, -1, A5, B5, C5, D5, E5, F5, G5, H5, -1, -1, -1, -1,
-1, -1, -1, -1, A6, B6, C6, D6, E6, F6, G6, H6, -1, -1, -1, -1,
-1, -1, -1, -1, A7, B7, C7, D7, E7, F7, G7, H7, -1, -1, -1, -1,
-1, -1, -1, -1, A8, B8, C8, D8, E8, F8, G8, H8, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
int fruit_piece[] = {
LL, -1, -1, -1, -1, WP, -1, -1, -1, -1, ZP, -1, -1, -1, -1, -1,
-1, WN, ZN, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, WL, ZL, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, WT, ZT, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, WD, ZD, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, WK, ZK, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
int x,y,z,s,p;
kleur=0; // convert color to move
if (COLOUR_IS_BLACK(board->turn)) kleur=1;
for (x=0x44; x<=0xbb; x++)
{ s=fruit_square[x]; // convert square to REBEL format
if (s<0) continue; // out of board
y=board->square[x];
p=fruit_piece[y]; // convert piece_type to REBEL format
bord[s]=p; }
init();
evaluation();
return (mp*100)/256;
#endif
and with the #define REBEL you switch eval's.