Machine Learning with Python Projects - Rock Paper Scissors

How should I start? I have totally no clue.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0

Challenge: Machine Learning with Python Projects - Rock Paper Scissors

Link to the challenge:

The easy place to start is to look at the code for the other players you have to beat in the boilerplate. You could also research algorithms to predict future moves based on past moves.

1 Like

An alternative approach is to adapt Q-learning algorithm taught in course video into RPS games. In this approach you have to think about in RPS games, what should be the ‘states’ and what should be the ‘actions’, how large the Q-table should be, how to tune the proportion of random plays and how large the learning rate should be.

That’s really tough …

It looks like q-learning is probably at the upper end of complexity for this type of task, but I’ve never used it myself. But since q-learning only works on Markov type problems you could try a simpler Markov algorithm.

Hint: That’s what Abby does.

I was hoping to use a Tensorflow model to solve this problem, just as Tim shows from the Titanic survivors example. I don’t know if that is the intention, because the replit developer environment appears to be incapable of loading the Tensorflow library.

Surely we’re not supposed to “brute force” the solution with traditional programming, that’s what machine learning is for!

There’s more to machine learning than TF, which is fine for neural networks but less so for other types of machine learning. The way this project is set up, you don’t have the opportunity to easily get the data for a training and validation data sets unless you want to record the output of many games per player to create the data yourself and then create, train, and test your model against the test players.

So, most people try the “past predicts the future” method and land on a solution related to Markov chains which works because the test players use variations on the “past predicts the future” themselves.