PositionContext -> Position

This commit is contained in:
CalciteM Team 2019-09-15 18:13:57 +08:00
parent 143dc12e15
commit df23c9dc5f
4 changed files with 7 additions and 7 deletions

View File

@ -21,7 +21,7 @@
#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对先手有利则增大对后手有利则减小
value_t value = VALUE_ZERO;

View File

@ -34,7 +34,7 @@ public:
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

View File

@ -187,7 +187,7 @@ private:
// 演算用的模型
Game dummyGame;
PositionContext *positionContext {};
Position *positionContext {};
// hash 计算时,各种转换用的模型
Game dummyGameShift;
@ -215,9 +215,9 @@ private:
// 局面数据栈
//#ifdef MEMORY_POOL
// StackAlloc<MillGame::PositionContext, MemoryPool<MillGame::PositionContext> > contextStack;
// StackAlloc<MillGame::Position, MemoryPool<MillGame::Position> > contextStack;
//#else
stack<PositionContext, vector<PositionContext> > contextStack;
stack<Position, vector<Position> > contextStack;
//#endif
// 标识,用于跳出剪枝算法,立即返回

View File

@ -35,7 +35,7 @@ using namespace std;
// 棋局结构体,算法相关,包含当前棋盘数据
// 单独分离出来供AI判断局面用生成置换表时使用
class PositionContext
class Position
{
public:
Board board;
@ -282,7 +282,7 @@ public:
public: /* TODO: move to private */
// 棋局上下文
PositionContext context;
Position context;
// 当前使用的规则
struct Rule currentRule