Pig the dice game/Player/AutoHotkey

Revision as of 17:22, 27 February 2014 by rosettacode>Sobriquet (added AutoHotkey L optimal play)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

AutoHotkey

<lang autohotkey>; each row starts with two numbers, your current score and current holding score; the horizontal axis is the opponent's current score. Wherever there's a dot, it means you're better off hold; otherwise you should roll. For example, on line 0,21, there are 9 dots at the begining of the line, which means, if your total score is 0, and have already rolled 21 points this turn, then your best choice is hold if opponent has 0-8 points, but better keep rolling if he has 9 or more. The graph has many odd features, but generally makes sense.

</lang>