Tetris AI Challenge Specification
Overview
Develop a browser-based Tetris game in JavaScript that features an AI player powered by heuristic evaluation. The game must include:
Real-Time Gameplay: A Tetris board rendered on an HTML5 Canvas.
Heuristic-Based AI: The AI should simulate multiple moves (varying rotations and horizontal positions) and evaluate the resulting board states based on weighted metrics (aggregate height, complete lines, holes, and bumpiness).
Detailed Metrics Logging: A side panel next to the game must display real-time logs including:
Training Time: Elapsed time since game start.
AI Mode Status: Whether the AI is controlling the game.
AI Move Count: Total number of moves taken by the AI.
Latest Heuristic Score: The score of the most recent best-move simulation.
Detailed Board Metrics: Aggregate height, number of complete lines, holes, and bumpiness for the best simulated move.