The Pedigree Project
0.1
src
user
applications
chess
Engine.h
1
/*
2
*
3
* Copyright (c) 2008-2014, Pedigree Developers
4
*
5
* Please see the CONTRIB file in the root of the source tree for a full
6
* list of contributors.
7
*
8
* Permission to use, copy, modify, and distribute this software for any
9
* purpose with or without fee is hereby granted, provided that the above
10
* copyright notice and this permission notice appear in all copies.
11
*
12
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
*/
20
21
#ifndef ENGINE_H
22
#define ENGINE_H
23
24
#include <pthread.h>
25
#include "Move.h"
26
#include "BoardState.h"
27
#include "SearchAlgorithm.h"
28
29
class
Engine
30
{
31
public
:
35
Engine
();
36
40
~Engine
();
41
45
void
run
();
46
50
void
ponder
(
bool
b);
51
55
void
startSearch
(Side s,
int
minD,
int
maxD);
56
60
void
stopSearch
();
61
65
bool
searchComplete
()
volatile
;
66
70
Move
getMove
();
71
75
void
move
(
Move
m);
76
80
void
printMoveList
();
81
85
static
void
*
threadTramp
(
void
*ptr);
86
90
BoardState
state
;
91
private
:
95
//OpeningBook book;
96
100
SearchAlgorithm
*
search
;
101
105
volatile
bool
doSearch
;
106
110
volatile
Side
side
;
111
115
volatile
int
minDepth
, maxDepth;
116
120
MoveList
moveList
;
121
long
heuristic;
122
123
};
124
125
#endif
BoardState
Definition
BoardState.h:34
Engine
Definition
Engine.h:30
Engine::search
SearchAlgorithm * search
Definition
Engine.h:100
Engine::run
void run()
Definition
Engine.cc:50
Engine::side
volatile Side side
Definition
Engine.h:110
Engine::threadTramp
static void * threadTramp(void *ptr)
Definition
Engine.cc:127
Engine::searchComplete
bool searchComplete() volatile
Definition
Engine.cc:99
Engine::doSearch
volatile bool doSearch
Definition
Engine.h:105
Engine::minDepth
volatile int minDepth
Definition
Engine.h:115
Engine::Engine
Engine()
Definition
Engine.cc:32
Engine::~Engine
~Engine()
Definition
Engine.cc:46
Engine::move
void move(Move m)
Definition
Engine.cc:109
Engine::ponder
void ponder(bool b)
Definition
Engine.cc:82
Engine::state
BoardState state
Definition
Engine.h:90
Engine::getMove
Move getMove()
Definition
Engine.cc:104
Engine::printMoveList
void printMoveList()
Definition
Engine.cc:113
Engine::startSearch
void startSearch(Side s, int minD, int maxD)
Definition
Engine.cc:86
Engine::moveList
MoveList moveList
Definition
Engine.h:120
Engine::stopSearch
void stopSearch()
Definition
Engine.cc:94
Move
Definition
Move.h:30
SearchAlgorithm
Definition
SearchAlgorithm.h:35
Generated on Tue Sep 22 2026 06:05:50 for The Pedigree Project by
1.9.8