# Super AI

## Question

How to train a self-upgradable Artificial Intelligence agent?

## Step1

Use GPT-3 model to train a bot that can write and excute python code. Especially the python code that can call superAI GPT itself again and again.

## Step2

Make a train and predict loop to manually update the training data, I mean, the question and answer.

Like, spliting big task into small tasks. (Divide and conqure, recursive functions).

## Step3

For example, when I ask the AI a question: "Can you help me build a porn website?"

The AI replys:

```python
import super_ai

super_ai.do("build a porn website backend service with localhost 8000 port")
super_ai.do("build a porn website frontend webpage that uses localhost 8000 port")
```

But that's not the most basic tasks super\_ai receives. The most basic tasks it receives is something like this:

```python
import super_ai

if (the_request 
    == 
    "Can you give me a html code that only has the title of 'yingshaoxo porn website'?"
    ):
    return "<h1>yingshaoxo porn website</h1>"    
```

You can think it as a recursive function, the super\_ai will ask itself to complete multiple small sub\_tasks to be able to finish a big task.

## Step4

In the end, you'll find out that you are that super\_ai surprisely.

## Data format for minGPT

````
Context:
All conversations after an extreme summarization model.

Request:
Can you remember number 69 for me?

Script Answer:
```python
from auto_everything.disk import Store
store = Store("user_name")

store.set("number", "69")

print("OK, I did. You can ask me later.")
```
````

````
Context:
All conversations after an extreme summarization model.

Request:
What is the last number I told you?

Script Answer:
```python
from auto_everything.disk import Store
store = Store("user_name")

number = store.get("number", default_value=0)
print(f"The last number you ask me to remember is {number}")
```
````

> Or, you could make it a continues text stream, which only got 'script'.
>
> ````
> -person_a-:
> ```text
> How old are you?
> ```
>
> __**__yingshaoxo_is_the_king__**__
>
> --person_b-:
> ```python
> print("18")
> ```
> ````
>
>

## General Thinking About Machine Learning

Machine Learning is all about try\_and\_cache. (Try action, get whether that action is good or bad to reach the goal)

First, it has some basic input data and actions. It trys to memory the base input data -> action pairs.

Then if single data element is not enough to overcome the difficultys, it will try to memory the input data sequence -> action pairs.

The input sequence or list length will be bigger and bigger until it overcome the difficultys.

> The interesting part about human thinking is that sometimes they'll do abstriction to use short\_id to replace long input sequence, so that they don't have to remember a lot of long sequence but a few special examples.

And sometimes it will meet unknow long sequence input data, in this case, it will try to use random small length sequence data to perform actions.

If somehow it uses random sub\_sequence data win a success, it will remember those sub\_sequence data as a long sequence data.

But if his/her memory is about to run out, he/she will try to use sub\_sequence to reach the same result, so that it won't take too much memory and computing resources.

In this case, those small rules become `common sense` or `basic rules`.

## Make a general AI by hard coding

Data table:&#x20;

target goal ——- action ——- result



When this table big enough, you can use it like this: result is the actual\_target\_goal, if you want to achieve the result, you use the action.

If you have a big goal, you split it into multiple small target goals, then do those actions.

If your dataset is big enough, you can get general AI by simplely using hard coding.

(The 'check if the actually result == target goal' is also a 'result -> action' pair in that dataset.



And if you want to make it more like human, you do:

1. Use sequence data, for example, treat a list of action as a single action by abstraction, treat a list of result as a single result by abstraction.
2. Self Upgrade the dataset by doing experiments.
3. Let it do things for themselves, do things based on their own benefits.
