别琢磨画棋子了。我们是程序员,又不是美工。真想画不如学Photoshop.
https://files.cnblogs.com/files/blogs/714801/chess-pic.zip 有些互联网公司真是小家子气啊。
附带源程序的: ElephantEye 3.15; 象棋演播室1.63(董世伟); 梦入神蛋0.2(浅红引擎, 魏泽人)
ElephantEye是个象棋引擎。它是个Windows console程序,可在命令行输入描述局面的UCCI命令,输出下一步的走法等。
它与棋盘软件(象棋巫师、Winboard等)组合使用。象棋巫师还带有别的引擎。UCCI是个标准协议。
在遵循《GNU宽松通用公共许可协议》的前提下,您可以自由使用ElephantEye及其源程序。
二、引擎协议 ElephantEye支持UCCI 3.0。
(1) 支持的UCCI命令有:
ucci
setoption ...
position {fen <fen_str> | startpos} [moves <move_list>]
banmoves <move_list>
go [ponder | draw] ...
ponderhit [draw] | stop
probe {fen <fen_str> | startpos} [moves <move_list>]
quit
(2) 可以返回的UCCI信息有:
id {name <engine_name> | version <version_name> | copyright <copyright_info> | author <author_name> | user <user_name>}
option ...
ucciok
info ...
{nobestmove | bestmove <best_move> [ponder <ponder_move>] [draw | resign]}
pophash [bestmove <best_move>] [lowerbound depth ] [upperbound depth ]
bye
三、参数设置
(1) 开局库:默认的开局库为ELEEYE.EXE当前目录下的 BOOK.DAT,含有10,000个对称局面的着法。
(2) 思考时间:限定思考深度通常不是很好的选择,建议给定限时让程序自动分配时间。而在解杀局或分析局面时,
则可让程序无限制思考,并可随时中止思考。
(3) 置换表大小:尽管置换表大小对程序的运行速度影响不大,默认16MB的设置已经足够,但 ElephantEye还是提
供了设置置换表大小的功能。在内存允许的情况下,下慢棋时可以适当增加置换表的大小,但建议不要超过物理内存的一半。
(3) 裁剪程度:为加快程序的运算速度,ElephantEye 默认使用空着裁剪,并且产生负面影响的可能性很小。只有最低级别
会禁用空着裁剪。
(4) 知识量:知识量和局面评价的准确性有关,在ElephantEye的知识量等级中,只有最低级别是不采用局面评价函数的
(只考虑子力价值),在解排局等不需要依靠审局知识来分析的局面时,可以尝试用这种设置。
(5) 随机性:ElephantEye 设有4级随机性。随机性越大,程序越有可能走出它认为不是最好的着法,但“不是最好的着法”并非
一点好处也没有,尤其在没有启用开局库时,适当增大随机性,可以避免程序在相同的局面下走出一样的着法。
四、规则
ElephantEye除了支持“单方面长将判负”的规则外,还支持“长打判负”,“打”包括“将”和“捉”。由于程序复杂性方面的限制,
只有以下三种情况被识别成“捉”:A. 马捉车或有根的炮兵(卒);B. 车捉有根的马炮兵(卒);C. 炮捉车或有根的马兵(卒)。
尽管ElephantEye在复杂的情况可能无法正确识别长打,但由于支持UCCI命令 banmoves ... ,一旦用户认为引擎走了“长打”
的禁着,可以用<象棋巫师>的“设置禁着”功能让引擎强制变着。
五、博弈算法
ElephantEye 属于偏向蛮力的象棋程序,使用了严谨而有效的博弈算法:
(1) 使用位行和位列的着法生成器:
(2) 静态局面搜索:
(3) 循环着法和长将检测:
(4) 置换表:
(5) 带检验的空着裁剪:
(6) 迭代加深/吃子着法/杀手着法/历史表启发:
(7) 将军/唯一应将延伸:
(8) Alpha-Beta主要变例搜索:
(9) 开局库:
(10) 后台思考和时间分配策略:
八、源程序
ElephantEye 的源程序包括9个模块,内容大致为:
(1) ucci.h/ucci.cpp UCCI命令解释模块
(2) pregen.h/pregen.cpp Zobrist数组和着法预置表的生成模块。
(3) position.h/position.cpp 主要描述着法和局面的数据结构及功能。
(4) genmoves.cpp 着法生成器。
(5) hash.h/hash.cpp 置换表、历史表和着法列表管理模块。
(6) book.h/book.cpp 开局库读取模块。
(7) movesort.h/movesort.cpp 着法列表排序模块。
(8) search.h/search.cpp 搜索模块。
(9) eleeye.cpp 主程序。
(10) preeval.h/preeval.cpp 子力位置数组预生成器。
(11) evaluate.cpp 局面评价函数。
九、程序表现
ElephantEye的设计重点在搜索算法,但在知识上比较欠缺。在2.8GHz的处理器上每秒可搜索约100万个结点(包括常规搜索和静态搜索),
一般的中局局面在1分钟内可搜索约11层。
在棋力上,ElephantEye和“棋隐”、SaoLa (象棋挑战者)等程序具有同等水平,但由于局面评估函数上的缺陷,ElephantEye 距离顶尖的
商业象棋软件(谢谢大师、象棋世家、象棋奇兵、棋天大圣等)尚有一定的差距。
ElephantEye 在联众、弈天等象棋对弈网站上作过测试,用等级分来衡量,联众网的战绩在2500分左右,弈天网快棋的战绩在2000分左右,
慢棋在1500分左右。
2005年9月在台湾象棋软件爱好者施金山先生的帮助下,ElephantEye 参加了在台北举行的第10届ICGA电脑奥林匹克大赛中国象棋组比赛,
战绩是7胜5和14负,在14个程序中排名第11;2006年8月ElephantEye 参加了在北京举行的全国首届计算机博弈锦标赛,战绩是7胜2和11负,
在18个程序中排名第7。
以上摘自https://github.com/xqbase/eleeye
浏览器里的中国象棋: HTML5 canvas, JS, python - Fun_with_Words - 博客园 (cnblogs.com)
象棋旋风官方网站--中国象棋第一AI智能引擎 (ccyclone.com) 这个棋力好像比较强。旋风专业版.zip (41.45 MB)
象棋旋风作者陈朝营老师日记_秋叶妹妹的博客_新浪博客 (sina.com.cn)
The goal of GNU Chess is to serve as a basis for research. As of 2 September 2017 GNU Chess 5.60 is rated at 2813 Elo points (when using one CPU) on CCRL's 40-moves-in-40-minutes list. For comparison, the strongest chess engine in the list using one CPU, Strelka 5.5, has an Elo rating of 3108 (the 295 ELO point difference indicates that Strelka 5.5 would beat GNU Chess 5.60 in about 85% of games). On the same list, Fritz 8 is rated at only 2701, and that program in the 2004 Man vs Machine World Team Championship beat grandmasters Sergey Karjakin, Veselin Topalov and reached a draw with Ruslan Ponomariov. The IQ6 test suite (a collection of chess problems from Livshits's book Test Your Chess IQ) indicates that on a single core of an Intel Core 2 Duo CPU GNU Chess performs at the senior master/weak international master strength of 2500+ on the Elo rating system.
Stockfish棋力更强,也是开源的,代码更长,更现代。
Winboard和Linux下的XBoard,除了能"下"国际象棋外,也能"下"中国象棋。The first version of GNU Chess was written by Stuart Cracraft back in 1984. Versions from 2 to 4 were written by John Stanback. Version 5 was written by Chua Kong-Sian. Version 6 was written by Fabien Letouzey. Chua Kong Sian (Kong Sian) is a Singaporean computer scientist affiliated with the National University of Singapore and its former National Supercomputing Research Centre Singapore. As computer chess programmer, Chua Kong Sian is author of Cobalt, primary author of GNU Chess Version 5, and author of the C++ UCI bitboard-based engine Melee Chess.

浙公网安备 33010602011771号