Fix up the engine
Diffstat:
3 files changed, 10 insertions(+), 9 deletions(-)
@@ -3,7 +3,7 @@
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project(
Stellar
VERSION 0.0.7
VERSION 0.0.8
DESCRIPTION "Chess engine written in C"
HOMEPAGE_URL https://git.dimitrijedobrota.com/stellar.git
LANGUAGES C
@@ -38,9 +38,9 @@
int move_score(Stats_T stats, Move move) {
return Score_capture(piece_piece(move_piece(move)),
piece_piece(move_piece_capture(move)));
} else {
if (!move_cmp(stats->killer_moves[0][stats->ply], move))
if (move_cmp(stats->killer_moves[0][stats->ply], move))
return 9000;
else if (!move_cmp(stats->killer_moves[1][stats->ply], move))
else if (move_cmp(stats->killer_moves[1][stats->ply], move))
return 8000;
else
return stats->history_moves[piece_index(move_piece(move))]
@@ -366,7 +366,7 @@
Board Instruction_parse(Instruction_T self, Board board) {
if (strcmp(token, "go") == 0) {
token = Instruction_token_next(self);
int depth = 5;
int depth = 6;
if (token && strcmp(token, "depth") == 0) {
token = Instruction_token_next(self);
depth = atoi(token);
@@ -1,6 +1,7 @@
#ifndef STELLAR_MOVES_H
#define STELLAR_MOVES_H
#include <stdbool.h>
#include <stdint.h>
#include "board.h"
@@ -12,11 +13,11 @@
struct Move {
unsigned piece : 5;
unsigned piece_capture : 5;
unsigned piece_promote : 5;
unsigned dbl : 1;
unsigned enpassant : 1;
unsigned castle : 1;
unsigned capture : 1;
unsigned promote : 1;
bool dbl : 1;
bool enpassant : 1;
bool castle : 1;
bool capture : 1;
bool promote : 1;
};
typedef struct MoveList *MoveList;