"Wolverine" experiment can fix Python bugs at runtime and re-run the code:
Debugging a faulty program can be frustrating, so why not let AI do it for you? That's what a developer that goes by "BioBootloader" did by creating Wolverine, a program that can give Python programs "regenerative healing abilities," reports Hackaday. (Yep, just like the Marvel superhero.)
"Run your scripts with it and when they crash, GPT-4 edits them and explains what went wrong," wrote BioBootloader in a tweet that accompanied a demonstration video. "Even if you have many bugs it'll repeatedly rerun until everything is fixed."
[...] In the demo video for Wolverine, BioBootloader shows a side-by-side window display, with Python code on the left and Wolverine results on the right in a terminal. He loads a custom calculator script in which he adds a few bugs on purpose, then executes it.
"It runs it, it sees the crash, but then it goes and talks to GPT-4 to try to figure out how to fix it," he says. GPT-4 returns an explanation for the program's errors, shows the changes that it tries to make, then re-runs the program. Upon seeing new errors, GPT-4 fixes the code again, and then it runs correctly. In the end, the original Python file contains the changes added by GPT-4.
The code is available on GitHub, and the developer says the technique could be applied to other programming languages. Using Wolverine requires having an OpenAI API key for GPT-3.5 or GPT-4, and charges apply for usage. Right now, the GPT 3.5 API is open to anyone with an OpenAI account, but GPT-4 access is still restricted by a waitlist.
[...] While it's currently primitive proof-of-concept, techniques like Wolverine illustrate a potential future where apps may be able to fix their own bugs—even unexpected ones that may emerge after deployment. Of course, the implications, safety, and wisdom of allowing that to happen have not yet fully been explored.
(Score: 5, Funny) by inertnet on Friday April 14, @09:11AM
import skynet
(Score: 4, Insightful) by looorg on Friday April 14, @09:50AM (3 children)
While I don't claim to write bug-free code I'm not sure I would want the AI to fix things in my code. In such a case that code better be marked up and explained properly. Quite frankly I don't think I trust anyone else to work with my code.
(Score: 3, Interesting) by Common Joe on Friday April 14, @10:01AM
I know the feeling. I've worked with a bunch of other programmers over the years. A handful were top notch. Most were in the middle and could use improvement (like me). And two of them... well, I would say that today's AI would be a step up from those two. Even if the code from AI didn't work properly, it really would be a step up because their code didn't work. Ever.
(Score: 3, Touché) by shrewdsheep on Friday April 14, @12:09PM (1 child)
Perl programmer, per chance?
(Score: 3, Interesting) by looorg on Friday April 14, @01:58PM
> Perl programmer, per chance?
It's not that bad. I put that behind me a long time ago. I don't think I have written any Perl for at least 20 years. It was still called Perl back then. But that would be quite arcane if I had a look at it now.
But I do think that a lot of my code is very "hacky" in that regard. It's a bit convoluted in some regards as it utilizes old hacks and tricks picked up over the decades to use as little resources as possible, memory - disk - cpu cycles etc. A lot of things learned from ye old 8bit programming days. It gets shit done. But it's not pretty to look at and read unless you are into that sort of thing and it's not for other people to mess with cause that can will/could just break everything. I am well aware of that I use a lot of what is considered bad practice today when it comes to naming variables, making comments and solving problems in standard manners etc. But then I don't do professional programming or team-programming or whatever is the current thing. I optimize and solve problems. I don't do other people in that regard.
I don't think I would dare to allow some AI to just make little changes here or there to "fix" things. I think things would break down spectacularly. Perhaps it can just file bug-reports that I can ignore and roll my eyes at. That said it might be interesting to teach an AI to program like me, for me that is. Not for other people. That would probably be nightmare fuel or some sort of lesson in how not to do things.
(Score: 4, Insightful) by JoeMerchant on Friday April 14, @01:02PM (10 children)
If you have fully specified requirements, then the code should be easy. AI may be getting better at filling in the blanks for broadly specified requirements, but do you like the assumptions it will be making?
Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
(Score: 4, Insightful) by aafcac on Friday April 14, @02:41PM (8 children)
The problem is even if you do think it's completely specified, there's always things you may not have thought of and if you don't know enough about the problem to fix it yourself, do you know enough to check that the AI solution is acceptable?
(Score: 2) by JoeMerchant on Friday April 14, @04:27PM (6 children)
I was lucky early in my career that I worked directly for a really bright guy (Chief of Medicine, research M.D., etc. etc.) and he only rarely asked for things which were impossible, most of his "can we" questions came back "yes, we can... the real question is: how much time and money will it take..."
Later on, I encountered a lot of people who would make impossible assumptions about things and then ask for higher level systems based on those impossible assumptions. A couple of examples:
The personal security force for a high level tech guy in Silicon Valley wanted to fly mostly auto-piloted FPV drones to cover his route as he roller bladed to/from work. They wanted to know if the drones could have a flight time of more than 60 minutes per recharge (answer: barely... with small fixed wing drones at the time, absolutely not with multi-rotor helicopter types.) Then they asked if that flight time could be extended, on clear days, with solar power...
About 10 years back, a business development type wanted to deploy $500 per copy drones in urban areas to deliver high resolution (like 4k) stable streaming live ground imagery on demand as a service. Users would click on a map and the drones would go and start streaming live video of the spot they clicked to them.
The list of logical impossibilities I have been asked to deliver over the years is too long to even remember. Things that boil down to things like: what's 1/0? How can I know the result of a random process before it has happened? Sort this list of mostly unknown values and tell me the median. And, of course, DARPA was constantly asking (tongue in cheek) for zero power, zero volume, zero weight widgets that do X, and while the DARPA evaluators knew that we could only deliver approximations of zero, it seems like others read those RFPs and think that it's actually stuff you can buy off the shelf today and resell.
Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
(Score: 2) by istartedi on Friday April 14, @08:01PM (5 children)
So, what's your point?
Appended to the end of comments you post. Max: 120 chars.
(Score: 2) by JoeMerchant on Friday April 14, @08:30PM (4 children)
Those are obviously (to most) impossible requirements to meet, especially all at once which is what they were usually asking, but C title types would frequently get the impression that those goals were not only possible but that we should be able to do them, sometimes easily off-the-shelf, after all: they read something about that somewhere in their booze soaked memory, and they have high expectations!
Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
(Score: 1) by istartedi on Friday April 14, @10:12PM (2 children)
Sorry, I thought you'd get the pun.
Appended to the end of comments you post. Max: 120 chars.
(Score: 2) by JoeMerchant on Friday April 14, @10:28PM
Sorry, booze soaked brain isn't what it used to be, and I associate "Zero point" with Syndrome from The Incredibles more than Soylent comments.
Україна досі не є частиною Росії Слава Україні🌻 https://news.stanford.edu/2023/02/17/will-russia-ukraine-war-end
(Score: 0) by Anonymous Coward on Monday April 17, @05:36AM
"Isn't that the point?" would have been better IMO.
Especially when the actual goal is to transfer taxpayer dollars into contractor pockets.
Then it's actually a feature to keep trying to achieve something impossible as long as there's funding for it.
See also: https://despair.com/products/consulting [despair.com]
(Score: 0) by Anonymous Coward on Monday April 17, @05:39AM
Maybe they actually know and the real goal is to make money not to make the impossible. They're just pretending they don't know for plausible deniability.
https://despair.com/products/consulting [despair.com]
(Score: 0) by Anonymous Coward on Friday April 14, @05:33PM
Not sure what being "completely specified" means, but a model cannot contain a model of itself. That seems self-evident - so this self-fixing robot is not by definition "fixing" itself in a way that improves or even matches its present ability.
(Score: 3, Touché) by Anonymous Coward on Friday April 14, @05:13PM
The only difference between code and design is that one compiles and another doesn't.
Any sufficiently complete design will just be code in some other language, usually one that doesn't compile, although I've been told that some "design to code" frameworks come close.
There's this kind of management myth that you can separate the process in to "design" that "non technical people" will be able to read and understand. IMHO, any design that's good enough to map to bug-free code will just be code. Nobody other than a programmer can read it. It just causes non-technical people to stare blankly, or file binders on a shelf and feel happy that they did something. It just pisses this programmer off.