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
| Name | Type | Description |
|---|---|---|
score | number | 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.5What it prints (run when this page was built)