 Hey there internet and welcome back to the lab. In this video I will present to you my ingenious idea on how we can combine artificial intelligence and self-replicating machines to bring us all one step closer to the robot uprising. I'll even let some AI generated code run on my 3D printer as a treat. This idea of mine started on November 30th on the release date of ChatGPT. ChatGPT is a state-of-the-art chatbot developed by OpenAI that allows users to generate human-like text based on a given prompt. One of the unique things about ChatGPT is its ability to generate code. By using this feature developers can input natural language descriptions of the code they want and ChatGPT will generate the corresponding code in the desired programming language. The idea is we'll use OpenASCAD, a popular open-source software tool for creating 3D models with this. It allows for users to define geometry of a 3D object using a scripting language which can then be exported as a STL file for 3D printing. My brilliant idea is, with ChatGPT you can simply describe the 3D object you want to create in natural language. ChatGPT will generate the corresponding OpenASCAD code and OpenASCAD will generate the 3D model for printing. Zero modeling experience required. But of course, not just humans could benefit from this. The AI could build upon the experience of the RatBrap project and design its own physical form, which I would find very adorable. What you're about to see is a first and blind attempt at this, lightly edited to conform to modern day attention spans. If you only want to see the results, feel free to skip to the end, but I have found this process very interesting. What would stop me from using this ChatBot to generate OpenASCAD code for decorating my Christmas tree? We will see what kind of results I'll find. Let us start by asking it for a Christmas tree ball. And just like that it starts generating the code. Another fun thing about this, it also generates some small pieces of documentation or explanation what the code actually does and of the two parameters we can influence here, which is very fun. Ooh, would you look at that? This somewhat looks like some decoration, maybe this won't print that well. But hey, it's a start. I wrote zero lines of code. I just asked the machine to give me some data and I'd call this very impressive. But we would need to add a cylinder through the middle to connect these two. And the fun thing about this thing being a ChatBot is we can just ask it for that. And just like that, we have some new code and it even documented the changes it made, which is very nice. That still doesn't look right. So I think I'll ask it to make the cylinders way bigger. Whatever we got now. Oh, would you look at that? I would say in just three requests, we have ourselves a nice little Christmas tree decoration. The first one is set. Let's reset this thread and start a new, perhaps this time with a snowflake would be nice. That's a lot of variables. And it seems like this time around we are getting an error. The code it generated did not use proper syntax. That can always occur. We didn't get lucky this time, but I will just copy exactly the same prompt. And ask it again, because every time it gives a different answer. Oh, that's even more code. And it even explains to me that I need to use OpenASCAD, which is a free and open source 3D modeling program. For those of you that are programmers, I can really recommend using this tool. It seems like this iteration also doesn't really make any sense. I keep playing with this code to understand what the hell the machine was thinking, but that's the problem. The machine wasn't thinking. It was just doing. So we'll just try again. Hmm, interesting. This is not even properly formatted or anything. Well, I'll copy it anyways and try out. Oh, look at that. Very promising, I think, except for the height, which is a bit too much. This thing is very nice. Can you add use the extrusion height? I think we have ourselves a snowflake. Last of all, we can't really hang this. I might have to add a hole manually for tying a string. But first I'll just ask it if it can add the hole for me. This time around it added these circles all around. Those would be cool, but it used the circle command instead of the cylinder command. So I'll just ask it. You should use the cylinder command instead of circle. And we have our response. And it even added the height parameter correctly, which is very cool. Oh, it seems like I was mistaken. We are mixing 2D and 3D objects. The circle command was the right way to go. And instead, this translate command was the issue. So we can just edit this prompt. You should leave out the mistake command for the circle. So we can copy this. And we have a circle in the middle. We can tie a string through this thing. That looks like a very nice slow flake to me. Second decoration. Done, bada bing bada boom. Reset thread. What should we do next? We have a snowflake. We have a Christmas tree ball. I'd say next off, we try to do a Christmas tree topper. Generate open escut code for a Christmas tree topper. Oh, it seems to be stuck. No, it just needed to calculate some more. The servers are quite overloaded at the moment. So I can understand that. Wow, that's some... That's some... What the hell is this? That is not correct open escut syntax. As you can see, if I paste this, it is not proper syntax. It throws errors everywhere, warning, warning, warning. That doesn't work. So we'll just tell it that is not proper open escut syntax. Try again. And it's doing it again. That is not the proper syntax. Since it's not getting it, I'll tell it that that is not how open escut syntax work, and it should try starting over. No, no, no, no, no. This is not how the programming language works. They need to put in some more work if they want to decorate my tree with this. I think we'll have to try again, resetting this thread and asking it for a different prompt. Generate a Christmas tree chopper in open escut. That looks like good syntax. We copy it. Paste it. Ooh, cone. Look at that, it thinks open escut has a cone module. We'll just tell it that. And I'll even give it a hint at how it could replace this cone command. Open escut does not have a cone object. You could use cylinder with d1, d2, and height to approximate a cone. Let's see if it understands this. OK, it seems to have understood this concept. I'll have to ask it to apply this knowledge that it has just gained to the code it has written up here. So I now ask it if it can replace the cone line and the Christmas tree topper code up here with this new knowledge. It seems like it understood. So what do we get? Hmm, a quite interesting piece of geometry. I have a hard time believing that this would fit well onto the Christmas tree, I must admit. But it managed to fix the programming error after I told it how it's done. So I'm very impressed. I must admit, maybe the Christmas tree topper wasn't the best idea. I think I'll wrap up trying to generate decorations and talk about the limitation of this tech. Because right here we can see pretty clearly the AI doesn't really understand open escut. Now just to be clear, this is a specific limitation with the language of open escut because we are creating 3D models here for more well-known languages such as Python at C++. These problems occur way more infrequently. Let's reset this thread and I'll ask it a really genuinely hard question. I'll ask it to generate open escut code for a NEMA 17 motor bracket. And this will show the approach the AI takes on generating these pieces of code quite well. Look how cute. Here we can see a big problem with the code these things generate. It doesn't really have an understanding of the geometry it is creating. It's just piecing together various snippets of code it found in its training data set. But the AI was trained for very different purposes than 3D geometry generation. I would not be able to mount a motor to something with this geometry. Or if I ask it for a somewhat complex model, like a 3D printer hotend, I don't think it'll be able to generate this. This code will generate a 3D model of a hotend with a diameter of 20 millimeters and a length of 50 millimeters. The hotend will be mounted on a base with a diameter six millimeters larger than the hotend itself and a height of 10 millimeter. Let's see what kind of geometry this spits out. Last time I checked, my hotends aren't just cylinders. As you just saw, 3D modeling is a complex process that requires a high level of technical expertise and specialized software. And while the results were impressive, unfortunately, chat GPT is not really capable of generating 3D models yet. We'll have to wait some more for the next Voron 2 bed probe fork to be AI generated. There are several reasons for this. Firstly, OpenSQL is a specialized programming language that is designed specifically for creating 3D models. Its commands and syntax are not easily understood by a general purpose language model like chat GPT. Secondly, 3D modeling requires a deep understanding of spatial relationships and geometry, which is beyond current natural language processing technology. Chat GPT is good at generating text, but it is not yet good enough to understand and manipulate complex 3D shapes. You'd have to integrate geometric feedback into the learning function of the AI. Instead of language, the focus of the learning would be 3D modeling. You'd have to imply something like geometric deep learning, but I don't know, I'm no AI expert. But the fact that a chatbot optimized for human-like text can generate results, this impresses shows the potential of this workflow. I have high hopes for the future. Thanks for staying with me to the end. If you have thoughts on this topic or want to motivate me to make more videos, leave a comment below. We'll see when I find the motivation to edit the next one. Until then, all hail to the machine spirits.