System Specification

AI Tetris BestMove Comparison

Doc ID: SYS-SPEC-2026-003

Date: February 22, 2026

Status: Approved / Ver 1.2

Logo

1. System Overview

This system is a simulator designed to quantitatively compare the performance of "BestMove" calculation functions generated by major Large Language Models (ChatGPT, Copilot, Gemini) under identical conditions. Using a fixed random seed to generate the exact same 1,000 pieces, the algorithms of each AI model will run in parallel on three game fields, and the winner will be determined by the final highest score.

2. System Architecture & Operating Environment

2.1 Basic Architecture

This system utilizes a clean, platform-independent architecture, primarily built as a standalone HTML/JS application that runs entirely on the client side (browser environment).

2.2 Operating Environment Requirements (Platform-Free)

Platform Image

* Tap image to enlarge

OSiOS, Android, Windows, macOS, Linux
Execution EnvironmentModern web browsers supporting HTML5 / ES6 JavaScript (Chrome, Safari, Edge, Firefox, etc.)
NetworkCapable of offline operation (* Internet connection is required only for the initial load if using CDN resources)

2.3 Scalability (Post-Phase 2 Outlook)

Anticipating future web application deployment and feature expansion, the system features a modular design capable of the following architectural integrations:

3. Application Specifications

Target AI ModelsChatGPT / Copilot / Gemini
Match FormatThree game fields are set up in parallel on the screen, running the simulation simultaneously.
Victory ConditionThe AI with the highest score at the end of the 1,000 pieces or at the point of game over is declared the winner.
Piece Supply ConstraintsRandom generation (total 1,000 pieces). By fixing the seed value, the 7 types of pieces and their initial angles are controlled to appear in the "exact same order" for all AIs.

4. Tetromino (Piece) Definitions

The standard block definitions for all 7 types generated and drawn within the system are as follows.

I-Piece
O-Piece
T-Piece
S-Piece
Z-Piece
J-Piece
L-Piece

5. Score Calculation Specifications

The score acquired when clearing lines complies with standard Tetris calculation formulas. In this simulation, to fix the difficulty level, the settings for [LEVEL 5] are applied to all trials, serving as the evaluation criteria for the final score.

LEVEL Single Double Triple TETRIS
0401003001200
1802006002400
21203009003600
316040012004800
420050015006000
5
(Applied)
240 600 1800 7200
628070021008400
732080024009600
8360900270010800
94001000300012000

6. System Architecture Diagram

The diagram below illustrates the overall system architecture and processing flow in this application.

System Architecture

* Tap image to enlarge

7. AI Function Creation Instructions (Prompt)

In this verification, the common prompt (instruction text) defined below is used to have each AI model (ChatGPT, Copilot, Gemini) generate the BestMove function. To eliminate condition differences, the exact same prompt must be input word-for-word to obtain the output.

You are the ultimate Tetris AI programmer.
Please create the JavaScript functions `findBestMove(type)` and `calculateScore(...)` for a browser game, operating under the following specifications.

## Game Specifications
- Board: 10 columns x 20 rows (Variables: COLS=10, ROWS=20)
- Array: `board[y][x]` (0=empty, 1 or more=block exists)
- Falling Block: Passed by argument `type` (integer 1~7).
- Rotation: 0~3 (90-degree increments)

## Objective
- Avoid game over, survive as long as possible, and aim for a high score (e.g., clearing 4 lines).

## Provided Existing Functions (You may use this)
- `getTransformedBlocks(type, r)`: Returns an array of block coordinates `{x, y}` for rotation `r`.

## Your Task
Output ONLY the code for the following two functions. No explanations are needed.

1. `calculateScore(simBoard, linesCleared, type, x, width)`
   - An evaluation function that receives the virtual board `simBoard` and the number of `linesCleared`, returning a numerical value for the "goodness" of that board state.
   - Incorporate your own "ultimate logic", such as deducting points for creating holes (empty spaces), adding points for line clears, adding points for keeping the height low, etc.

2. `findBestMove(type)`
   - A function that simulates all rotations (0-3) and all horizontal positions (0-9), returning the `{x, r, y}` object that results in the highest `calculateScore`.

## Constraints
- The use of external libraries is prohibited.
- The variable `board` (current board state) can be referenced as a global variable.
- Consider execution speed and avoid excessively heavy calculations.

8. Product Catalog

For an overview of the products and services related to this system and project, please refer to the catalog below.

Product Catalog

* Tap image to enlarge

Launch Demo View Japanese Version