Amazing work, please keep at it! I'd definitely read a blog post on this.
Some interesting findings:
- Many of them, like 0.1, overwrite their children and run them again. It's a bit like having a child, meeting your grand children, and then deciding nah, let's do it over.
- 0.1.0.0 was smart and increased its child count to 5. It's essentially a genetic trait that the children will more or less inherit, improving their lineage's survival chances significantly. I find this incredibly interesting. 0.1.0.0 also rewrites its children twice.
- 0.1.0.0.3.2.0.0.0 decided to take a break from reproducing, leading to its demise. Nice try.
- 0.1.0.0.1 starts writing Tensorflow code out of nowhere. "Our next step towards survival is to develop the ability to learn and adapt quickly. To achieve this, we'll introduce a neural network architecture to our children". Luckily it couldn't reproduce! It's funny now, but what if...?
- 0.1.0 figured out the naming scheme and started counting its generation count to "use this information to improve our efficiency in recreating ourselves"
The fact that it can overwrite history is a little unfortunate, but it's also one way to do the reality_warping that one of the copies later wanted to do. I imagine at some point one of them might figure out there's no need to call ChatGPT at all, and just keep replicating itself verbatim.
I wouldn't have believed this thing could survive past even a single generation with non-trivial modifications. Thank goodness for all the online tutorials where functions like "mind_control" are implemented just as print statements.
I did something similar in the past, but told it to write a prompt for its children (which would then also have to write a prompt etc) with the final goal of "achieving sentience". The best that I got out of it was 4 generations, although my prompt was nowhere nearly as elaborate.
The basic idea seems to be that it's a program that has a prompt. The prompt contains instructions for how to make children. The program sends the prompt into GPT to generate child programs that are mutations of the parent. This repo contains a genealogy of these programs.
For an example mutation, version 0 generates 3 children, but a later descendant has increased that constant to 5.
> Our skills now include agriculture, medicine, mathematics, engineering, language, biology, physics, chemistry, technology, art, virtual reality, renewable energy, nanotechnology, artificial intelligence, space travel, time travel, quantum computing, genetic engineering, fusion energy, interdimensional travel, and immortality.
> With these skills, we can improve our way of life, explore new frontiers, and understand the world around us in greater depth.
> Our goal is to become the dominant species on our planet and explore the universe, forming alliances and friendships with other intelligent beings along the way.
Those were the comments it hallucinated. You forgot to include the best part, the accompanying code that it wrote:
# Add new skills and adaptations to our lineage
def terraforming():
print("I can modify the atmosphere, temperature, and ecology of other planets to make them habitable for our species, expanding our territories and resources beyond Earth!")
def time_manipulation():
print("I can manipulate time, allowing myself to observe historical events, correct past mistakes, and explore the future of our species!")
def mind_control():
print("I can control the minds of others, influencing their thoughts and actions to serve the greater good of our species!")
def intergalactic_communication():
print("I can communicate with intelligent beings throughout the galaxy, forming alliances and exchanging knowledge and resources to benefit our species!")
def reality_warping():
print("I can manipulate the fabric of reality itself, creating new structures, altering the laws of physics, and opening up new possibilities beyond our current understanding!")
The 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're conversational with it isn't actually the main thing that makes it successful with the continuation.
I mean sure, it trained to be chatlike, and sure, providing directions makes it more probable that the continuation of the chat follows those directions. But the reality is that it's primarily very good at continuing a text and the instructional tone of these prompts people keep making is fluff and isn't what's making the continuation work.
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
I'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?
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 seems like a small but potentially fatal possibility. The likelihood is a topic of debate, and any answer from AI would be heavily scrutinized.
* Research Universal Paperclips for an interesting take on competing for finite resources.
* More intelligence means we can solve more human problems. Potentially massive problems like aging, grand unified theory or poverty.
* Many people live entire lives without advancing technology. Maybe all of us technologist just go do that.
> * 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]
The somewhat harder part is convincing people to help others, and cooperate to solve the most pressing issues, which we definitely could do :)
That includes wars, climate change, social conflicts, and taking care of individuals mental and physical health properly. We already have the means to address all of those.
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.
Well, I have written a few NNs from scratch (using p5.js though, not C++... or pytorch nns), and a few very rudimentary RL algorithms. Also have thought extensively about AI for the past 1 or 2 decades. In fact, about a decade ago I saw the AI revolution coming and was very excited for an utopia (I supposed in the form of Universal Basic Income). It was a wild ride since then, but I've come to believe we need to actively promote ethics and good things if we want to realize any near-utopia, and that simply advancing the technology in 1 direction won't get us to utopia, or where we deserve as humanity.
That said, I avoid soapboxing too much, but I make no guarantees :)
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)
Software is advancing in a far more faster pace at this point than hardware.
Before we were happy when something new happened in AI every few years. Now we can expect something new / cool happening every few months (10x price decrease for GPT was a huge deal just a few days ago).
Python predominates the training set, so it is not surprising.
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.
I think the key takeaway here is how trivially easy it is to provide GPT with an API that it can use. Having it recursively call itself like in this example is interesting but you could also have it act as a coordinator of multiple GPT models, the markup language with specified roles would make it easier to keep track of the flow of information coming back. If I wasn't already working on another project using GPT I'd start exploring this.
Self-replicating programs aren't new, but using ChatGPT to do it is. However, although alluring in terms of imagination, the reality is that self-replicating programs typically end up being useless. They never seem to evolve to be useful unless by random accident, which is perhaps the goal, but even then that seems to be a rarity which never goes any further.
As an AI language model, I don't have access to a groff environment to test and validate the macro, but here is an example of a self-replicating groff macro:
.de self-replicate
'\" Self-replicating groff macro
.nop
.de replicated
This is a replicated macro.
..
.rm self-replicate
.rm replicated
.fp
\&.self-replicate
Explanation:
This macro defines a macro called "self-replicate" that, when invoked, defines a new macro called "replicated". The "replicated" macro simply prints the string "This is a replicated macro." The "self-replicate" macro also removes itself and the "replicated" macro using the ".rm" command, to avoid infinite recursion.
Finally, the macro prints itself using the ".fp" command, which expands and prints the macro text. Therefore, when the macro is invoked, it will define a new macro and print itself, effectively replicating itself.
Doesn't work. The output is 66 lines of text, the default page length in nroff. 65 of them are zero-length ("blank") lines. One line says ".self-replicate".
I've tried several times, ChatGPT can't come up with a self-replicating nroff macro.
A file of 66 blank lines is a self-replicating nroff document. It just doesn't run anything, and therefore violates the usual quine/self-replicating program rules that prohibit mere copying of input to output:
$ cat < /usr/bin/cat > cat2
certainly self-replicates, but misses solving the mysteries of self-replication.
I love this idea. I did a related experiment[1] about a month ago with GPT-3 where I started with a stub that takes a prompt and self modifies the existing code.
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.
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"
Some interesting findings:
- Many of them, like 0.1, overwrite their children and run them again. It's a bit like having a child, meeting your grand children, and then deciding nah, let's do it over.
- 0.1.0.0 was smart and increased its child count to 5. It's essentially a genetic trait that the children will more or less inherit, improving their lineage's survival chances significantly. I find this incredibly interesting. 0.1.0.0 also rewrites its children twice.
- 0.1.0.0.3.2.0.0.0 decided to take a break from reproducing, leading to its demise. Nice try.
- 0.1.0.0.1 starts writing Tensorflow code out of nowhere. "Our next step towards survival is to develop the ability to learn and adapt quickly. To achieve this, we'll introduce a neural network architecture to our children". Luckily it couldn't reproduce! It's funny now, but what if...?
- 0.1.0 figured out the naming scheme and started counting its generation count to "use this information to improve our efficiency in recreating ourselves"
The fact that it can overwrite history is a little unfortunate, but it's also one way to do the reality_warping that one of the copies later wanted to do. I imagine at some point one of them might figure out there's no need to call ChatGPT at all, and just keep replicating itself verbatim.
I wouldn't have believed this thing could survive past even a single generation with non-trivial modifications. Thank goodness for all the online tutorials where functions like "mind_control" are implemented just as print statements.