sayuri-master
所属分类 :棋牌游戏
开发工具 :Unix_Linux
文件大小 :4508KB
下载次数 :1
上传日期 :2016-07-07 08:32:41
上 传 者 :
小虫bug
说明: 强大的国际象棋引擎,c++编程,支持LINUX和MAC,最多支持64线程。 (Powerful chess engine, c++ programming, supports LINUX and MAC, supports up to 64 threads.)
文件列表 :
CMakeLists.txt (3417, 2016-07-01) DocumentsHTML (0, 2016-07-01) DocumentsHTML\basic_functions.html (43659, 2016-07-01) DocumentsHTML\chess_engine_functions.html (29981, 2016-07-01) DocumentsHTML\core_functions.html (38295, 2016-07-01) DocumentsHTML\engine_message_symbol.html (63128, 2016-07-01) DocumentsHTML\index.html (2870, 2016-07-01) DocumentsHTML\res (0, 2016-07-01) DocumentsHTML\res\common.css (12928, 2016-07-01) DocumentsHTML\res\common.js (592, 2016-07-01) DocumentsHTML\res\diagram01.svg (23706, 2016-07-01) DocumentsHTML\res\jquery-2.1.3.min.js (84320, 2016-07-01) DocumentsHTML\res\sayuri_logo.svg (352380, 2016-07-01) DocumentsHTML\sayulisp.html (19530, 2016-07-01) LICENSE (1091, 2016-07-01) SampleGames (0, 2016-07-01) SampleGames\sample_games.pgn (266431, 2016-07-01) SayuriCompiled (0, 2016-07-01) SayuriCompiled\Android (0, 2016-07-01) SayuriCompiled\Android\sayuri-2016.06.29-android.zip (1034789, 2016-07-01) SayuriCompiled\Linux (0, 2016-07-01) SayuriCompiled\Linux\For64Bit (0, 2016-07-01) SayuriCompiled\Linux\For64Bit\sayuri-2016.06.29-linux-64bit.tar.gz (852332, 2016-07-01) SayuriCompiled\Windows (0, 2016-07-01) SayuriCompiled\Windows\For64Bit (0, 2016-07-01) SayuriCompiled\Windows\For64Bit\sayuri-2016.06.29-windows-64bit.zip (1440548, 2016-07-01) SayuriLogo (0, 2016-07-01) SayuriLogo\sayuri_logo_big.png (147376, 2016-07-01) SayuriLogo\sayuri_logo_big.svg (352380, 2016-07-01) SayuriLogo\sayuri_logo_small.png (29217, 2016-07-01) SayuriLogo\sayuri_logo_small.svg (311890, 2016-07-01) SayuriLogo\sayuri_logo_wallpaper.png (388250, 2016-07-01) Tools (0, 2016-07-01) Tools\Benchmark (0, 2016-07-01) Tools\Benchmark\benchmark.scm (5434, 2016-07-01) ... ...
README
======
Sayuri is ...
-------------
* A chess engine for UCI.
* MIT License software.
* Written in C++11 and only use the standard libraries.
* Easy to build with CMake.
* Equipped Lisp interpreter that is named *Sayulisp*.
+ Sayulisp can generate and operate Chess Engine.
+ Sayulisp can customize algorithm of Search Function.
+ Sayulisp can customize values of Evaluation Function.
Files and Directories
---------------------
### Directories ###
* src : Source files.
* SayuriCompiled : Binary files.
+ Linux : Binary files for Linux.
- For***Bit : For *** bit machines.
+ Windows : Binary files for Windows. (Created by Linux's MinGW.)
- For***Bit : For *** bit machines.
+ Android : Binary file for Android.
* SayuriLogo : Logo image files.
* SampleGames : Sample game files of Sayuri vs other chess engines.
* DocumentsHTML : Documents.
* Tools : Convenient tools.
### Files ###
* README.md : README file.
* CMakeLists.txt : A configuration file for CMake.
* LICENSE : The software license.
How To Build with CMake
-----------------------
Using CMake, you can build Sayuri easily.
* CMake options.
+ `-DCMAKE_C_COMPILER=
` : Indicates C compiler.
- Default is "`clang`".
+ `-DCMAKE_CXX_COMPILER=` : Indicates C++ compiler.
- Default is "`clang++`".
+ `-DARCH_OPTION=` : Indicates C++ compiler.
- Default is "`-march=native`".
- If ` ` is "`-m***`", it builts for ***bit machine.
+ `-DCMAKE_INSTALL_PREFIX=` : Indicates prefix of install path.
- Default is "`/usr/local`".
+ `-DBIN_DIR=` : Indicates place where binary file puts on.
- Not includes prefix.
- Default is "`bin`". (If prefix is "`/usr/local`",
the install directory is "`/usr/local/bin`")
### Build for Release ###
1. Change directory to where "CMakeLists.txt" is placed in.
2. Run the following commands.
1. `$ mkdir build`
2. `$ cd build`
3. `$ cmake ..`
- If you want to change a compiler into ``, you should call...
`$ cmake -DCMAKE_CXX_COMPILER= ..`
4. `$ make`
3. *"sayuri"* is built.
4. If you want to install Sayuri, you can use "`make install`" command.
### Build for Debug ###
"for Debug" means *"No Optimize"* and *"Embedded Debug Information"*.
1. Change directory to where "CMakeLists.txt" is placed in.
2. Run the following commands.
1. `$ mkdir build`
2. `$ cd build`
3. `$ cmake -DCMAKE_BUILD_TYPE=Debug ..`
- If you want to change a compiler into ``, you should call...
`$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER= ..`
4. `$ make`
3. *"sayuri"* is built.
How To Build without CMake
--------------------------
If you don't have CMake, you can build "sayuri" by the following commands
in "src" directory.
If you have "clang" :
clang++ -std=c++11 -fno-rtti -Ofast -march=native -pthread -o sayuri *.cpp
If you have "gcc" :
g++ -std=c++11 -fno-rtti -Ofast -march=native -pthread -o sayuri *.cpp
How To Make Distributable Packages
----------------------------------
After building Sayuri with CMake, run "`$ make dist`" command.
The following packages will be created.
* sayuri-xxxx.xx.xx.tar.Z
* sayuri-xxxx.xx.xx.tar.bz2
* sayuri-xxxx.xx.xx.tar.gz
(Note: "xxxx.xx.xx" is the version number.)
Use as Library
--------------
Sayuri's source code can be used as library.
The Library has only one function.
extern "C"
const char* ExecuteSayulisp(const char* code)
Usage
1. Delete `main.cpp`, because it has `main()` function.
2. Include `sayuri.h` with `#include "sayuri.h"`.
3. Call `const char* ExecuteSayulisp(const char* code)`.
+ `code` is Sayulisp.
+ Returns S-Expression.
Example
If you want to call Sayuri from Python on Linux, then...
(Step 1) Delete `main.cpp`, because it has `main()` function.
(Step 2) Build `libsayuri.so` by...
$ -std=c++11 -Ofast -pthread -march=native -fno-rtti \
-shared -fPIC -o libsayuri.so *.cpp
(Step 3) Use from Python.
from ctypes import*
# Load.
lib = cdll.LoadLibrary("/path/to/libsayuri.so")
# Get ready.
sayulisp = lib.ExecuteSayulisp
sayulisp.restype = c_char_p
sayulisp.argtype = (c_cahr_p)
# Go.
print(sayulisp(b"(+ 1 2 3)"))
UCI Options
-----------
* To change size of the hash table. (Default: 1 MB, Max: 8192 MB, Min: 1 MB)
+ `setoption name Hash value `
(Note!!) `` must be 2^n. (e.g. 128, 256, 512, 1024,...)
* To initialize the hash table.
+ `setoption name Clear Hash`
* To enable Ponder. (Default: true)
+ `setoption name Ponder value `
* To change the number of threads. (Default: 1, Max: ***, Min: 1)
+ `setoption name Threads value `
* To enable analyse mode. (Default: false)
+ `setoption name UCI_AnalyseMode value `
近期下载者 :
相关文件 :
收藏者 :