sunfish

所属分类:棋牌游戏
开发工具:Python
文件大小:689KB
下载次数:9
上传日期:2016-03-18 14:44:37
上 传 者990722
说明:  国际象棋 python 程序 110行 非常精简的程序
(chess program 110 lines python)

文件列表:
__pycache__\sunfish.cpython-34.pyc (12012, 2016-03-14)
__pycache__\xboard.cpython-34.pyc (5277, 2016-03-14)
logo\sunfish_large.png (244182, 2016-03-14)
logo\sunfish_small.bmp (33938, 2016-03-14)
tests1\bratko_kopec_test.epd (1890, 2016-03-14)
tests1\ccr_one_hour_test.epd (2190, 2016-03-14)
tests1\mate1.fen (389, 2016-03-14)
tests1\mate2.fen (11730, 2016-03-14)
tests1\mate3.fen (672, 2016-03-14)
tests1\mate4.epd (2376, 2016-03-14)
tests1\nullmove_mates.fen (40, 2016-03-14)
tests1\queen.fen (6371, 2016-03-14)
tests1\stalemate2.fen (4469, 2016-03-14)
1.txt (19986, 2016-03-14)
c.bat (3, 2016-03-18)
LICENSE.md (35775, 2016-03-14)
... ...

Sunfish ======= Sunfish is a simple, but strong chess engine, written in Python, mostly for teaching purposes. Without tables and its simple interface, it takes up just 111 lines of code! The clarity of the Sunfish code provides a great platform for experimenting, be it with evaluation functions, search extensions or anything. Fork it today and see what you can do! Screenshot ========== My move: g8f6 8 · 7 6 · · · · · · · 5 · · · · · · · · 4 · · · · · · · 3 · · · · · · · · 2 · 1 a b c d e f g h Your move: Run it! ======= Sunfish is self contained in the `sunfish.py` file from the repository. I recommend running it with `pypy` for optimal performance. It is also possible to run Sunfish as an [XBoard](http://www.gnu.org/software/xboard/)/CECP engine in [PyChess](http://pychess.org), [Arena](http://www.playwitharena.com) or your chess interface of choice. Just add the command `pypy -u xboard.py`. Ruxy Sylwyka has [a note on making it all work on Windows](http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=560462). ![Arena Screenshot](http://s29.postimg.org/89gnk99d3/Clipboard01.png) Features =========== 1. Built around the simple, but deadly efficient MTD-bi search algorithm. 2. Filled with classic as well as modern 'chess engine tricks' for simpler and faster code. 3. Easily adaptive evaluation function through Piece Square Tables. 4. Uses standard Python collections and data structures for clarity and efficiency. Limitations =========== Sunfish supports castling, en passant, and promotion. It doesn't however do minor promotion or draws of any kind. All input must be done in simple 'two coordinate' notation, as shown in the screenshot. On the technical side there are a lot of features that could be interesting to add to Sunfish. For performance, the most important might be a piecelist to save the enumeration of all board squares at every move generation. Other performance optimizations could include dedicated check detection, zobrist hashing and a mutable board representation - perhaps based on bitboards. The evaluation in Sunfish is not very sophisticated. E.g. we don't distinguish between midgame and endgame. Not much selective deepening is done, no threat detection and the like. Finally Sunfish might benefit from a more advanced move ordering, including such things as killer move and SEE. Why Sunfish? ============ The name Sunfish actually refers to the [Pygmy Sunfish](http://en.wikipedia.org/wiki/Pygmy_sunfish), which is among the very few fish to start with the letters 'Py'. The use of a fish is in the spirit of great engines such as Stockfish, Zappa and Rybka. In terms of Heritage, Sunfish borrows much more from [Micro-Max by Geert Muller](http://home.hccnet.nl/h.g.muller/max-src2.html) and [PyChess](http://pychess.org). ![Sunfish logo](https://raw.github.com/thomasahle/sunfish/master/logo/sunfish_large.png)

近期下载者

相关文件


收藏者