Skip to content

a tetris ai in cpp that can also be used to generate images using tetris peices

Notifications You must be signed in to change notification settings

crypticC0der/tetrisAI-Cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

tetrisAI-Cpp

This is a program made to run tetris, it uses OpenGL and is programmed for linux.
It is written entirely in C++, which was not nearly as fun as i expected with openGL

The program has 3 major components, the engine, the AI and the options,
all the options are set via #define so i can optimise the code around the various options.

There are two main options

  • Speed
    This is how fast the program does movements, in slowmode it takes 4 moves to place a peice, each with a sleep of (0.03) seconds inbetween, this is very nice to view and light on the cpu too.
    In fastmode it runs so fast (on my machine) it is hard to recognise as tetris, this is only here so you can enjoy the AIs full potential.
  • Goal
    There are two goals the AI can preform
    • Regular
      This just plays tetris and plays it well, it has never lost
      even after leaving it on max speed for a couple days
    • Image
      Set base .txt to a file of spaces and lower case Os and it will play tetris in a way to make that image
      there is an example there of a diamond shape, this is ment as a present for my morail.

About

a tetris ai in cpp that can also be used to generate images using tetris peices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages