Skip to content

vertinski/tetris_game

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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.

About

This is a first Tetris Game code produced with OpenAI Codex model

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages