3 ms·
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 bra
by CyberDildonics 3y ago
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 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.
- wegfawefgawefg 3y agoWhat 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.
- CyberDildonics 3y agoThat 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?
- wegfawefgawefg 3y agoYou're framing it like an information extraction game, but it is also frameable as a zero-sum minimax game. And its an easy, and common solution to games like this. Read up. https://en.wikipedia.org/wiki/Mastermind_(board_game)#Algorithms_and_strategies https://en.wikipedia.org/wiki/Mastermind_(board_game)#Algori... https://en.wikipedia.org/wiki/Minimax#In_zero-sum_games 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/knuth-mastermind.pdf https://www.cs.uni.edu/~wallingf/teaching/cs3530/resources/k... an implementation: https://github.com/johnathanlouie/mastermind https://github.com/johnathanlouie/mastermind further development: https://arxiv.org/abs/1908.06183 https://arxiv.org/abs/1908.06183
- CyberDildonics 3y agoIt just says the "minimax" solution for the person who chooses the pattern is to pick randomly from patterns with more than one color.
- wegfawefgawefg 3y agoWell the game is trivial for the person picking the pattern. So I dont expect the optimal play for them to be interesting.
- CyberDildonics 3y agoIf the game is trivial for the person picking, what is the strategy for the player after the filtering I described?