PositionContext -> Position
This commit is contained in:
parent
143dc12e15
commit
df23c9dc5f
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "evaluate.h"
|
#include "evaluate.h"
|
||||||
|
|
||||||
value_t Evaluation::getValue(Game &dummyGame, PositionContext *positionContext, MillGameAi_ab::Node *node)
|
value_t Evaluation::getValue(Game &dummyGame, Position *positionContext, MillGameAi_ab::Node *node)
|
||||||
{
|
{
|
||||||
// 初始评估值为0,对先手有利则增大,对后手有利则减小
|
// 初始评估值为0,对先手有利则增大,对后手有利则减小
|
||||||
value_t value = VALUE_ZERO;
|
value_t value = VALUE_ZERO;
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
|
|
||||||
Evaluation &operator=(const Evaluation &) = delete;
|
Evaluation &operator=(const Evaluation &) = delete;
|
||||||
|
|
||||||
static value_t getValue(Game &dummyGame, PositionContext *positionContext, MillGameAi_ab::Node *node);
|
static value_t getValue(Game &dummyGame, Position *Position, MillGameAi_ab::Node *node);
|
||||||
|
|
||||||
// 评估子力
|
// 评估子力
|
||||||
#ifdef EVALUATE_ENABLE
|
#ifdef EVALUATE_ENABLE
|
||||||
|
|
|
@ -187,7 +187,7 @@ private:
|
||||||
// 演算用的模型
|
// 演算用的模型
|
||||||
Game dummyGame;
|
Game dummyGame;
|
||||||
|
|
||||||
PositionContext *positionContext {};
|
Position *positionContext {};
|
||||||
|
|
||||||
// hash 计算时,各种转换用的模型
|
// hash 计算时,各种转换用的模型
|
||||||
Game dummyGameShift;
|
Game dummyGameShift;
|
||||||
|
@ -215,9 +215,9 @@ private:
|
||||||
|
|
||||||
// 局面数据栈
|
// 局面数据栈
|
||||||
//#ifdef MEMORY_POOL
|
//#ifdef MEMORY_POOL
|
||||||
// StackAlloc<MillGame::PositionContext, MemoryPool<MillGame::PositionContext> > contextStack;
|
// StackAlloc<MillGame::Position, MemoryPool<MillGame::Position> > contextStack;
|
||||||
//#else
|
//#else
|
||||||
stack<PositionContext, vector<PositionContext> > contextStack;
|
stack<Position, vector<Position> > contextStack;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
// 标识,用于跳出剪枝算法,立即返回
|
// 标识,用于跳出剪枝算法,立即返回
|
||||||
|
|
|
@ -35,7 +35,7 @@ using namespace std;
|
||||||
|
|
||||||
// 棋局结构体,算法相关,包含当前棋盘数据
|
// 棋局结构体,算法相关,包含当前棋盘数据
|
||||||
// 单独分离出来供AI判断局面用,生成置换表时使用
|
// 单独分离出来供AI判断局面用,生成置换表时使用
|
||||||
class PositionContext
|
class Position
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Board board;
|
Board board;
|
||||||
|
@ -282,7 +282,7 @@ public:
|
||||||
|
|
||||||
public: /* TODO: move to private */
|
public: /* TODO: move to private */
|
||||||
// 棋局上下文
|
// 棋局上下文
|
||||||
PositionContext context;
|
Position context;
|
||||||
|
|
||||||
// 当前使用的规则
|
// 当前使用的规则
|
||||||
struct Rule currentRule
|
struct Rule currentRule
|
||||||
|
|
Loading…
Reference in New Issue