Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
osl
game_playing
computerPlayer.h
Go to the documentation of this file.
1
/* computerPlayer.h
2
*/
3
#ifndef GAME_PLAYING_COMPUTERPLAYER_H
4
#define GAME_PLAYING_COMPUTERPLAYER_H
5
6
#include "
osl/search/moveWithComment.h
"
7
#include "
osl/state/numEffectState.h
"
8
#include "
osl/move.h
"
9
#include "
osl/misc/carray.h
"
10
#include <boost/scoped_ptr.hpp>
11
namespace
osl
12
{
13
namespace
container
14
{
15
class
MoveVector;
16
}
17
namespace
search
18
{
19
struct
TimeAssigned;
20
}
21
namespace
game_playing
22
{
23
class
GameState;
24
class
ComputerPlayer
25
{
26
protected
:
27
bool
speculative_search_allowed
;
28
public
:
29
ComputerPlayer
() :
speculative_search_allowed
(false)
30
{
31
}
32
virtual
~ComputerPlayer
();
34
virtual
ComputerPlayer
*
clone
()
const
= 0;
35
36
virtual
void
pushMove
(
Move
m)=0;
37
virtual
void
popMove
()=0;
39
virtual
bool
isReasonableMove
(
const
GameState
&,
40
Move
move,
int
pawn_sacrifice);
44
virtual
const
MoveWithComment
selectBestMove
(
const
GameState
&,
int
seconds,
int
elapsed,
45
int
byoyomi)=0;
46
47
virtual
void
setInitialState
(
const
NumEffectState&);
51
virtual
void
allowSpeculativeSearch
(
bool
value);
53
virtual
bool
stopSearchNow
();
54
55
virtual
void
setRootIgnoreMoves
(
const
container::MoveVector
*rim,
bool
prediction);
56
};
57
58
class
ComputerPlayerSelectBestMoveInTime
59
{
60
public
:
61
virtual
~ComputerPlayerSelectBestMoveInTime
();
62
virtual
const
MoveWithComment
selectBestMoveInTime
(
const
GameState
&,
const
search::TimeAssigned
&)=0;
63
};
67
class
ResignPlayer
:
public
ComputerPlayer
68
{
69
public
:
70
~ResignPlayer
();
71
ComputerPlayer
*
clone
()
const
72
{
73
return
new
ResignPlayer
();
74
}
75
void
pushMove
(
Move
m);
76
void
popMove
();
77
const
MoveWithComment
selectBestMove
(
const
GameState
&,
int
,
int
,
int
);
78
};
79
83
class
RandomPlayer
:
public
ComputerPlayer
84
{
85
public
:
86
ComputerPlayer
*
clone
()
const
87
{
88
return
new
RandomPlayer
();
89
}
90
~RandomPlayer
();
91
void
pushMove
(
Move
m);
92
void
popMove
();
93
const
MoveWithComment
selectBestMove
(
const
GameState
&,
int
,
int
,
int
);
94
};
95
96
}
// namespace game_playing
97
}
// namespace osl
98
99
#endif
/* GAME_PLAYING_COMPUTERPLAYER_H */
100
// ;;; Local Variables:
101
// ;;; mode:c++
102
// ;;; c-basic-offset:2
103
// ;;; End:
Generated on Sun Jul 21 2013 13:37:23 by
1.8.4