9.1 PROJECT

TETRIS-ROBOTICS

Have you ever played the game Tetris? Tetris is a tile-matching video game that was created by Alexey Pajitnov in 1984. The game has seven different pieces, called tetriminos.

A display of seven blocks of different shapes

A display of seven blocks made up of four square in different configurations.

The I block is four squares oriented in a horizontal line.

The J block is three squares in a horizontal line with one square on top of the left-most square.

The L block is three squares in a horizontal line with one square on top of the right-most square.

The O block is four square arranged into a square.

The S block is two rows of two squares with the top row being offset one square to the right from the bottom row.

The L block is three squares in a horizontal line with one square on top of the middle square.

The Z block is two rows of two squares with the top row being offset one square to the left from the bottom row.

Suppose a science club is programming a robot to play a modified game of Tetris. In their game, each square that makes up a tetrimino has a side of 10 inches. For example, the O block, which is 2 squares wide by 2 squares tall, would be 20 inches wide and 20 inches tall while the dimensions of the I block would be 40 inches wide by 10 inches tall. The corresponding playfield is 10 squares wide by 16 squares tall. In this project, you will create a sequence of commands for a robot to navigate a specific path to place a tetrimino in the playfield.

The robot's wheels are 3 inches in diameter, and the robot understands the following commands:

  • Rotate wheels forward n rotations, where n is a positive real number.

  • Rotate wheels backward n rotations, where n is a positive real number.

  • Turn 90 ° left.

  • Turn 90 ° right.

  • A grid of ten squares by sixteen squares. A T block is occupying (4,15), (5,15), this square labeled as R, (6,15), and (5,16). The following squares are also occupied by variuos other blocks: (1,1) through (7,2), (10,1) through (10,4), (1,3), (2,3), (4,3), and (5,3). The empty square (9,2) is labeled as X.

  1. Calculate the distance the robot would travel after one full rotation of its wheels. Then, determine how many rotations are needed to travel the side length of one square. Round your answers to the nearest hundredth.

  2. Determine the total area of the playfield.

  3. Determine the total area of each tetrimino.

  4. During practice sessions, the team had to figure out the basic moves needed to reposition the tetriminos. During one practice session, they worked through the following sequences. In each situation, the robot is centered under the square marked R.

    1. The robot starts as shown, facing toward the right of the playfield. Draw the Z block if the robot turns 90 ° left. Show R with the correct orientation.

      Grid containing a Z block

      Two grids of five squares by five squares. The first grid has a Z block occupying (1,4), (2,4), this square labeled with R, (2,3), and (3,3). The second grid is empty.

    2. The robot starts as shown, facing toward the top of the playfield. Draw the I block if the robot rotates its wheels backwards 1.06 rotations. Show R with the correct orientation.

      Grid containing an I block

      Two grids of five squares by five squares. The first grid has an I block occupying (2,4), this square labeled with R, (3,4), (4,4), and (4,5). The second grid is empty.

    3. The robot starts as shown, facing toward the right of the playfield. Draw the J block if the robot rotates its wheels backwards 2.12 rotations and turns 90 ° right. Show R with the correct orientation.

      Grid containing a J block

      Two grids of five squares by five squares. The first grid has a J block occupying (2,4), (2,3), (3,3), this square labeled with R, and (4,3). The second grid is empty.

    4. Give the directions needed if the robot starts out in the first position and ends in the second position.

      Change in orientation of an L block

      Two grids of five squares by five squares. The first grid, labeled First Position, has an L block occupying (1,4), (2,4), this square labeled with R, (3,4), and (3,5). The second grid, labeled Second Position, has an L block occupying (2,3), (2,2), this square labeled with R, (2,1), and (3,1).

    5. Give the directions needed if the robot starts out in the first position and ends in the second position.

      Change in orientation of an O block

      Two grids of five squares by five squares. The first grid, labeled First Position, has an O block occupying (2,4), this square labeled with R, (3,4), (2,3), and (3,3). The second grid, labeled Second Position, has an O block occupying (2,5), (3,5), (2,4), and (3,4), this square labeled with R.

  5. During a science fair, the first step of the team's demonstration is for the robot to start at the top left corner of the playfield and then travel around the edge of the entire field. How far will the robot travel?

  6. The final demonstration of the robot is to move a T block from the top of the playing field to the bottom so that two full rows are completed. The robot is facing towards the right side of the playfield and centered under the square marked R. What commands should be given to the robot to properly place the block, which would result in the robot being centered in the square marked with an X?