Skip to the content

Sugoroku双六

Play backgammon and its relatives with native rules, cube and match scoring, seeded dice and replayable records.

Sugoroku is the Japanese name 双六 for games of tables. About the name

Contents

Reference · Rules, games and records

winChancefunction

A chance of winning, 0 to 1, that a score in pips stands for: the logistic curve, which a lead of 25 pips in a position of this kind takes to about three in four.

Import it

import { winChance } from "@johnmorrisdotca/sugoroku";

Definition

function winChance(score: number): number

Parameters

NameTypeDescription
scorenumber

The evaluation difference to map to a win chance.

Returns

number

A chance of winning, 0 to 1, that a score in pips stands for: the logistic curve, which a lead of 25 pips in a position of this kind takes to about three in four.

Examples

import { winChance } from "@johnmorrisdotca/sugoroku";

console.log(winChance(0));
0.5

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/sugoroku 1.1.1.