Solving Soduku
Download the 3 million Sudoku puzzles with ratings dataset. Put the file "sudoku-3m.csv" in a <data>
folder, located in the same directory as the main.py
file.
Install the requirements in a custom Python 3.11 environment.
usr@desktop:~$ python -m venv game_env
usr@desktop:~$ source game_env/bin/activate
(game_env) usr@desktop:~$ pip install -r requirements.txt
Use the script main.py
to launch a game.
(game_env) usr@desktop:~$ python main.py --game sudoku --render-mode human --playing-mode manual
Available arguments are:
--game
to select the game to play, available choices are:sudoku
(default) try to correctly fill a Sudoku gridsnake
on a 18x18 grid, try to grow a snake without dying
--render-mode
to fix how the game will be rendered, available choices are:rgb_array
(default) to save results in frames aggregated in a video filehuman
to display results in a GUIansi
to display results in console (only available with sudoku)
--playing-mode
to play manualy or automaticly, available choices are:learning
(default) let the AI do the gamemanual
play by yourself
Random agent | Trained agent |
---|---|
Learning steps:
Model description: