Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 4.01 KB

README.md

File metadata and controls

24 lines (19 loc) · 4.01 KB

GPT4Tetris v1.1 AI Generated Tetris Clone

The entire Python source code for this video game inside GPT4Python.py was generated from a single conversation with GPT4 via ChatGPT Premium. All of the features added, bug fixes and tweaks were done by just asking the AI for changes and describing issues so it could resolve them. I even was able to upload a screen shot for one of the bugs that it couldn't figure out and when it viewed the screen shot using the new vision feature it was able to immediately discover the bug and give me updated code that fixed it. AI is going to take all our jobs at some point so we might as well have some fun with it before it does. I want to interate just one more time that this entire source code including the comments were 100% generated by ChatGPT after going back and fourth about 50 times throughout the course of the conversation to get the final source code. The entire source code in the end was printed out with multiple "Continues" since the code was longer than a single response but what you see in the file is the unedited code from ChatGPT. How insane is this?!

How to run GPT4Tetris Game

  1. Download GPT4All.py to local directory
  2. Download Requirements.txt to same directory
  3. Install requirements [pip install -r requirements.txt]
  4. Run game [python.exe GPT4Tetris.py] -or- [pythonw.exe GPT4Tetris.py]

How to play

Left, Right Arrows - Rotate Pieces Down Arrow - Move piece down faster Space - Drop piece to final resting place indicated by Ghost You will see the next piece you will get after placing the current piece in the upper right corner Game speed will increase as you gain points until you fail (Press ESC to exit or P to play again)

Screen Shot

image image

Notes

If you enjoy this project please hit me up @barnacules on Twitter and let me know what you think. Also, I was able to get more bug fixes by talking to the AI more and more and I'll upload the final version later when I have more time to test it and make sure I didn't miss anything. But the few bugs that you do see are just due to some order of operations that got messed up when it output the final code and can easily be fixed by just changing the drawing order. But overall it's a fully functional Tetris game which is just amazing to me considering it was completely written by an AI by me just asking it for things. The future of software development is going to be language agnostic since you'll just basically describe the program and what it does and get the end result in any language for any platform at the rate things are evolving right now. Also, feel free to fork this to your hearts content and dump the entire source code into your own ChatGPT session or BingAI chat sessions and ask it to add features and functionality and play around with it yourself to see what you can come up with. GPT4 under a Premium OpenAI account will give you by far the best results but GPT 3.5 is still plenty capable for free.

Bug Fixes

Uploaded latest version after getting GPT to fix a few bugs, now 3d effect works on blocks as they fall, ghost now shows up indicating where blocks will fall and it's translucent, end screen animation is now correctly rendered. It's amazing what GPT4 can fix if you just keep asking it questions and describing the behavior when it's not correct so it can take another stab at it. Honestly, pretty soon you'll just be programming everything in your native spoken language like English or a psudo language that suits you and it will convert it to whatever is needs to run on any platform you need it to run on. AI is changing the world and coding is one of the biggest things it can do since now it can learn from the code it's writing and improve itself overtime by executing the code it writes locally on the server side and that is huge! I hope you enjoy this tiny demo of what can be done with ChatGPT without any coding knowledge.