Write an AI for Yahtzee

github logo ・1 min read

Hello everyone!

I would like to develop an AI for Yahtzee.
I would like to train the AI with my own playing strategy so that I can play against myself at a later time.
How do I approach this project?
What topics do I have to deal with?
What kind of AI is necessary here?

twitter logo DISCUSS (1)
markdown guide

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

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

Good luck, and have fun!

Classic DEV Post from Nov 20 '18

Dumb algorithms make us dumb

Should we all just quit our job to save the planet from fake news and fascism?

oaltena profile image

dev.to is where software developers stay in the loop and avoid career stagnation.

Sign up (for free)