Skip to content

letho1608/tetris_ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris AI

Introduction

This repository contains Python code to train an AI agent to play Tetris using Q learning.


Tetris AI Demo

How to Use

  1. Training the Model
    To train the AI model from scratch, run the following command:

    python train.py
  2. Testing the Model
    After training, you can test the performance of the trained model with:

    python test.py

Pre-trained Models

You can find the pre-trained model files in the trained_models/tetris directory. These models can be used directly for testing without the need for training.

File Structure

  • train.py: Script to train the AI agent.
  • test.py: Script to test the trained AI model.
  • trained_models/tetris: Folder containing the pre-trained models.
  • demo/tetris.gif: GIF showing the Tetris game in action.

About

Tetris game played by AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages