its a no hidden state turn game. so minimax. but state space is small. so render a table of all correct moves.
You must be thinking of a different game. With Mastermind, the chosen 4 colours are hidden and the other player tries to guess the colours and positions.
How to solve the "Mastermind" guessing game? (2009)
21–30 of 33 posts
Re: How to solve the "Mastermind" guessing game? (2009)
#22Earlier quoted context omitted.
You must be thinking of a different game. With Mastermind, the chosen 4 colours are hidden and the other player tries to guess the colours and positions.
hmm. Minimax provides an optimal strategy for mastermind. But minimax doesnt work for hidden state games. Therefore, I can only assume mastermind doesnt really satisfy the hidden state property due to the fact that the opponent cannot changed the state between your turns.
Re: How to solve the "Mastermind" guessing game? (2009)
#23ICYMI, 3blue1brown (Grant Sanderson) has a video applying information theory to solving Wordle, which is conceptually similar to mastermind -- https://www.youtube.com/watch?v=v68zYyaEmEA
Re: How to solve the "Mastermind" guessing game? (2009)
#24Earlier quoted context omitted.
hmm. Minimax provides an optimal strategy for mastermind. But minimax doesnt work for hidden state games. Therefore, I can only assume mastermind doesnt really satisfy the hidden state property due to the fact that the opponent cannot changed the state between your turns.
Why are you assuming anything, just learn how the game works. This game can be solved on the command line with grep. There is no opponent. What are you talking about here?
I hope I have explained my motivation, and why I responded about the particular aspect of the game in the way that I did. My apologies for coming off retarded and shit.
Re: How to solve the "Mastermind" guessing game? (2009)
#25Earlier quoted context omitted.
hmm. Minimax provides an optimal strategy for mastermind. But minimax doesnt work for hidden state games. Therefore, I can only assume mastermind doesnt really satisfy the hidden state property due to the fact that the opponent cannot changed the state between your turns.
Why are you assuming anything, just learn how the game works. This game can be solved on the command line with grep. There is no opponent. What are you talking about here?
Re: How to solve the "Mastermind" guessing game? (2009)
#26Earlier quoted context omitted.
Why are you assuming anything, just learn how the game works. This game can be solved on the command line with grep. There is no opponent. What are you talking about here?
About two months ago i learned how mastermind worked, put a good hour into reading about it and the solutions. played a few games too. Having spent a very long time implementing algorithms for chess and tictactoe a number of years ago I immediatly understood it. My friend also gave presentations on some solutions in rust, that I attended twice. I admit i am responding with old knowledge but I believe it is still corr…
Start with a text file of every combination separated by lines.
RRRRR RRRRG RRRGG
Then use cat to output it to grep and use grep for all the constraints.
One for colors that aren't there. One for colors you know are in the right place. Then after that one grep for every color you know is there somewhere and one for each color you know isn't in a certain spot.
cat combinations.txt | grep -v [colors that aren't there] | grep ..R.G | grep B | grep -v .Y...
That's it. All you need is a command line. Generate guesses from the filtered list then add to the filters.
Re: How to solve the "Mastermind" guessing game? (2009)
#27Earlier quoted context omitted.
About two months ago i learned how mastermind worked, put a good hour into reading about it and the solutions. played a few games too. Having spent a very long time implementing algorithms for chess and tictactoe a number of years ago I immediatly understood it. My friend also gave presentations on some solutions in rust, that I attended twice. I admit i am responding with old knowledge but I believe it is still corr…
You don't need to be well versed in reinforcement learning "a-priori" knowledge or worry about opponents moves or "optimal tabular and minimax solutions" or branching factors or anything else. Start with a text file of every combination separated by lines. RRRRR RRRRG RRRGG Then use cat to output it to grep and use grep for all the constraints. One for colors that aren't there. One for colors you know are in the righ…
Re: How to solve the "Mastermind" guessing game? (2009)
#28Earlier quoted context omitted.
You don't need to be well versed in reinforcement learning "a-priori" knowledge or worry about opponents moves or "optimal tabular and minimax solutions" or branching factors or anything else. Start with a text file of every combination separated by lines. RRRRR RRRRG RRRGG Then use cat to output it to grep and use grep for all the constraints. One for colors that aren't there. One for colors you know are in the righ…
What you are saying may be true, and helpful, but just isn't related. My initial comment was about an optimal play algorithm. So that's what I was discussing.
Are any solutions more likely than any others?
How are you getting an "optimal play algorithm" when the entire game is about using what you know to filter the solutions that are still possible?
Re: How to solve the "Mastermind" guessing game? (2009)
#29Earlier quoted context omitted.
What you are saying may be true, and helpful, but just isn't related. My initial comment was about an optimal play algorithm. So that's what I was discussing.
That doesn't even make sense. Are any solutions more likely than any others? How are you getting an "optimal play algorithm" when the entire game is about using what you know to filter the solutions that are still possible?
https://en.wikipedia.org/wiki/Mastermind_(board_game)#Algori... https://en.wikipedia.org/wiki/Minimax#In_zero-sum_games
One of the early solutions to mastermind was by Donald Knuth. paper: https://www.cs.uni.edu/~wallingf/teaching/cs3530/resources/k... an implementation: https://github.com/johnathanlouie/mastermind
further development: https://arxiv.org/abs/1908.06183
Re: How to solve the "Mastermind" guessing game? (2009)
#30ICYMI, 3blue1brown (Grant Sanderson) has a video applying information theory to solving Wordle, which is conceptually similar to mastermind -- https://www.youtube.com/watch?v=v68zYyaEmEA
You don't need "information theory", you can just make a text file with each option on its own line, then use grep on the command line for each constraint with pipes in between.