DEV Community

Discussion on: Write an AI for Yahtzee

Collapse
 
benchislett profile image
Benjamin Chislett

Because of the turn-based and random natures of Yahtzee, you're going to want to look into Reinforcement Learning.

In short, this is a learning model that experiments and learns from how it has done in previous turns. This is the most general form, and doesn't require much input. Because you said you want it to use your own playing strategy though, you might want to play around with some hard-coded (non-ai) programs before you get into the heavy stuff.

A quick github search yields some results in various languages: have a look, and see how much you understand. Do not just copy code; you won't learn a thing
github.com/search?q=yahtzee+ai

For RL, you can start with the wikipedia page and then try out some packages in different languages, and see what comes out.
en.wikipedia.org/wiki/Reinforcemen...

Good luck, and have fun!