Inspiration

I got inspired from timurbakibayev/tetris.py tetris game online and the challenge created by NAVCan to produce an Ai based Tetris Game for the highest score possible

What it does

TetrisAi uses Ai to propose to the player the best stacking possible to achieve the highest score humanly possible while playing Tetris. Although it proposes to the player how he can stack the Ai will stilll adapt and propose the best solutions no matter how the player choses to stack the pieces while playin

How we built it

TetrisAi was built using python and pygame

Challenges we ran into

like all python problems I ran into indentation problems, syntax problem. For the code content it was challenging to clearly implement what the AI was supposed to do even with the use of Ai to find the problems within my code

Accomplishments that we're proud of

I'm proud that i was able to fully grasp the working way of the game in the backend and not only in player's, i 'm glad that i've made the right researches and found the best ways to approach a solution to this challenge saving me time and effort in coding this game

What we learned

I learned that pygame is a very interesting way of implementing game and that it was possible to have a bit of design using cells to create shapes and basing myself on the RGB factors to obtain any color wanted.Using classes like Figure and Tetris showed the power of object-oriented design for managing pieces, collisions, and game state. Working with a 2D grid taught careful indexing and collision detection, while implementing piece rotation reinforced the use of pre-defined transformations. The use of Ai and controlling how reducing heights or bumps from pieces and holes can lead to optimal decisions while playing this game

What's next for TetrisAi

Some way to improve TetrisAi is to enhance Ai by making it smarter, maybe it could penalize when some holes are left in obvious places or giving more rewards when clearing multiple lines. We can add sound effects and music while the game goes on.

Built With

Share this project:

Updates