?? historyheuristic.h
字號:
// HistoryHeuristic.h: interface for the CHistoryHeuristic class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_HISTORYHEURISTIC_H__BE5BC30B_D7AF_44CD_9A3D_CD9E0AFEE37B__INCLUDED_)
#define AFX_HISTORYHEURISTIC_H__BE5BC30B_D7AF_44CD_9A3D_CD9E0AFEE37B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Define.h"
//歷史啟發類
class CHistoryHeuristic
{
public:
CHistoryHeuristic();
virtual ~CHistoryHeuristic();
public:
void MergeSort(CHESSMOVE* source, int n,BOOL direction);//對當前走法隊列進行歸并排序
void EnterHistoryScore(CHESSMOVE *move,int depth); //將某一最佳走法匯入歷史記錄表
int GetHistoryScore(CHESSMOVE *move); //取某一走法的歷史得分
void ResetHistoryTable(); //將歷史記錄表清空
protected:
void Merge_A(CHESSMOVE* source,CHESSMOVE* target,int l,int m, int r);//從小到大排序,MergePass調用
void MergePass(CHESSMOVE* source, CHESSMOVE* target,const int s, const int n, const BOOL direction);
//用于合并排序好的相鄰數據段,MergeSort調用
void Merge(CHESSMOVE* source,CHESSMOVE* target,int l,int m, int r); //從小到大排序,MergePass調用
protected:
int m_HistoryTable[90][90]; //歷史得分表
CHESSMOVE m_TargetBuff[100];//排序用的緩沖隊列
};
#endif // !defined(AFX_HISTORYHEURISTIC_H__BE5BC30B_D7AF_44CD_9A3D_CD9E0AFEE37B__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -