Do you remember Pong? Based on ping pong, it was one of the first video games that appeared in arcades, bars, airports and many other places back in 1972. It was a huge success for Atari and has been credited with starting the video game revolution.
I wondered if I could write some code to play this game in a web browser. First though, I asked ChatGPT about it. About 15 seconds later, the AI chatbot replied “Here’s a simple implementation of the classic game Pong” and JavaScript code started scrolling down the screen. This was pretty impressive.
I had seen reports that ChatGPT and other Large Language Models (LLM) could write code. People were predicting that AI would take over a lot of software development and that programmers would be replaced. I had tried a few coding examples myself in the past, with mixed success. I reserved judgment and remained skeptical.
Then a few months ago, Google revealed that about 25% of their code was being created by AI. This was not a rumour or some offhand comment from a Google engineer. It had been boldly stated by Sundar Pichai, the CEO of Google. This claim could not be dispelled so easily.
So should programmers be fearful of losing their jobs in the new AI world?
No.
There’s still some hype in these headlines. There is even hype in my own simple Pong! headline, in that although the dramatic result is true, it is not the whole story.
Yes, ChatGPT produced some running code, but there were a number of things that didn’t work that well, to the extent that nobody would really spend much time playing it. One major problem was a delay in moving the player’s paddle which was annoying and made it hard to hit the ball. Another problem was that the ball would often fall into a repetitive trajectory so that you didn’t even have to move your paddle to keep hitting it.
I explained these problems to ChatGPT, and it replied with some changes for the code that eventually addressed all the problems I found. The end result was a real playable game.
This highlights the fact that AI is not an independent, automatic force that is in competition with humans and threatens our livelihood and existence. Rather AI is a tool, in fact a collaborator, that allows humans to work more productively and do things that they could not easily do before.
Here is a transcript of my conversation with ChatGPT. You don’t need to understand the code to follow the communication between human and AI, a collaboration that produced the real solution.
If you’re not convinced and are still worried that AI is a threat to humans (here comes HAL), do something to combat climate change. The unrelenting pace of global warming is a far, far greater threat to human existence than is AI.
But enough talk. Get on with the game!
To play Pong, simply DOWNLOAD this file. If it doesn’t automatically open in your browser, double click the file Pong.html in your download folder to open it in your browser. Use the up and down arrow keys to move your paddle. If you don’t hit the ball before it hits the wall, the opposition will score a point.
It’s still a great game, even after all these years.
Good luck!
I have recently downloaded chatgpt and with no training and very poor computer skills I have been using it to help me diagnose patients with complex problems and I have found it extremely helpful. It usually gets the same diagnosis that I got, but it includes several that I had not thought of, Some of them are clearly wrong but many are quite reasonable! Last week a patient of mine with a complex medical problem consulted chatgpt before our visit and he showed me his entire conversation with chatgpt and chatgpt had gotten it exactly right. The way I see it now is that chatgpt can be used both me and my patients to result in improved medical care and now chatgpt is updated until Oct 2023, which for most medical conditions is current enough!
One major concern that I have is that this is all happening too quickly. Two months ago I wasn’t seeing this sort of thing. I just can’t fathom what things are going to look like even six months from now, but I can tell you one thing,,,it’s going to be a really exciting adventure!!!!
the convo with Chat AI is amazing. I am impressed by the sophisticated responses and adjustments that were made, directly addressing your concerns. Its all, to repeat myself, quite mind boggling.
I saw an ad on tv the other day for Coca Cola and it said it was made by AI…..I guess that will be more and more the case…Nephew Marc says he uses AI somehow in his work, and he says if I send him a pdf of some music, his AI can transpose it to a different key – This would save me alot of work sometimes because now I gotta type in each note etc….so I may get dragged further into the 21st century!
Keep up the blogs!
e