Constructor
new AZjsEngineBase(size, komi, evaluatePlugin)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
size |
Integer | 19 | 碁盤サイズ |
komi |
number | 7 | コミ |
evaluatePlugin |
function | null |
- Source:
Classes
Methods
clear()
内部状態をクリアします。
改めて初手から対局可能になります。
- Source:
(async) genmove(mode) → {Array.<Object>}
次の手を返します。状況に応じて投了します。
戻り値[x, y]は左上が1-オリジンの2次元座標です。もしくは'resgin'または'pass'を返します。
内部で保持している局面も進めます。
Parameters:
Name | Type | Description |
---|---|---|
mode |
SearchMode |
- Source:
Returns:
[(Integer[]|string), Number]
- Type
- Array.<Object>
(async) loadNN()
ニューラルネットワークのウェイトをロードします。
- Source:
pass()
次の手をパスして現局面を進めます。
- Source:
play(x, y)
次の手を打って現局面を進めます。
(x, y)は左上が1-オリジンの2次元座標です。
Parameters:
Name | Type | Description |
---|---|---|
x |
Integer | |
y |
Integer |
- Source:
Throws:
Error
(async) ponder() → {Array.<Object>}
相手の考慮中に探索を継続します。
- Source:
Returns:
[(Integer[]|string), Number]
- Type
- Array.<Object>
stop()
探索を強制終了させます。
探索ツリーは有効なままです。主にポンダリング終了に使います。
- Source:
timeLeft() → {number}
メイン時間の残り時間を返します。
- Source:
Returns:
残りの秒数
- Type
- number
timeSettings(mainTime, byoyomi)
持ち時間を設定します。
Parameters:
Name | Type | Description |
---|---|---|
mainTime |
number | 秒 |
byoyomi |
number | 秒 |
- Source: