#### Archived

This topic is now archived and is closed to further replies.

# AI in Yahtzee

This topic is 7032 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
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

1. 1
Rutin
41
2. 2
3. 3
4. 4
5. 5

• 16
• 18
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633362
• Total Posts
3011527
• ### Who's Online (See full list)

There are no registered users currently online

×