In python, you need to predict a 5x5 minesweeper game using Deep learning. Your goal is…
- User
In python, you need to predict a 5x5 minesweeper game using Deep learning. Your goal is to make it as accurate as possible. Around 80%+
You've data for every game played with all mine locations. But, there is something you need to know. This 5x5 board, can the player chose how many bombs there are on it. The player can chose bombs from 1 to 10. You need to make an input that takes how many bombs the user chose. You also need to make an input that takes the amount of safe spots the user wants.
You need to predict the amount the user has set for safe spots. You also need to predict the possible bomb locations out of the user mine amount input. Also, the results have to be the same everytime if the data isnt changed. Also it cant return numbers like 1,2,3
Data. You will have the data for the amount of mines the user chose. If the user chooses 3 mines, you will get all the games with 3 mines in it as data with their past locations. The data is: [12, 19, 24, 4, 16, 22, 11, 17, 19, 1, 2, 24, 4, 5, 12, 7, 14, 16, 5, 9, 10, 5, 16, 19, 15, 24, 23, 1, 18, 22, 3, 5, 7, 6, 9, 17, 3, 9, 18, 4, 11, 24, 19, 20, 22, 2, 3, 9, 10, 18, 23, 4, 14, 19, 6, 9, 13, 3, 17, 23, 6, 11, 23, 6, 9, 16, 3, 22, 23, 5, 16, 22, 5, 9, 15, 13, 18, 23, 3, 6, 10, 1, 13, 22, 1, 9, 24, 2, 9, 24] and the this list will update it self. You need to use the list raw
- Assistant
We can use a neural network to predict the mine locations and safe spots based on the input data you provided. Here's a step-by-step solution on how you can achieve this using Python and Keras, a popular deep learning library:
Step 1: Import necessary libraries
python - User
show the full code with the predictions returned
- Assistant
Here's the full code, including the function to make predictions:
python