I was recently exploring new methods to test the coding capabilities of ChatGPT 4.0 and Gemini 1.5 Pro for a detailed comparison. Finally, I found a straightforward way to evaluate their vision and code generation skills using the popular arcade game, Breakout.
I started by downloading a screenshot of the Breakout game from Google. Then, I uploaded the screenshot to ChatGPT 4.0 and asked it to code the game in Python, as Python is easy to set up and run.
ChatGPT 4.0 quickly recognized the game and generated the complete code within seconds. I only needed to install one Python library called ‘pygame’ by running pip install pygame
. After that, I pasted the code into Notepad++, saved it as a .py
file, and it was ready to go.
After that, I opened the Terminal and executed the Python code. To my delight, the Breakout game ran successfully on my computer without any errors. It was fully functional, and I could use the navigation keys to move the paddle and keep the ball in play.
However, the game would abruptly close after I failed to save the ball. So, I asked ChatGPT 4.0 to add a Replay function. It added the Replay functionality with the “R” key and included a Quit function with the “Q” key. I then enhanced the game further with a scoring system.
Within just a few minutes, I was able to run and play the Breakout game on my PC, all thanks to the impressive ChatGPT 4.0 model. Despite my cursory knowledge of programming, I had no trouble getting it to work without any issues. As for Gemini 1.5 Pro, while it generated the code, it failed to run the game, which was quite disappointing.
I’m truly fascinated by the coding capabilities of the ChatGPT 4.0 model. Non-programmers can use it to create simple apps, extensions, and games for their own use cases. By the way, OpenAI has made the ChatGPT 4.0 model free for everyone. It’s a phased rollout, so free users will receive access over the coming weeks. You can start learning how to use the ChatGPT 4.0 model right away.