Putting GPT-4 to the Test - Can it code a complete game from scratch?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey it's Dave so open AI has just released gpt4 um and they had a live stream they had a blog post today I've been playing around with a gpt4 on chat GPT there's an option for plus users to use it um I think it's like 100 requests for every four hours or so so I wanted to test it out and I'm going to give a real-time demo I don't know how this is going to work out so I'll show you what I have so far and then we'll see how it turns out so give me a super detailed description of a game that can be coded in 150 lines or less in a one-page HTML Javascript file says color match so let's I'll go over this game I haven't read it but I want the code as well so I say um um I was a draft um the full one page HTML Java Script bio for this game okay so now it's gonna be um basically coding uh this game so prior to this I was kind of coming coming up with my own games and I noticed sometimes it's hard sometimes to have a fully descriptive game with all of the different you know uh elements of the game and you can take time to do that but I wanted to do a shortcut and I had cat GPT basically or gpt4 create um a very descriptive right um uh draft of the game in text and then I'm having um gpt4 code the game based off of the descriptive text that they've given here's a few observations first off is a gpt4 it seems to be us a bit slower right now than gpt3 actually significantly slower I'm guessing they will work on this um you're gonna see this improve I think radically in the next few weeks a few months as well as they roll out um usage as well um and a few other things is I've tested a couple other type of um games not related to this but just some ideas I've noticed that chat GPT or gpt4 gives significantly more reliable code um it's not perfect um yet there's still some limitations Etc it doesn't always do exactly what you want to do but I'm very impressed with the results right now so what is uh gpt4 doing so let's look at some of this code here so um it basically is giving you know the first intro HTML it starts with the head section um it goes into style so it's actually giving all of the style of the font the placements all that stuff um in a single file which I asked for rather than a separate right a CSS file so you've got the body it's uh determining the font um the color background you got a container you got this you've got some buttons here and that's the end of the style button style section and now you're going into the body um it says opening the body tag we've got color match is going to be the title of the game and we got some different um classes opening up here you have a start reset button best time so it's going to keep track of time and here's the script so we're having JavaScript just stuck into the one page file just wanted to make it super simple so it gives different colors here and oh so it stopped so I'm gonna say um is that the complete code yeah so here's one of the problems with um with um gpt4 or gpt3 3.5 it really cut off code a lot gpt4 in my limited experience it's much better but still does that um a decent amount of time especially if the code is long so that's an issue so anyways let's look at this game what this game is so this is a color match game where players need to quickly match a Target color by adjusting the RGB sliders the goal is to match the target color in the shortest amount of time possible so you've got Target color box um you got the current color box and you got these rgtv sliders you have a timer start reset button score display okay not bad so the player starts um clicks the start reset button to start the game the target color boss displays are randomly generated color the timer starts counting uh the player tries to adjust the RGB sliders to match the color and when they uh matches the target color the timer stops um yeah so oh it tells me the HTML structures of how it's going to do it and it's going to tell me the JavaScript implementation what it's going to do um and it's telling me the CSS styling as well so not bad actually gpt4 um all right so this was the incomplete code let's look at this complete code here all right so here's what I'm going to do I'm going to pause this um while it finishes it and then after it finishes I'm going to unpause the video and we can look at the all right so um I'm unpausing so gpt4 had a bit of a problem and kept on cutting off um the one page so I had it separated into HTML CSS and JavaScript files separately so it did that so here's the HTML file here I'll go ahead I'm going to create a replit so here in replit you can create um we'll call it GPT color match I'll go ahead and make it private for now and then we're going to copy the files into this is the HTML file let's go back let's copy this into the CSS here let me just make sure um yeah color match.css so I need to I need to copy this is color match.css so I need to rename rename this color match we'll go back to the JavaScript file here's the yeah this is the complete Javascript file here we're going to go back into here copy it into here but I need to find out what the JavaScript file name is says Chavez colormatch.js I'm going to rename it that and then I'm going to run the program let's see oh my goodness so here is this color match game very cool so let's start and reset so I'm gonna have to it's this color you kidding me come on that's good enough no you're kidding me this game is way no come on that's like that's about right yeah this is this is ridiculous how can you make it how can you match it perfectly I that's almost perfect oh man it needs a little bit more red come on right there that looks pretty good a little bit of blue yeah that's pretty much a match anyways yeah this is a faulty game but impressive by um by um gpt4 all right let's do another um another game here another thing so we go to new chat we have to manually select gpt4 there's a cap of a hundred messages per hour so I'm gonna do this um I'm gonna make a HTML JavaScript webpage that lets the user input a paragraph to text submit press submit and then make and then the web page will display the text and read each word of the text for the user while highlighting the word it's reading all right so um yeah this is just something I took on my notes since I I don't know what um it's going to do here but let's um yeah I'll go ahead and look at what it's producing here so we're going to have a HTML file first you'll notice it's creating the head section the title is text reader it's going to have a yellow background it's going into the body it's going to have text reader text it's going to give you input area of six rows 50 columns submit text submit button and it's going to go and load the JavaScript okay not bad um and here's the Javascript file it's going to say okay after submitting the text you take the input text when you got output text and then here's enter some text um it's giving reading words it's going to Output okay it's going to highlight wow now if this can really highlight the words while it's reading it's actually going to be quite impressive this is not actually that straightforward of a of a task okay well we'll see how it does so let's go ahead we'll create another um replit file here I'm going to call this GPT read story okay so let's go back and let's copy this HTML file okay we got that done we're going to copy the scripts.js file okay now we can run it okay all right so here's a text reader interesting so let's go ahead and have Chachi pt4 create a quick story so create a super funny story in five sentences or less that contains the characters Biden and Biden and Trump okay all right so here's I noticed gpt4 actually creates much better stories than GPT 3 or 3.5 there's something about it where it understands I think humor better and what makes things funny um that's actually one of the most impressive First Impressions that I have of chat GPT or gpt4 I haven't read this yet so I'm going to go ahead copy this and then stick it in here and then let's submit this one day Trump Ann Biden tired of their political differences decided to join forces and enter a pie baking competition for charity two the surprise of all they named their team the presidential Bakers the crowd couldn't believe their eyes as the to politicians danced around the kitchen tossing doe and cracking jokes bot in a hilarious twist they accidentally switched pies age baking the others signature flavor the judges couldn't stop laughing when they tested trumps Biden Barry delight and bidens Trump Tower Apple explosion not bad um quite impressive so let's um change this around um let's change the code to Maybe highlight each sentence as it is red not each word and when the web page reads the paragraph let's have it read each sentence rather than each word separately okay all right so let's see what um okay so it's going to give us the new JavaScript file to modify the code and highlight so you can read each sentence yes I noticed that it's reading each word it's just kind of like I think what it's doing is it's basically saying the word and highlighting the word and stopping right and doing and that's why it got this choppiness to it um yeah it's probably gonna be hard with because they're using just the web page or the web just web text-to-speech probably capabilities which doesn't have a lot probably to natively kind of highlight and know which word is being read so I'm just going to change it to read each sentence and highlight each sentence let's go back to JavaScript and let's run it okay let's go ahead to um do the Trump one day Trump and Biden tired of their political differences decided to join forces and enter a pie baking competition for charity to the surprise of all they named their team the presidential Bakers the crowd couldn't believe their eyes as the two politicians danced around the kitchen tossing dough and cracking jokes but in a hilarious twist they accidentally switched pies each baking the other signature flavor the judges couldn't stop laughing when they tested Trump's bite and very delight and Biden's Trump Tower Apple explosion all right so you notice that the reading is much more fluent even the the limitation is the web um is these web browsers um functionality with Texas speech it's not that great so anyways it it actually did a great job actually making this app in what like a minute just pumped it out um quite impressive so let's do a couple other things so let's do this let's um let's say please make um a prompt so that I can input it into dolly and get an image for this story please make the prompt very specific and detailed regarding the specific image image okay all right so it says create an image with Trump and Biden wearing aprons and Chef hats standing side by side in a lively kitchen enthusiastically tossing dough in the air they are surrounded by ingredients like berries and apples with two pies on the counter that's like crazy I don't think AI is ready to make that type of image um yeah that's quite complex there all right so for the heck of it I just inputted that prompt into mid-journey and these are the images that I got um yeah mid Journey doesn't do the text well right now but yeah it's actually you know not bad in terms of images um it's not really I didn't Trump yet but anyways mid-journey is a supposedly coming up with version five um this week or next week and supposedly version five of my journey is going to be a significant jump uh Next Level I mean we're talking about AI is just going crazy we're talking about next level gpt4 Next Level image creation Next Level we're gonna have music Christian video creation um the stuff that's happening every month um is astounding the pace of AI anyways hope this was um helpful quick kind of intro into chat GPT or chat um actually GPT 4.0 um and yeah we'll see how this goes and what kind of new capabilities people unfold
Info
Channel: Dave Lee on Life
Views: 74,365
Rating: undefined out of 5
Keywords:
Id: LWxU8xES38I
Channel Id: undefined
Length: 17min 0sec (1020 seconds)
Published: Tue Mar 14 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.