The Pedigree Project
0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
Engine::minDepth
volatile int minDepth
Definition:
Engine.h:115
Engine::searchComplete
bool searchComplete() volatile
Definition:
Engine.cc:99
Engine::ponder
void ponder(bool b)
Definition:
Engine.cc:82
Engine::state
BoardState state
Definition:
Engine.h:90
BoardState
Definition:
BoardState.h:33
Engine::getMove
Move getMove()
Definition:
Engine.cc:104
Engine::search
SearchAlgorithm * search
Definition:
Engine.h:100
Engine
Definition:
Engine.h:29
Engine::~Engine
~Engine()
Definition:
Engine.cc:46
Engine::stopSearch
void stopSearch()
Definition:
Engine.cc:94
Engine::side
volatile Side side
Definition:
Engine.h:110
Engine::startSearch
void startSearch(Side s, int minD, int maxD)
Definition:
Engine.cc:86
Move
Definition:
Move.h:29
Engine::doSearch
volatile bool doSearch
Definition:
Engine.h:105
SearchAlgorithm
Definition:
SearchAlgorithm.h:34
Engine::threadTramp
static void * threadTramp(void *ptr)
Definition:
Engine.cc:127
Engine::moveList
MoveList moveList
Definition:
Engine.h:120
Engine::move
void move(Move m)
Definition:
Engine.cc:109
Engine::printMoveList
void printMoveList()
Definition:
Engine.cc:113
Engine::run
void run()
Definition:
Engine.cc:50
Engine::Engine
Engine()
Definition:
Engine.cc:32
Generated on Fri Jan 24 2020 06:46:13 for The Pedigree Project by
1.8.11