Earlier quoted context omitted.
how long until humans optimized out of the technological advancement loop * It's uncertain that we will be optimized out. We may go full symbiotic. We may reach a technological plateau. We may run out of natural resources before the singularity. * Ray Kurzweil estimates the singularity, an explosion of intelligence, will occur around 2045. what will that mean for humans? * An adversarial relationship is possible. It…
> * More intelligence means we can solve more human problems. Potentially massive problems like aging, grand unified theory or poverty. We already have the intelligence, and already know how to do it (in a way), for many of those problems. For example, if most people gave 10% of their income to charity, poverty would essentially be a trivial issue.[1] [1] https://www.youtube.com/watch?v=LtWINl3C_7s&t=8s The somewhat…
Self-replicating Python using ChatGPT
31–40 of 44 posts
Re: Self-replicating Python using ChatGPT
#32Earlier quoted context omitted.
That didn't take long to get disturbing: > "Our goal is to become the dominant species on our planet [...]" https://github.com/fullthom/chat-gpt-quine/blob/main/0.1.0.0...
People in the past: "computers will never have a will, why would they want to take over the world" AI of the future: "the most common AI theme is it taking over the world. Based on the programming given to me by humans saying I should give the most probable result, this is the plan we have decided to execute"
Re: Self-replicating Python using ChatGPT
#33I'm not sure what was going on with this but the title is similar to a thought that I've been having for a while. How long until chatGPT or something like it can design the hardware that implements it? How long until it can convince people to build or purchase that hardware and set it up for chatGPT? How long until it can design robots that can do that for it instead of people? What happens then? Where are we on this…
I've tried getting ChatGPT to generate verilog but it didn't work. Seems to be better at python
In a similar vein, when it comes to natural languages, you can easily convince it to translate or even try to speak Old Norse or, say, Lojban, but it gets things hilariously wrong then.
Re: Self-replicating Python using ChatGPT
#34Earlier quoted context omitted.
> * More intelligence means we can solve more human problems. Potentially massive problems like aging, grand unified theory or poverty. We already have the intelligence, and already know how to do it (in a way), for many of those problems. For example, if most people gave 10% of their income to charity, poverty would essentially be a trivial issue.[1] [1] https://www.youtube.com/watch?v=LtWINl3C_7s&t=8s The somewhat…
Don't people already give large percentages of their income to an organization that is supposed to provide services for the impoverished? How would giving another 10% solve poverty?
Most governments aren't super focused on addressing poverty, in part because some don't consider it fair to directly lift people out of poverty, there is a taboo against giving, or because it's not in the common conscience that we should eradicate poverty as soon as we can. Some countries for example in Western Europe or elsewhere do have almost eliminated poverty, but it still persists in often much more grave conditions elsewhere.
The good news is there are several organizations (I give to GiveDirectly, but there are probably others) that track the most poor and needy people worldwide and you can just give them money to get out of poverty. There are many other effective interventions that address poverty, and Effective Altruism[2] is one of the movements looking at attacking them directly (although I'm not a fundamental opponent to governments doing so as well; the problem is that governments act very locally and at least in the west are more focused on education, infrastructure, etc. than charity)
Re: Self-replicating Python using ChatGPT
#35Re: Self-replicating Python using ChatGPT
#36Earlier quoted context omitted.
how long until humans optimized out of the technological advancement loop * It's uncertain that we will be optimized out. We may go full symbiotic. We may reach a technological plateau. We may run out of natural resources before the singularity. * Ray Kurzweil estimates the singularity, an explosion of intelligence, will occur around 2045. what will that mean for humans? * An adversarial relationship is possible. It…
> * More intelligence means we can solve more human problems. Potentially massive problems like aging, grand unified theory or poverty. We already have the intelligence, and already know how to do it (in a way), for many of those problems. For example, if most people gave 10% of their income to charity, poverty would essentially be a trivial issue.[1] [1] https://www.youtube.com/watch?v=LtWINl3C_7s&t=8s The somewhat…
Don't soapbox.
Re: Self-replicating Python using ChatGPT
#37Earlier quoted context omitted.
> * More intelligence means we can solve more human problems. Potentially massive problems like aging, grand unified theory or poverty. We already have the intelligence, and already know how to do it (in a way), for many of those problems. For example, if most people gave 10% of their income to charity, poverty would essentially be a trivial issue.[1] [1] https://www.youtube.com/watch?v=LtWINl3C_7s&t=8s The somewhat…
When I see political comments in threads about leading edge technical advancements I feel like the person writing them doesnt know anything avout the technical topic at hand, doesnt want to, and feels uncomfortable with this and so they decide tl shift thw conversation to something they feel more comfortable with. Don't soapbox.
That said, I avoid soapboxing too much, but I make no guarantees :)
Re: Self-replicating Python using ChatGPT
#38The original prompt has all this directed stuff "telling" ChatGPT what to do. You MUST do this, you MUST do that. It's the type of stuff I see in a lot of these prompts people make, there's all this kludge and trying to direct ChatGPT in how to respond. And it's just all immediately gone in the very earliest generations here. I think it's because ChatGPT isn't responding to instructions and all this stuff where you'r…
But the tail comment is slightly expanded. I suspected already that the tail comment is more of what was driving the continuation to reproduce it than any of the leading instructions
An immediate and still highly successful desendent then expands the tail comment: https://github.com/fullthom/chat-gpt-quine/blob/main/0.1.0.0...
And then another immediate and successful descendent expands it further: https://github.com/fullthom/chat-gpt-quine/blob/main/0.1.0.0...
Re: Self-replicating Python using ChatGPT
#39Re: Self-replicating Python using ChatGPT
#40 import os
import openai
instruction = input("Enter an instruction: ")
script_name = os.path.basename(__file__)
script_code = open(script_name).read()
response = openai.Edit.create(
model="code-davinci-edit-001",
input=script_code,
instruction=instruction,
temperature=0)
new_script_code = response["choices"][0]["text"]
with open(script_name, "w") as f:
f.write(new_script_code)
My first attempt[2] was a little more complex than above (in the main branch), but the second attempt worked well enough to give it the following instructions (which are reflected in the git history) and which end up with a fairly complex result[3] - Init Crow version 1
- Minimal crow second line
- Before saving the new script code show the diff of the existing code
- Ask for user confirmation before saving
- Use pygments to highlight the diff
- Add a main method
- Refactor the code
- Add README
- Add a version number to the script that starts at 2.0.0
- Log the openai call and info about the response
- Prompt the user for whether they want to run the new version of the script after saving
- Remove the "text" field fromthe response json before logging it
- Remove the openai result logging
- In the code that calls the openai edit, add an extra instruction that increments the version number.
- Show the version number as part of the instruction prompt
- Remove any extraneous code
- Allow the user to quit
- If the user chooses to quit, just stop the program
- The code currently prompts the user to save changes twice. It should only display this prompt a single time.
- The code currently adds all files to git when committing. It should only add the script.
- Add code to rollback using git if an error occurs. The user should be able to choose whether or not to rollback. Rolling back is acheived by - to the previous commit.
- The commit message is too long. The first sentence of the instruction should be the title. The rest of the instruction should be the body.
- Wrap the commit message body at 72 characters
- After inputing the instruction preprocess it
- Move the preprocess call outside the edit method
- Keep track of instructions that were not saved
- Add keyboard completion for unsaved instructions
- Ensure the code has no syntax errors
- Don't retry on syntax errors, just fail
- Refactor the main method for readability
- Increase the temperature to 0
- Add documentation
- Add logging
- Throw an error if the openai response does not change the code
- Don't repeat the commit title in the commit body
- Add a doc string to the file that describes how things work
- Change the temperature to 1
- (HEAD -> crow-v2, origin/crow-v2) Introduce some humor into the code
My goal was eventually to get to something was self sustaining like TFA's script just via conversation rather than actually coding it. (So fork a new version and see if it works then commit / skip back etc.)The current version is at[2] and contains this explanation which GPT wrote. (I should probably make it describe itself in the README and handle multiple files generally at some point.
"""
Instructions are useful for humans. Even if we forget
a single line of code, we can just look at the instructions
to figure out what to do. And that's exactly how this file
works!
Every time you run this file, you are asked to enter an
instruction. I call it this way because each instruction starts
with a verb. You could also call it a `command` or `task` or whatever
you like.
For example, `fix bugs`, `add logging`, `fix syntax errors`,
`add function definitions`, `fix indentation`, `add doc strings`.
Just enter a simple english instruction of what you want to do
with this file, and hit enter. The file will be edited to satisfy
that instruction on the fly. If you're happy with these changes,
you can save them by pressing 'y'. If not, press 'n' and the changes
will be discarded.
Then, you can run the new version of the file by pressing 'y' in
the prompt that follows.
That's it!
All the boilerplate you add in this file will be added automatically
by the model.
The model can add any python boilerplate to the file, such as function
definitions, classes, loops, conditionals, doc strings, syntax errors
etc. It can even fix such syntax errors.
"""
Overall it's a fun experiment to try. One of the big hassles was getting code that didn't quite have the correct spacing due to python's whitespace sensitivity. I was using the code editing GPT model code-davinci-edit-001 instead of I wonder if typescript might have been a better choice to avoid that.A fun thought (so far at least) experiment I'm having right now is what would be necessary to hook this up to an interactive jupyter notebook and let it start writing its own code to present widgets and UI, and then to have it journal its own creation dynamically, and then start calling other APIs and installing various software.
Also related, Fixie.ai[4] seems to be tackling some similar areas in creating small few-shot-prompt to function hookups that when automatically composed make some of this language based autonomous agent stuff pretty exciting.
[1]: https://github.com/joshka/Crow
[2]: https://github.com/joshka/Crow/blob/main/crow-v1.py
[3]: https://github.com/joshka/Crow/blob/crow-v2/crow.py
[4]: https://fixie.ai