From a45396ea109975f9521c5e9cb6eaec3a4e9364c8 Mon Sep 17 00:00:00 2001 From: Piotr Machura Date: Tue, 1 Feb 2022 16:46:09 +0100 Subject: [PATCH] Update README --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fcf8a1e..d33df7e 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,19 @@ # Sweep AI Sweep AI is a minesweeper clone enhanced with deep learning capabilities. While minesweeper may not exactly be [NP-complete](https://en.wikipedia.org/wiki/Minesweeper_(video_game)#Computational_complexity) and multiple -[strategies](https://minesweepergame.com/strategy.php) that make the game easier exist, why not have AI solve the problem -for us? +[strategies](https://minesweepergame.com/strategy.php) that make the game easier exist, why not make the neural network +solve the problem for us? -This variant enhances the classic minesweeper gameplay with AI-powered hints, compiling the AI player with -[keras](https://keras.io/). The interface is built using [pygame](https://www.pygame.org/) and -[pygame-menu](https://github.com/ppizarror/pygame-menu). +**Warning:** this doesn't work so well. -# Installation +## Installation The safest way to clone the repo and install the game within a virtual environment ```bash # In the project's directory python3 -m venv .venv source .venv/bin/activate pip install . -# Run the game -python3 -m sweep-ai +python3 -m sweep-ai # Play the game ``` For development, use [poetry](https://python-poetry.org/): @@ -27,7 +24,7 @@ poetry run pytest # Run unit tests poetry run sweep-ai # Play the game ``` -# Cache +## Usage The players' brains and training data are cached and looked for in the following order: 1. `$SWEEP_CACHE/sweep` @@ -37,3 +34,8 @@ The players' brains and training data are cached and looked for in the following Run the game with `--clean-cache` flag to remove the cache directory. Use `--no-cache` if you don't want to use the cached models (cached training data is still used). To generate a plot of player's loss after training add the `--plot` flag. + + +The AI is built using [keras](https://keras.io/). The interface uses [pygame](https://www.pygame.org/) and +[pygame-menu](https://github.com/ppizarror/pygame-menu). + -- 2.45.2