 Welcome back to my channel. Well, you know, I'm very interested in chat AIs and all these chat bots going on in the industry today. So last week, well, last time, I think two weeks ago, I did a test where I asked ChatBT, Bing AI Chatbot, and Googlebot to write a recursive function in Python. And the result was that Googlebot was not able to write the code at all. So if you want to watch the video right here, I posted up two weeks ago. And you can see the result. So this time, I think just yesterday, we heard, well, actually, I read the news. There's an article saying that Googlebot is now able to write software code. Let me show you my screen here. We can take a look at artificial intelligence. Chatbot Googlebot is now able to help write software code. And that's great news, right? That's what we expect. And you can read the article here in full detail. But let's go ahead and see what that can really do. Last time we tested these right here, if you can see the same instructions. This time, I'm going to rephrase it just a little bit differently. And I hope that this will make it much clearer for these IAIs. So we're going to ask to write a recursive function again at Python, accepts two lists of numbers, and returns the list that has the least total gaps between the values of its elements. So for example, if we're given list A, 1, 2, 5, 9, and list B, 1, 2, 4, 8, the function should return list B because the total gaps between all the elements is only 4 as opposed to 5 and list A. So I'm going to copy this same paragraph instructions here. I'm going to paste it to one of those apps and we'll see what it gives us. So let's go over to Chat GPT first. I'm going to paste it right in here. And here we go. And let's see what happens. OK, as before, it's really fast. It is respond right away. And looking good. I do like the comments, the documentation, the explanation as well, just like before. OK, well, it doesn't even further, but it provides a modified version, which is very interesting. And I gave that example. Perfect. OK, so let's go ahead and test this. This is the modified version up here. And this is the original version. It doesn't really matter which one, I guess. But you do see that it is a function and it does the recursive call right here and right here. So that looks good. I'm going to go and just load the modified version down here. OK, so again, this is our base cases. Then so let's try this one. Copy it. All right, and then go back to the IDE and we'll paste it right above here. And then I'm going to call it down here. OK, so we'll do a result. It is going to be leased. Yeah, it is. And 1 and 2 and print the result. OK, so let's give it a try and see what happens. Well, it does it differently than I want to expect that. Let's go back and see what happens. Then not there, right? Yeah, it's supposed to print 1, 2, 4. And there's a comma missing here. I'm not sure what that is. OK, so somehow it's not giving me what I wanted, unless it's understanding my insertion incorrectly. Let's try the first one. OK, let's copy that and go back to this. Again, I'm going to turn all these off. And we'll add the second, the first one, the same function, least gaps, and 1 and 2 and OK. And let's see one more time. OK, so somehow it's like combining the two lists together and it's not doing what it's supposed to do, unless it doesn't understand my instruction correctly. OK, so yeah, the expected result should be just the end 2 here, right? It's appending what's before and then to the end 2. So it gave us a new list, and that's what I want. So for some reason, that one does not give me what I want. Oh, well, OK, let's try the other one. Let's go to the Bing chat, Bing AI. And here is the Bing chat. I'm going to again choose the precise mode and ask the same question and still thinking. So here we go. We see if this one understands what's asking. It's short, so it seems to be what it's supposed to be. Let's give it a try. It's much shorter, as you can see. So let's copy this. Is it this one here? Oh, I guess. I'll copy this and go back to the IDE. I want to paste it right above here and we'll call it down here just like before. So a result is going to be the least gap has 1 and 2. I want to print the result. OK. So let's try this one. I'm going to clear this console and let's see if this is correct. Wow. Yay. Bing AI actually understood my question exactly how I want it and returns the correct result. So great job for that one. OK, so now let's go ahead and do the same thing for Google Bard. OK, so cross your fingers. OK, here we go. I'm writing here. And so thinking. Great, he actually writes code better than the last time. And it just throws everything right at me. So it provides the PyDocs here, which is good. And our base cases. Hmm. OK, yeah, it doesn't really do the recursive call as I expected. Instead, it's using a zip function, which is a built-in function in Python that does the recursive call in here, I guess. So it's not understanding what I want it to do, because I want to write its own function like it does here and then call it, right? And then not using a built-in function like zip here. But let's see if this is correct, though. I mean, at least it writes a code and returns something what I wanted. Let's copy that. And let's give it a try and a bar over here. So it's called least gaps, same as before. So I'm going to go right down here, 1 and 2. And it should return the end 2. OK, let's clear the list and run. OK, so it does work. But again, this time it's not really using the function that it created, right? So it's supposed to call the list gap and does it recursively. Instead, it's using a for loop in here. And we'll call this a list comprehension, which is not what we want. So I'm going to ask again and say, you cannot use the zip and see what happens. OK, just curious. Rewrite using a without list comprehension. I'm afraid it's going to use a regular for loop. Yeah, it's still going to use a range function. It's used for loop. So yeah, it's not doing what it's supposed to do. It does give me the correct result back because this actually works. But then it didn't understand what it mean by using the recursive function that it creates. Maybe I should have said use the recursive function that you could call the function that you create, which in this case, so I guess it's more like a training process still. But theoretically, it should understand exactly what I wanted. OK, so what do you think, guys? Well, my impression is that chatGPT is still as fast as before, very quick to respond. The downside is that now it actually misunderstood the question and it gave me a wrong answer. I mean, it gave us a new list as opposed to returning one of the lists back. So that's incorrect. Google barred huge improvement. It was able to write the function as well as provide some documentations as well. The only thing is that it did not call the function. It created recursively. Instead, it uses a for loop and a list comprehension and then to do that process for us. So it does give the right result. Huge improvement, but it did not understand by what I mean by creating a recursive function and use that function. So I guess it's still learning in that department. But it's a huge improvement. And so Bay AI does exactly what I asked and it produced exactly what I expected as well. The code is very short and sweet and that's perfect. So the winner for this time is Bay AI Chatbot. Well, thank you and I hope you enjoy. Take it now. Bye.