stellar

UCI Chess engine written in C++20
git clone git://git.dimitrijedobrota.com/stellar.git
Log | Files | Refs | README | LICENSE

commit 64d04dd24113fa32bcca79e79ed14c55b148c640
parent 2ec2544c4e36610a55075faf8d495c6dab7cc752
author Dimitrije Dobrota <mail@dimitrijedobrota.com>
date Mon, 31 Jul 2023 17:59:54 +0200

Fix up the engine

Diffstat:
M CMakeLists.txt | + -
M src/engine/engine.c | +++ ---
M src/include/moves.h | ++++++ -----

3 files changed, 10 insertions(+), 9 deletions(-)


diff --git a/ CMakeLists.txt b/ CMakeLists.txt

@@ -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

diff --git a/ src/engine/engine.c b/ src/engine/engine.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);

diff --git a/ src/include/moves.h b/ src/include/moves.h

@@ -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;