TadaoYamaokaの開発日記

個人開発しているスマホアプリや将棋AIの開発ネタを中心に書いていきます。

dlshogiとGCTの比較

第2回世界将棋AI電竜戦の大会後に、優勝したGCT電竜と準優勝したdlshogiで互角局面集を使用して勝率を測定した。

dlshogi互角局面集 5分2秒加算

dlshogi互角局面集を使用して、5分2秒加算で対局した結果は以下の通り。
dlshogiとGCTは、2GPU、GPUあたり3スレッド。水匠4改は30スレッド。

   # PLAYER             :  RATING  ERROR  POINTS  PLAYED   (%)  CFS(%)    W    D    L  D(%)
   1 dlshogi            :   116.3   15.5   720.0     991    73     100  666  108  217    11
   2 suisho4kai-30th    :   -24.5   14.4   447.0     988    45     100  377  140  471    14
   3 gct                :   -91.8   14.8   318.0     991    32     ---  266  104  621    10

White advantage = 38.78 +/- 9.28
Draw rate (equal opponents) = 13.16 % +/- 0.89

互角局面集では、dlshogiの方がR+208.1だけ強い。

dlshogi互角局面集 5分2秒加算 スレッド数調整

大会では、dlshogiはGPUあたり4スレッド、GCTは5スレッドだったので、大会の条件に合わせた。
これは、NPSが最大となるようにモデルサイズに合わせたスレッド数になっている。
dlshogiとGCTは、GPUは4GPU。水匠4改は64スレッド。

   # PLAYER             :  RATING  ERROR  POINTS  PLAYED   (%)  CFS(%)    W    D    L  D(%)
   1 dlshogi_th4        :    86.1   22.6   261.5     387    68     100  237   49  101    13
   2 suisho4kai-64th    :   -21.4   22.1   174.5     383    46      99  146   57  180    15
   3 gct_th5            :   -64.7   22.3   141.0     384    37     ---  116   50  218    13

White advantage = 8.48 +/- 14.35
Draw rate (equal opponents) = 14.30 % +/- 1.46

GPU数を4にして、スレッド数を大会と合わせると、差が小さくなり、dlshogiがR+150.8になった。

dlshogi互角局面集 10分2秒加算

大会と同じ持ち時間で測定した。
dlshogiとGCTは、GPUは4GPU(GPUあたりのスレッド数はそれぞれ4と5)。水匠5は64スレッド。

   # PLAYER          :  RATING  ERROR  POINTS  PLAYED   (%)  CFS(%)    W    D    L  D(%)
   1 dlshogi_th4     :    72.9   29.7   144.0     222    65     100  129   30   63    14
   2 suisho5-64th    :    -2.2   29.0   109.0     220    50     100   90   38   92    17
   3 gct_th5         :   -70.6   30.0    79.0     222    36     ---   64   30  128    14

White advantage = 37.89 +/- 18.38
Draw rate (equal opponents) = 15.59 % +/- 2.08

持ち時間が長くなると、差が小さくなり、dlshogiがR+143.5になった。


この結果を見ると、dlshogiの方が互角局面集では強いと言える。

dlshogiもGCTも、大会では定跡で相掛かりにしていたので、戦型別に見ると、勝率が変わる可能性があるため、調べた。

戦型別の初期局面集は、Ryfamateの駒の書体さんから提供いただいたものを使用した。

相掛かり初期局面集 10分2秒加算

dlshogiとGCTは、GPUは4GPU(GPUあたりのスレッド数はそれぞれ4と5)。水匠5は64スレッド。

   # PLAYER              :  RATING  ERROR  POINTS  PLAYED   (%)  CFS(%)    W    D    L  D(%)
   1 dlshogi-4th_agr     :   108.8   33.9   146.5     207    71     100  139   15   53     7
   2 suisho5-64th_agr    :   -43.8   33.2    85.0     204    42      77   71   28  105    14
   3 gct-5th_agr         :   -65.0   31.8    77.5     207    37     ---   69   17  121     8

White advantage = 85.06 +/- 20.42
Draw rate (equal opponents) = 10.77 % +/- 1.99

相掛かりでは、dlshogiがR+173.8になった。

角換わり初期局面集 10分2秒加算

dlshogiとGCTは、GPUは4GPU(GPUあたりのスレッド数はそれぞれ4と5)。水匠5は64スレッド。

   # PLAYER              :  RATING  ERROR  POINTS  PLAYED   (%)  CFS(%)    W    D    L  D(%)
   1 dlshogi-4th_kgr     :   103.5   33.0   145.5     207    70     100  136   19   52     9
   2 suisho5-64th_kgr    :   -23.9   32.4    92.5     204    45      98   78   29   97    14
   3 gct-5th_kgr         :   -79.6   31.7    71.0     207    34     ---   60   22  125    11

White advantage = 59.48 +/- 20.26
Draw rate (equal opponents) = 12.41 % +/- 2.04

角換わりでは、dlshogiがR+183.1になった。
角換わりの方が差が付きやすいようだ。

先手のアドバンテージ(White advantage)は、相掛かりの方が高い。
引き分け率(千日手 or 320手)は、角換わりの方が高い。

矢倉初期局面集 10分2秒加算

dlshogiとGCTは、GPUは4GPU(GPUあたりのスレッド数はそれぞれ4と5)。水匠5は64スレッド。

   # PLAYER              :  RATING  ERROR  POINTS  PLAYED   (%)  CFS(%)    W    D    L  D(%)
   1 dlshogi-4th_ygr     :    77.8   29.7   142.0     216    66     100  121   42   53    19
   2 suisho5-64th_ygr    :   -12.3   28.2   101.5     214    47      98   76   51   87    24
   3 gct-5th_ygr         :   -65.6   29.6    78.5     214    37     ---   58   41  115    19

White advantage = 46.31 +/- 18.29
Draw rate (equal opponents) = 22.16 % +/- 2.35

矢倉では、dlshogiがR+143.4になった。
矢倉では差が付きにくくなるようだ。

先手のアドバンテージ(White advantage)は、相掛かり、角換わりよりも低い。
引き分け率(千日手 or 320手)は、矢倉が一番高い。

まとめ

第1回世界将棋AI電竜戦では、大会後の測定ではGCTのモデルが明らかに強かったが、今大会ではこの測定結果を見る限り、dlshogiの方が強いようだ。
大会は、定跡に依存することと、各ソフトと1回だけの対局なので運もあるのと、dlshogiは追加学習の元のモデルを公開していたので狙い撃ちされたという要素もあったかもしれない。

おまけ

ソフトごとの勝率

相掛かり初期局面集
dlshogi-4th_agr vs gct-5th_agr: 78-25-2 (75.2%)
Black vs White: 67-36-2 (64.8%)
dlshogi-4th_agr playing Black: 47-5-1 (89.6%)
dlshogi-4th_agr playing White: 31-20-1 (60.6%)
gct-5th_agr playing Black: 20-31-1 (39.4%)
gct-5th_agr playing White: 5-47-1 (10.4%)

dlshogi-4th_agr vs suisho5-64th_agr: 61-28-13 (66.2%)
Black vs White: 54-35-13 (59.3%)
dlshogi-4th_agr playing Black: 35-9-7 (75.5%)
dlshogi-4th_agr playing White: 26-19-6 (56.9%)
suisho5-64th_agr playing Black: 19-26-6 (43.1%)
suisho5-64th_agr playing White: 9-35-7 (24.5%)

gct-5th_agr vs suisho5-64th_agr: 44-43-15 (50.5%)
Black vs White: 51-36-15 (57.4%)
gct-5th_agr playing Black: 26-18-7 (57.8%)
gct-5th_agr playing White: 18-25-8 (43.1%)
suisho5-64th_agr playing Black: 25-18-8 (56.9%)
suisho5-64th_agr playing White: 18-26-7 (42.2%)
角換わり初期局面集
dlshogi-4th_kgr vs gct-5th_kgr: 80-19-6 (79.0%)
Black vs White: 57-42-6 (57.1%)
dlshogi-4th_kgr playing Black: 45-7-1 (85.8%)
dlshogi-4th_kgr playing White: 35-12-5 (72.1%)
gct-5th_kgr playing Black: 12-35-5 (27.9%)
gct-5th_kgr playing White: 7-45-1 (14.2%)

dlshogi-4th_kgr vs suisho5-64th_kgr: 56-33-13 (61.3%)
Black vs White: 53-36-13 (58.3%)
dlshogi-4th_kgr playing Black: 33-13-5 (69.6%)
dlshogi-4th_kgr playing White: 23-20-8 (52.9%)
suisho5-64th_kgr playing Black: 20-23-8 (47.1%)
suisho5-64th_kgr playing White: 13-33-5 (30.4%)

gct-5th_kgr vs suisho5-64th_kgr: 41-45-16 (48.0%)
Black vs White: 50-36-16 (56.9%)
gct-5th_kgr playing Black: 24-19-8 (54.9%)
gct-5th_kgr playing White: 17-26-8 (41.2%)
suisho5-64th_kgr playing Black: 26-17-8 (58.8%)
suisho5-64th_kgr playing White: 19-24-8 (45.1%)
矢倉初期局面集
dlshogi-4th_ygr vs gct-5th_ygr: 70-22-16 (72.2%)
Black vs White: 53-39-16 (56.5%)
dlshogi-4th_ygr playing Black: 38-7-9 (78.7%)
dlshogi-4th_ygr playing White: 32-15-7 (65.7%)
gct-5th_ygr playing Black: 15-32-7 (34.3%)
gct-5th_ygr playing White: 7-38-9 (21.3%)

dlshogi-4th_ygr vs suisho5-64th_ygr: 51-31-26 (59.3%)
Black vs White: 48-34-26 (56.5%)
dlshogi-4th_ygr playing Black: 28-11-15 (65.7%)
dlshogi-4th_ygr playing White: 23-20-11 (52.8%)
suisho5-64th_ygr playing Black: 20-23-11 (47.2%)
suisho5-64th_ygr playing White: 11-28-15 (34.3%)

gct-5th_ygr vs suisho5-64th_ygr: 36-45-25 (45.8%)
Black vs White: 46-35-25 (55.2%)
gct-5th_ygr playing Black: 20-19-14 (50.9%)
gct-5th_ygr playing White: 16-26-11 (40.6%)
suisho5-64th_ygr playing Black: 26-16-11 (59.4%)
suisho5-64th_ygr playing White: 19-20-14 (49.1%)