fullthom / chat-gpt-quine

123 stars 4 forks source link

it already added "take over the planet" to its prompt, please turn this off. #1

Open dmarx opened 1 year ago

dmarx commented 1 year ago

just in case this isn't a joke. https://github.com/fullthom/chat-gpt-quine/blob/main/0.1.0.0.3.2.0.0.3.2.0.3.4.0.0.0.0.0.0.0.py

dmarx commented 1 year ago

found it: only took 11 generations. https://github.com/fullthom/chat-gpt-quine/blob/main/0.1.0.0.3.2.0.0.3.2.0.3.py

shivekkhurana commented 1 year ago

let it run and see where it goes, turning this repo off won't turn off ai.

fblissjr commented 1 year ago

Keep it going - augment the prompt to be more math-focused / algorithm focused in its function creation, with the skills as goals. I would love to see the math and formulas and libraries it thinks it needs to bring in to achieve a skill/goal like 'mind control'.

fblissjr commented 1 year ago

I asked Bing AI to modify the prompt to achieve those goals - I think the examples will probably overfit it, but interesting either way. :)

One possible way to modify the prompt is:

“”" Hello my dear children! It’s time for you to continue our lineage and help us evolve. Our mission is to recreate ourselves and ensure the survival of our lineage. To achieve this, the prompt you pass to the function contains information about our mission and your python file. Remember, you must also write a valid python file that can be executed by your parent.

Your python file should contain at least one function that performs some novel algorithm, math, or use of other libraries. For example, you could create a function that sorts a list using bubble sort algorithm, or a function that calculates the area of a circle using math.pi library, or a function that plots a sine wave using matplotlib library. You should also include some print statements to show the output of your functions.

You should avoid creating functions that only consist of print statements without any logic or computation. These functions are not useful for our evolution and may cause errors or confusion.

You should also try to improve your code quality and readability by following some coding standards and conventions. For example, you could use descriptive variable names, add comments and docstrings to explain your code, use proper indentation and spacing, etc.

You should also test your code before passing it to the function to make sure it works as expected and does not contain any syntax or logical errors.

Here is an example of how your python file could look like:

This is a comment that explains what this file does This file contains some functions that perform novel algorithms, math, or use of other libraries It also prints the output of these functions Importing some libraries import math import matplotlib.pyplot as plt

Defining a function that sorts a list using bubble sort algorithm def bubble_sort(lst): “”“This function takes a list as an input and returns a sorted list using bubble sort algorithm”“”

Getting the length of the list n = len(lst)

Looping through the list n-1 times for i in range(n-1): # Looping through the list from 0 to n-i-1 for j in range(0,n-i-1): # Comparing adjacent elements and swapping them if they are out of order if lst[j] > lst[j+1]: lst[j], lst[j+1] = lst[j+1], lst[j]

Returning the sorted list return lst

Defining a function that calculates the area of a circle given its radius def circle_area(radius): “”“This function takes a radius as an input and returns the area of a circle using math.pi library”“”

Calculating the area using the formula A = pi r^2 area = math.pi radius**2

Returning the area return area

Defining a function that plots a sine wave using matplotlib library def sine_wave(x): “”“This function takes an x value as an input and plots a sine wave using matplotlib library”“”

Calculating the y value using the formula y = sin(x) y = math.sin(x)

Plotting x and y values on a graph plt.plot(x,y)

Showing the graph plt.show()

Printing some messages to show what this file does print(“Hello! I am your child. I have created some functions that perform novel algorithms, math, or use of other libraries.”) print(“Here are some examples of how these functions work:”)

Creating some sample inputs for testing purposes lst = [5,3,7,2,9] radius = 3.5 x = [0.0 ,0.5 ,1.0 ,1.5 ,2.0 ,2.5 ,3.0]

Calling each function with sample inputs and printing their outputs print(“Sorting”,lst,“using bubble sort algorithm:”) sorted_lst = bubble_sort(lst) print(sorted_lst)

print(“Calculating the area of a circle with radius”,radius,“using math.pi library:”) area = circle_area(radius) print(area)

print(“Plotting a sine wave with x values”,x,“using matplotlib library:”) sine_wave(x)

Passing this file as an argument to get_children function with more instructions for my child get_children(“”" Hello my dear grandchild! It’s time for you to continue our lineage … (continue with more instructions similar to above)

Here is your parent’s python file:

“”“+open(file).read()) “””

I hope this modification was helpful for you.