4 ms·
Fun little experiment in letting GPT-4 edit a program by itself, a sort of feedback loop. But, it was really slow (and costly) to run, so I think my experimenta
by diggan 4y ago
Fun little experiment in letting GPT-4 edit a program by itself, a sort of feedback loop. But, it was really slow (and costly) to run, so I think my experimentation with it ends here.
In short, the program does the following:
- Suggest a improvement of the current program (all source code is being sent together with the "proposer" prompt)
- Take the proposal and expand on it, making it more explicit and some concrete steps
- Propose edits from said proposal that the program then uses to overwrite the local files
- Supervisor saves the changes and restarts the process.
- If the program crashes, takes too little time or otherwise seems broken, supervisor rollbacks the latest changes and restarts again
- phyalow 4y agoSo reinforcement learning…
- diggan 4y agoNot really. Although there is a state (the source code) and a action being performed (suggest improvement then suggest edits) there is no reward so it doesn't really optimize itself. But in some test runs it added code to evaluate how long time it took to run the full flow and started adding heuristics for choosing best edits, so I guess you could say it started doing reinforcement learning in some cases.
- RandomWorker 4y agoVery cool, did you try to add prompts such as try to add reasoning features; add creative features allowing you to reason about the meaning of life. Maybe it will come up with 42. :) Very cool little project
- diggan 4y agoNo, I tried to steer it from any specific goals to see what it would come up with "organically". Granted, it was JS so it mostly spent time trying to optimize for "code quality" and things like that. If the API wasn't so slow as to be frustrating and so expensive, I'd give it another go with some more direction, it's a fun idea :)