Skip to content

Tobander/space_invaders

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
 
 
 
 

space_invaders

space_invaders.py is a simple version of the classic Space Invaders game produced by prompting the OpenAI Codex engine. I have not modified the generated code. Also, it doesn't show a score although i requested it in the prompt. 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.

Bildschirmfoto 2021-09-08 um 16 39 36

The prompt

#Define a python function for playing the classic Space Invaders.
#Display playing field using pygame library.
#Display a score.

import pygame

Prompt parameters

Response length: 225
Temperature: 0.5
Top P: 1
Frequency penalty: 0
Presence penalty: 0
Best of: 1

Gameplay:

Use arrow buttons to steer ship and spacebar to shoot. You lose when ship gets hit by enemy.

About

This is simple version of the classic Space Invaders game produced with OpenAI Codex model.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages