• Create Account

## AI in Yahtzee

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

### #1Michael  Members

122
Like
Likes
Like

Posted 17 August 1999 - 11:44 AM

I'm wondering how to make a computer player for yahtzee. I found AI for chess, mastermind anything but yahtzee on the net. I don't think it's too difficult but I've never done any AI progrmming bevore. What kind of AI would work best for a yahtzee computer player?

Thanks for any help!
Mike

### #2TANSTAAFL  Moderators

1160
Like
Likes
Like

Posted 17 August 1999 - 11:44 AM

an AI for yachtzee would be pretty straightforward.

after the first roll, and the second roll, the computer would evaluate the chances of getting each configuration, and pick the greatest chance. equal chances go to the configuration that gets the most score. of course, it does not calculate odds for for configurations already achieved.

also, besides the "junk" configuration, the computer treats the 1's, 2's, 3's as junk, since they make only a few points.

for example:

first roll:

5,5,4,1,6

to get a yachtzee, the computer would have to re-roll the 4,1, and 6, with only a 1/216 chance of getting it.

to get a large straight, the computer would only have to reroll either a 5 and the 1, or a 5 and a 6 (either way, two dice, for a chance of 1/36)

to get a full house, the computer would keep the 5's, and one other die. two dice, chance of 1/36

and so on, to calculate all of the possibilities.

i dont know the scoring scheme for the configs, so i'll say for the moment that the computer will go for a full house because it gets more points, and has a 1/36 chance.

so, the computer keeps the 5, 5, and 4, and rerolls the 1 and 6.

then rolls: 3,6

so, 5,5,4,3,6 is what it now has.

recalculating, we already have a small straight, and we have a 1/6 chance for getting a large straight, and for anything else there is at MOST a 1/36 chance, so the computer rerolls one of the 5s

and, he gets a 1, so we have a small straight.

but this is, IMO, how a yachtzee AI should work.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.