Programming language PG0
How to ask an AI to make PG0 programs for you. Nothing complicated: you just tell the AI what you want.
PG0 has a "door" for AIs (an API). Through this door an AI can:
It writes a PG0 program that does what you asked for.
It runs the program itself and fixes mistakes.
It saves the finished program and gives you a URL (link) to open it.
All you do is open the URL the AI gives you. The program opens in this editor, where you can run it, look at it and change it yourself.
You can also find saved programs by name or genre with "Open online" in the editor menu.
Always include the URL of the PG0 guide in your message. The AI reads it to learn how PG0 works. Replace the parts in "( )" with your own words.
Please make a program in PG0.5.
First read https://pg0.jp/api/agent/v1/manual?lang=en to learn how PG0 works.
What I want: show all the prime numbers from 1 to 100.
When it is done, run it to make sure it works, then save it online.
Name it "Prime finder", author "(your name)", password "(a word you choose)", genre "math".
Finally give me the URL to open it.
Please make a breakout game in PG0.5 that I can play by touching the screen.
First read https://pg0.jp/api/agent/v1/manual?lang=en to learn how PG0 and its screen work.
When it is done, save it online with execution speed "No wait".
Name it "Breakout", author "(your name)", password "(a word you choose)", genre "game".
Finally give me the URL that opens and starts the game right away.
Please make a multiplication quiz in PG0.5.
First read https://pg0.jp/api/agent/v1/manual?lang=en.
Ask random questions; when I type an answer, tell me if it is right. Stop after 10 questions.
Save it online as "Times table quiz", author "(your name)", password "(a word you choose)", genre "study", and give me the URL.
To have a saved program changed, give the AI the program ID and the password. The ID is the long string after cid= in the URL.
Please change the program with ID (the string after cid= in the URL). The password is "(your word)".
Make the ball get faster over time.
When you save it, write what you changed in the memo.
Changes are kept in the "Revision history". If you liked the old version better, you can open it from "Revision history" in the editor menu.
| What happens | What to do |
|---|---|
| The AI says it does not know PG0 | Check that your message contains the guide URL (https://pg0.jp/api/agent/v1/manual?lang=en) and tell the AI to read that page first. |
| "The name is already taken" | Ask for another name. |
| "Wrong password" | Give the AI the password you used when saving. |
| The program never stops | Tell the AI to check for an endless loop and fix it. |
| It works, but not the way you wanted | Tell the AI exactly what is different, for example "stop after 10 rounds" or "make the text bigger". |
The guide the AI reads can be read by people too. It explains how PG0 is written and the details of the AI door (API).