EVALUATION_WEIGHTS定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The weights the computer plays with: set by hand and then held against random changes of themselves, none of which won more often over two thousand games.
インポート
import { EVALUATION_WEIGHTS } from "@johnmorrisdotca/sugoroku";
定義
const EVALUATION_WEIGHTS: EvaluationWeights = {
onRoll: 4,
raceChecker: 1.6,
home: [1.5, 3, 4, 5.2, 5.8, 4.6],
outfield: 2.2,
middle: 0.6,
anchor: 5,
anchorAdvanced: 7.5,
prime: 1.8,
stack: 1.4,
blotTempo: 7,
blotBoard: 1.2,
blotScale: 1.15,
threat: 0.45,
threatTempo: 4,
bar: 8,
barBoard: 1.4,
barOther: 0.8,
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
onRoll | number | What it is worth to have the roll, which the side that does not have it must give up. |
raceChecker | number | Per checker still to bear off, in a race. |
home | readonly [number, number, number, number, number, number] | What a made point in the home board is worth, by the point, 1 to 6. |
outfield | number | A made point in the outfield (7 to 12), and in the other outfield (13 to 18). |
middle | number | |
anchor | number | A made point in the other side's home board, an anchor, and the extra for the 20 and 21 points. |
anchorAdvanced | number | |
prime | number | The reward for a run of made points: this times the square of its length beyond two. |
stack | number | The cost of each checker beyond four on a point. |
blotTempo | number | A blot's cost when hit, as a chance times (the pips it loses, this many more for the turn spent, and this much for each point the other side holds at home), all times |
blotBoard | number | |
blotScale | number | |
threat | number | A share of the other side's blots that this side threatens. |
threatTempo | number | |
bar | number | A checker on the bar, or yet to enter: a base cost and a cost for each point the other side holds at home. |
barBoard | number | |
barOther | number | How much of that the other side's checkers on the bar are worth to this side. |
例
import { EVALUATION_WEIGHTS } from "@johnmorrisdotca/sugoroku";
console.log(EVALUATION_WEIGHTS);{
onRoll: 4,
raceChecker: 1.6,
home: [ 1.5, 3, 4, 5.2, 5.8, 4.6 ],
outfield: 2.2,
middle: 0.6,
anchor: 5,
anchorAdvanced: 7.5,
prime: 1.8,
stack: 1.4,
blotTempo: 7,
blotBoard: 1.2,
blotScale: 1.15,
threat: 0.45,
threatTempo: 4,
bar: 8,
barBoard: 1.4,
barOther: 0.8
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。