Skip to content

Commit

Permalink
docs: Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard-Prokhorikhin committed May 4, 2024
1 parent 3f73ca3 commit dbefa53
Showing 1 changed file with 47 additions and 7 deletions.
54 changes: 47 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,58 @@

## Description

<!-- TODO -->
This project is our attempt at making an AI that can play Tetris. First of all we made the environment (the game itself) and then we started working on multiple AI's that can play the game. The AI's are based on different algorithms and strategies. We have implmented:

## Setup
### Prerequisites
- Ensure that git is installed on your machine. [Download Git](https://git-scm.com/downloads)
- Ensure Python 3.12 or newer is installed on your machine. [Download Python](https://www.python.org/downloads/)
- Random agent
- Heuristic agent with set weights
- Genetic algorithm to find the best weights for the heuristic agent

The game is playable/viable both in the terminal and in a GUI. The GUI is made with Pygame.

## How to run and install

- Have python installed (tested with 3.10+ but should work on older versions as well)
- Have pip installed
- Clone the repository
- Set up a virtual environment (optional but recommended) see [here](docs/guide/venv.md) for a guide
- Install the required packages with pip

```bash
pip install -r requirements.txt
```

- Done! You are now ready to run the game

### Clone the repository
```bash
git clone https://github.com/CogitoNTNU/TetrisAI.git
cd TetrisAI
```

## Contributors
## Usage

To play the game yourself, run the following command:

```bash
python main.py --play
```

To let the agent play the game, run the following command:

```bash
python main.py --agent <agent>
```

where `<agent>` is the agent you want to use. The available agents are: `random`, `heuristic`, `genetic`

To train the genetic agent, run the following command:

```bash
python main.py --train
```

## Team

The team behind this project is a group of students at NTNU in Trondheim, Norway, developed during the spring semester of 2024. The team consists of:

<table align="center">
<tr>
Expand Down Expand Up @@ -63,3 +101,5 @@ cd TetrisAI
</td>
</tr>
</table>

![Group picture](docs/img/Team.png)

0 comments on commit dbefa53

Please sign in to comment.