Tetris (vs AI)

버전 (9.15 KB) 작성자: Jan
An extended tetris game, using the plot function. You can either play by yourself or against an AI.

다운로드 수: 1.2K

업데이트 날짜: 2011/12/15

라이선스 보기


- move: arrows
- rotate: z and x
- pause: p

My highscore for the given standard configuration is now 2680 ;)

Tetris AI:

The game tetris is played by the computer, which chooses the move that has a maximum blockvalue after landing, where:

blockvalue = number of edges that touch a wall or other block - average height of the block.

Of course other factors can and maybe will be added to blockvalue: we could punish gaps, reward full rows, etc.

After 500 runs, the results of the standard configuration are:

mean: 1733 (160 lines)
worst: 260 (26 lines)
best: 8080 (748 lines)

Tetris versus the AI:

The AI and the original Tetris game are combined in one game. First you make a move in your own field and then the AI makes a move with the exact same block in the other field.
Try to beat the AI!

인용 양식

Jan (2023). Tetris (vs AI) (https://www.mathworks.com/matlabcentral/fileexchange/33701-tetris-vs-ai), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
Help CenterMATLAB Answers에서 Video games에 대해 자세히 알아보기
태그 태그 추가


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보

The Tetris_vs_AI game is added.

AI added

Found and corrected an error in createblock()

Added 6 levels (level = certain set of blocks)

Found and removed a small error in the line removing loop.

Scorekeeping added