資源簡介
包括中國象棋機器博弈引擎源代碼和可執行文件,一份實驗報告。需要用兵河五四象棋軟件加載引擎。
所開發的中國象棋引擎遵循UCCI協議,引擎跟界面之間通過“標準輸入”和“標準輸出”(即C/C++語言中的stdin和stdout)通道來通訊。
棋力較強,能夠不完成搜索八層。

代碼片段和文件信息
////////////////////////////////////////////////////////////////////////////////////////////////////////////
//?源文件:Evaluation.cpp?????????????????????????????????????????????????????????????????????????????????//
//?*******************************************************************************************************//
//?中國象棋通用引擎----簡單測試引擎示例,支持《中國象棋通用引擎協議》(Universal?Chinese?Chess?Protocol,簡稱ucci)?//
//?作者:?????????????????????????????????????????????????????????????????????????????????????????//
//?*******************************************************************************************************//
//?功能:?????????????????????????????????????????????????????????????????????????????????????????????????//
//?1.?先手分=4????????????????????????????????????????????????????????????????????????????????????????????//
//?2.?棋子價值????????????????????????????????????????????????????????????????????????????????????????????//
//?3.?位置分??????????????????????????????????????????????????????????????????????????????????????????????//
//?4.?????????????????????????????????????????????????????????????????????????????????????????????????????//
//?5.?????????????????????????????????????????????????????????????????????????????????????????????????????//
////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include?“Evaluation.h“
#include?“PreMove.h“
#include?“MoveGen.h“
//***********************************************************************************************************************************
//?全局變量
//***********************************************************************************************************************************
int?Evalue[2]; //?雙方估值:0=黑方?1=紅方
int?PositionValue[14][256]; //?局面估值
//?棋子的基本價值
//?將、車、炮、馬、象、士、兵?(0-6為黑子,7-13為紅子)
const?int?BasicValues[14]?=?{1000?200?96?88?40?40?9?1000?200?96?88?40?40?9};
//?先手分,大約為半個兵的價值。能夠消除奇偶層估值擺動的問題。
const?int?nOffensiveValue?=?4;
//?棋子位置的靜態估值:以紅子為基準
static?const?int?PosValues[7][256]?=?{
{?//?將
0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
????????0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
????????0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
????????0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
????????0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
????????0??0??0??0??0??0??0??0??0??0??0??0??0??0??0??0
????????0??0??0??0??0??0?-7?-9?-7??0??0??0??0??0??0??0
0??0??0??0??0??0?-6?-8?-6??0??0??0??0??0??0??0
0??0??0??0??0??0??1??5??1??0??0??0??0??0??0??0
????????0??0??
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????140288??2012-11-18?23:16??人工智能\vs2008可執行文件\chessEngine.exe
?????文件????1666546??2012-11-17?16:49??人工智能\vs2008可執行文件\OpenBook.txt
?????文件?????138240??2012-11-18?23:47??人工智能\vs2010可執行文件\chessEngine.exe
?????文件????1666546??2012-11-17?16:49??人工智能\vs2010可執行文件\OpenBook.txt
?????文件??????45056??2013-08-08?09:41??人工智能\中國象棋引擎.doc
?????文件?????317620??2012-10-27?21:58??人工智能\中國象棋通用引擎協議UCCI3.0.pdf
?????文件????7101824??2012-10-27?21:59??人工智能\兵河五四.rar
?????文件????1666548??2005-04-29?19:35??人工智能\源代碼\chessEngine\chessEngine\BOOK.DAT
?????文件???????4924??2012-11-17?15:37??人工智能\源代碼\chessEngine\chessEngine\chessEngine.vcproj
?????文件???????1411??2012-11-18?23:19??人工智能\源代碼\chessEngine\chessEngine\chessEngine.vcproj.DADI-PC.Administrator.user
?????文件???????1409??2013-08-08?09:43??人工智能\源代碼\chessEngine\chessEngine\chessEngine.vcproj.HDP-PC.HDP.user
?????文件????1666548??2005-04-29?19:35??人工智能\源代碼\chessEngine\chessEngine\Debug\BOOK.DAT
?????文件??????37190??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\BuildLog.htm
?????文件????????923??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\chessEngine.exe.em
?????文件????????988??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\chessEngine.exe.em
?????文件????????864??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\chessEngine.exe.intermediate.manifest
?????文件??????15083??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\Evaluation.obj
?????文件??????13930??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\FenBoard.obj
?????文件??????25994??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\HashTable.obj
?????文件??????35548??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\main.obj
?????文件??????52966??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\MoveGen.obj
?????文件?????????65??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\mt.dep
?????文件??????23967??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\PreMove.obj
?????文件??????78663??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\Search.obj
?????文件??????49046??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\ucci.obj
?????文件?????388096??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\vc90.idb
?????文件?????126976??2012-11-18?23:16??人工智能\源代碼\chessEngine\chessEngine\Debug\vc90.pdb
?????文件??????16042??2013-08-08?09:43??人工智能\源代碼\chessEngine\chessEngine\Evaluation.cpp
?????文件??????????0??2005-10-17?18:11??人工智能\源代碼\chessEngine\chessEngine\Evaluation.cpp.h
?????文件???????3315??2013-08-08?09:43??人工智能\源代碼\chessEngine\chessEngine\Evaluation.h
............此處省略34個文件信息
- 上一篇:MFC簡易畫板
- 下一篇:C語言 tcp數據包重組
評論
共有 條評論