本文へ移動

Sugoroku双六

標準の規則、キューブ、試合の得点、シード付きのサイコロ、再生できる記録で、バックギャモンと仲間のゲームを遊べます。

「双六」は、盤と駒で遊ぶゲームの名前です。 名前について(英語)

目次

リファレンス · 規則・ゲーム・記録

Strength型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

THE COMPUTER PLAYER, in four strengths. Each is the one before it with more care, and none of them is slow: a move takes a few milliseconds, and the strongest well under a tenth of a second in a browser.

  • random: any legal play, with equal chance. It never doubles, and takes every double.
  • greedy: the play that leaves the best position by the evaluation (evaluate), looking no further.
  • careful: weighs its best four plays by what the other side's best reply to each roll would leave.
  • strong: the same over its best ten plays.

Doubling is simple, and works as documented in the README: in a race the Keith count (see keithCount), where the rules are Keith's: double when the count of the side on roll is within 4 of the other's, redouble within 3, take when the doubler's is 2 or more above the taker's. In a position where the sides are still in contact (careful and strong only), the evaluation is turned into a chance of winning (winChance) and a side doubles at 70% and takes at 25%.

インポート

import type { Strength } from "@johnmorrisdotca/sugoroku";

定義

type Strength = "random" | "greedy" | "careful" | "strong";

例

import type { Strength } from "@johnmorrisdotca/sugoroku";

const value: Strength = "greedy";
console.log(value);
greedy

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/sugoroku 1.1.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。