Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 944 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 944 Bytes

Tetris Game

  

tetris_game.py is a Tetris Game code produced by prompting the OpenAI Codex engine. I have not modified the generated code. Also, there was a graphic glitch while clearing the bottom line.
Codex is an AI system that translates natural language to code. In this case it's Python code. The prompt is a text snippet that is fed to the Codex engine for completion. Completed text is a program code or script, etc.

The prompt

#Define a python function which is a very compact tetris game.
#Display playing field using pygame library.

import pygame

Prompt parameters

Temperature: 0.7
Top P: 1
Frequency penalty: 0
Presence penalty: 0
Best of: 1

(Response length can be adjusted as needed)

Gameplay: Use arrow buttons to navigate the shapes. Stack shapes flawlessly to clear more lines.