GLOBIS-AQZ

一个围棋游戏引擎。「A Go game engine. Download here: http://github.com/ymgaq/AQ/releases」

Github星跟蹤圖

GLOBIS-AQZ (AQ)

GLOBIS-AQZ 是一个使用深度学习技术的围棋引擎。

它的特点是既支持日本规则 Komi 6.5,也支持中国规则 Komi 7.5。

该项目利用了 GLOBIS-AQZ 项目的结果。

GLOBIS-AQZ is a joint project developed by GLOBIS Corporation, Mr. Yu Yamaguchi, and Tripleize Co., Ltd., provided by the National Institute of Advanced Industrial Science and Technology (AIST), and cooperated by the Nihon Ki-in. This program uses the result of GLOBIS-AQZ.

由于它是开源软件,任何人都可以免费使用。

本程序是用来玩和分析游戏的,请为其设置 LizzieSabakiGoGui 等 GUI 软件。

Please see here for an explanation in English.

日本語の説明はこちらをご覧ください。

1. 下载

Releases 中下载.

Windows 10 和 Linux(Ubuntu 18.04)上构建的可执行文件。

如果它在其他环境中无法正常运行,请考虑为每个环境构建它(针对开发者)。

2. 动作环境要求

它在以下环境中进行了测试:

  • Ubuntu 18.04 / RTX2080Ti / CUDA10.0 / TensorRT7.0.0
  • Windows 10 Pro (64bit) / RTX2080Ti / CUDA10.2 / TensorRT7.0.0

3. 如何使用

例如,根据日本的规则,如果你在 GTP 模式下开始的时间是20分钟+30秒:

$ AQ.exe --rule=1 --komi=6.5 --main_time=1200 --byoyomi=30

用中国规则(默认),要将出局数(playouts)固定为800,并在没有 "ponder" 的情况下开始:

$ AQ.exe --search_limit=800 --use_ponder=off

用 Tromp-Taylor 规则,时间定在15分钟(这是一个CGOS的设置):

$ AQ.exe --rule=2 --repetition_rule=2 --main_time=900 --byoyomi=0

3-1. 设置环境变量

在 Windows 的情况下,必须在 PATH 环境变量中注册以下路径。

{your_cuda_path}\NVIDIA GPU Computing Toolkit\CUDA\v10.{x}\bin
{your_tensorrt_path}\TensorRT-7.0.0.{xx}\lib

3-2. 生成引擎文件

第一次启动时,它会从 UFF(Universal File Format)格式的文件中生成一个为您的环境优化的网络引擎。

可能需要几分钟的时间来生成这个引擎。

序列化的引擎文件被保存在 engine 文件夹中,所以它将会立即启动第二次。

3-3. 向 Lizzie 注册

对于 Windows,在引擎命令中添加 {your_aq_folder}/AQ.exe --lizzie

例如,如果你想用日本规则分析,请修改 AQ 文件夹中的 config.txt 文件,使用各种设置。

4. 选项

以下是对主要选项的描述。

它可以作为命令行参数指定,也可以通过编辑 config.txt 来改变。

例如,--komi=6.5

4-1. 游戏选项

选项 缺省 描述
--num_gpus 1 要使用的GPU数量。
--num_threads 16 用于搜索的线程数量。
--main_time 0.0 搜索的主要时间(单位:秒)。
--byoyomi 3.0 倒计时时间(单位:秒)。
--rule 0 的游戏规则。 0:中国规则 1:日本规则 2:Tromp-Taylor规则
--komi 7.5 Komi的数量。在日本规定的情况下,请注明6.5。
--batch_size 8 一次评价的批次数。
--search_limit -1 搜索次数(playouts)。-1表示该选项被禁用。
--node_size 65536 搜索的最大节点数。当达到这个节点数时,搜索结束。
--use_ponder on 是否要在对手的回合中提前阅读。 在Lizzie中使用时必须打开它。
--resign_value 0.05 放弃的胜率。
--save_log off 是否保存游戏中的思想记录和sgf文件。

4-2. 启动模式

主要是用来调试的。请不要使用 --lizzie 以外的任何其他游戏进行正常的游戏和分析。

它们只被认可为命令行参数。

选项 启动模式
(未指定) GTP 通信模式
--lizzie 除了 GTP 通讯外,它还能为 Lizzie 输出信息。
--self 开始自我匹配。
--policy_self 它以 policy network 的最大手笔开始自我匹配。
--test 测试板式数据结构的一致性等。
--benchmark 它可以衡量推出和神经网络的计算速度。

5. 汇编方法

以下是对开发者的解释。

源代码只实现了游戏和分析,不包含任何学习功能。

AQ 的编写是为了能用 C++11/C++14 进行编译,编码约定一般参考下面的页面。

5-1. Linux

要求

  • gcc
  • make
  • CUDA Toolkit 10.x
  • TensorRT 7.0.0

在 Makefile 中检查 CUDA 和 TensorRT 的 include 路径和库路径。

$ make

5-2. Windows

要求

  • Visual Studio 2019 (MSVC v142)
  • CUDA Toolkit 10.x
  • TensorRT 7.0.0

额外的 include 目录:

{your_cuda_path}\NVIDIA GPU Computing Toolkit\CUDA\v10.x\include
{your_tensorrt_path}\TensorRT-7.0.0.xx\include

额外的库目录:

{your_cuda_path}\NVIDIA GPU Computing Toolkit\CUDA\v10.x\lib\x64
{your_tensorrt_path}\TensorRT-7.0.0.xx\lib

额外的库文件:

cudart.lib
nvparsers.lib
nvonnxparser.lib
nvinfer.lib

执行上述设置并编译。

6. License

GPLv3
作者: 山口 祐

 

主要指標

概覽
名稱與所有者ymgaq/AQ
主編程語言C++
編程語言C++ (語言數: 3)
平台Linux, Windows
許可證GNU General Public License v3.0
所有者活动
創建於2017-09-17 14:08:15
推送於2020-05-17 05:40:44
最后一次提交2020-05-17 14:40:37
發布數4
最新版本名稱v4.0.0 (發布於 )
第一版名稱v2.0 (發布於 )
用户参与
星數327
關注者數48
派生數70
提交數50
已啟用問題?
問題數115
打開的問題數4
拉請求數1
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

GLOBIS-AQZ

GLOBIS-AQZ is a Go game engine that uses Deep Learning technology.
It features support for both the Japanese rule with Komi 6.5 and the Chinese rule with Komi 7.5.

This program utilizes the results of the GLOBIS-AQZ project.

GLOBIS-AQZ is a joint project developed by GLOBIS Corporation, Mr. Yu Yamaguchi, and Tripleize Co., Ltd., provided by the National Institute of Advanced Industrial Science and Technology (AIST), and cooperated by the Nihon Ki-in. This program uses the result of GLOBIS-AQZ.

Since it is open source software, anyone can use it for free.
This program is for playing and analyzing games, so please set it to GUI software such as Lizzie, Sabaki and GoGui.

日本語の説明はこちらをご覧ください。
请看这里的中文解释.

1. Downloads

Download executable files from Releases.
The executable files built on Windows 10 or Linux (Ubuntu 18.04) are available.

If it does not work as it is in other environments, please consider building it for each environment. (for developers)

2. Requirements

It has been tested in the following environment.

  • Ubuntu 18.04 / RTX2080Ti / CUDA10.0 / TensorRT7.0.0
  • Windows 10 Pro (64bit) / RTX2080Ti / CUDA10.2 / TensorRT7.0.0

3. How to use

For example, if you want to start GTP mode in the case of Japanese rule and with time settings of 20 minutes and 30-seconds byoyomi:

$ AQ.exe --rule=1 --komi=6.5 --main_time=1200 --byoyomi=30

With Chinese rule and Komi 7.5 (default), the number of searches (playouts) is fixed at 800 without ponder:

$ AQ.exe --search_limit=800 --use_ponder=off

With Tromp-Taylor rule and Komi 7.5, 15 minutes sudden death such as games on CGOS:

$ AQ.exe --rule=2 --repetition_rule=2 --main_time=900 --byoyomi=0

3-1. Setting environment variables

In the case of Windows, the following path must be registered in the PATH environment variable.

{your_cuda_path}\NVIDIA GPU Computing Toolkit\CUDA\v10.{x}\bin
{your_tensorrt_path}\TensorRT-7.0.0.{xx}\lib

3-2. Generating engine files

The first time it starts up, it generates a network engine optimized for your environment from a file in UFF (Universal File Format) format.
It may take a few minutes to generate this engine.
The serialized engine files are saved in the engine folder, so it will start immediately the second time around.

3-3. Register with Lizzie

For Windows, add {your_aq_folder}/AQ.exe --lizzie to the engine command.
For example, if you want to analyze by Japanese rules, please modify the config.txt file in the AQ folder to use various settings.

4. Options

Here's a description of the main options.
It can be specified as a command line argument, or it can be changed by editing config.txt.
For example, --komi=6.5.

4-1. Game options

Option default description
--num_gpus 1 The number of GPUs to use.
--num_threads 16 The number of threads to be used for searching.
--main_time 0.0 Main time of search (in seconds).
--byoyomi 3.0 Byoyomi (in seconds).
--rule 0 The rule of the game. 0: Chinese rule 1: Japanese rule 2: Tromp-Taylor rule
--komi 7.5 Number of Komi. In the case of Japanese rule, please specify 6.5.
--batch_size 8 The number of batches for a single evaluation.
--search_limit -1 The number of searches (playouts). -1 means this option is disable.
--node_size 65536 Maximum number of nodes of the search. When this number of nodes is reached, the search is terminated.
--use_ponder on Whether or not to read ahead in the opponent's turn. You must turn it on when using it in Lizzie.
--resign_value 0.05 the winning rate to be given up.
--save_log off Whether or not to save the game's thought logs and sgf files.

4-2. Launch modes

Mainly for debugging. Please do not use any other games other than --lizzie for normal games and analysis.
They are only recognized as a command line argument.

Option Launch mode
(not specified) GTP communication mode
--lizzie In addition to GTP communication, it outputs information for Lizzie.
--self AQ starts a self game.
--policy_self AQ starts a self game with the best move in policy networks.
--test Tests the consistency of the board data structure, etc.
--benchmark Measures the computational speed of rollouts and neural networks.

5. Compilation method

The following is an explanation for developers.
The source code is implemented only for games and analysis, and does not include any learning functions.

AQ is written so that it can be compiled with C++11/C++14, and the coding conventions are generally referred to the following page.

5-1. Linux

Requirements

  • gcc
  • make
  • CUDA Toolkit 10.x
  • TensorRT 7.0.0

Check the include path and library path of CUDA and TensorRT in the Makefile and make it.

$ make

5-2. Windows

Requirements

  • Visual Studio 2019 (MSVC v142)
  • CUDA Toolkit 10.x
  • TensorRT 7.0.0

Additional include directories:

{your_cuda_path}\NVIDIA GPU Computing Toolkit\CUDA\v10.x\include
{your_tensorrt_path}\TensorRT-7.0.0.xx\include

Additional library directories:

{your_cuda_path}\NVIDIA GPU Computing Toolkit\CUDA\v10.x\lib\x64
{your_tensorrt_path}\TensorRT-7.0.0.xx\lib

Additional library files:

cudart.lib
nvparsers.lib
nvonnxparser.lib
nvinfer.lib

Add each of the above and build it.

6. License

GPLv3
Author: Yu Yamaguchi