laitimes

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

What, 7 sentences let AI generate a mini-game for me?

It is also a classic adventure game like the "minimalist version" of Zelda, which can not only pick up coins and hide monsters, but also the map is not repeated.

This is the real experience of a guy named Andrew Mayne, who didn't even write a single line of code during the whole process!

After porping AI-generated games and game code online, thousands of hits were gained in just a few hours:

Netizens who rushed to watch tried to play the game he made and called "Mind blowing".

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

So, how exactly did Andrew Mayne do it?

It turned out that the AI he used to make the game was the latest version of OpenAI, Codex.

This version of Codex, in addition to directly generating, modifying and editing code, even doubled the length of the processed text, from 2048 tokens to 4000, almost like "unlocking a layer of seals".

At first, Andrew Mayne was just curious about the creative limits of this version of Codex and wanted to do an experiment to see if it could generate mini-games directly from the text.

Unexpectedly, this test simply made him unable to stop.

7 sentence generative adventure game

His first attempt was a game he named "Minimal Zelda".

Don't look at the abstract screen, the whole game includes randomly generated maps, players using the keyboard to control the movement of characters, enemies will attack the player, collect gold coins and other core elements of the game.

Walking to the edge of the map also generates a new map so you can play with it forever... All in all a 2D adventure game prototype looks like.

All of these rules were written in just seven sentences in English, and the AI wrote 190 lines of code in Javascript.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

Since the little brother himself is not a professional game designer, the description words are not very precise, but AI can always produce its own understanding.

For example, in the part that describes monsters, there is only "a red monster, and when the player moves, it also moves, trying to get close to the player, and if the player is touched, it will subtract one point."

Ai generates more than 50 lines of complete monster generation, movement, and score-determining logic based on context.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

Just replace the color block with a simple sticker, and isn't it very similar to the real Zelda prototype?

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

△ The original Zelda prototype program that was exposed

The second mini-game, he intends to test ai's understanding of logic, generate a simplified version of the word guessing game Wordle.

This time only 5 paragraphs were used to describe the rules.

Puzzle words are randomly selected from a list, one at a time and placed on the console.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

Describes the style of the letter input boxes, including width and height, text center alignment, each input box has a separate ID, automatic capitalization as you type, and a confirmation button.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

Four cases discuss how to determine the input result.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

Later, he made more attempts, calling third-party libraries to generate 3D mazes, tic-tac-toe chess that can fight with players, and small programs that filter photos, all without writing a single line of code.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

One of the more interesting is the generation of "The Matrix" character rain visual effects, almost only telling the AI to "create a canvas, add a Matrix rain effect", without any additional explanation, the AI made it:

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

Finally, he summarized several lessons and introduced how to write a text description to make it easier for AI to understand the needs:

Describe the logical part first. Then when the UI element is created, the logic function generated earlier is called.

Give the description number. This makes it easier to see which description the AI is dealing with.

Let the AI create more functions. If you directly let the AI generate an array of 100 items, the AI may really write out each item of each item, and if you tell the AI to create a function that generates the array, the AI will complete it with a loop statement.

If it's not ideal at one time, try it several times. Setting the product parameter to 0.5, with some randomness, may produce better results.

It seems a bit of a product manager summing up how to communicate with programmers.

Behind the Codex "re-evolution"

So then again, how good is this latest version of Codex?

In addition to doubling the token cap that Andrew Mayne is most interested in, the addition of two new features, Insert and Edit, is also interesting.

First, let's take a look at codex's editing features, like optimizing code performance can be done in one sentence:

Or implement the code in a different programming language:

There is also "One Liner", which can be implemented with one command:

With this feature, it will be much less difficult to adjust the code.

When using Codex, you can even do the same thing, without manually adjusting the code, just giving orders to the "AI programmer" to make it generate what you want.

Let's take a look at Codex's insertion capabilities.

Not only can you actively generate comments, but you can also remind you of the role of this code:

You can also understand this function according to the context, and actively insert its definition for you:

Whether it is developing a framework or writing small software, there is no need to worry about "one road to black", and it can be adjusted from the middle according to the needs.

Of course, these features are similar to that put on GPT-3. Whether it's a little trick like changing a person or changing a format:

Or modify and insert statements with the context, it doesn't matter.

In addition to these two features, there are also some updates on the details, such as the UI has become more concise and so on.

In fact, this series of new features is designed to make Codex and GPT-3 easier to get started.

According to OpenAI scientists, they hope that through this update, more "non-professional players" can also play GPT-3 and Codex.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

This has indeed attracted many interested netizens to try it.

Like Andrew Mayne, who came up with "7 sentences let AI make me a game", was originally just a thriller novelist.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

△ Also wearing a SpaceX hat, there are too many elements

In addition to him, people including Cleve Thompson, the editor of Wired, are also trying to code themselves with Codex.

Clive says Codex has a much richer amount of knowledge than their "amateurs" and can choose the most appropriate functions and libraries to complete the requirements. For example, when receiving a pdf-related request, call the PYPDF library.

Some netizens said that they made a "space invaders" mini-game with Codex, which was also successful.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

Seeing these achievements, some netizens lamented that when AI really learns to write code, there may be two things left for humans to do: write better AI, or think about what can be generated with AI.

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

However, more cautious netizens believe that AI-generated code is easy for people to rely on it, thus ignoring the problem of the code itself. For example, the image processing code written by this author in Codex has some inaccuracies:

7 sentences let Codex make me a small game, or a minimalist version of Zelda, i can't stop playing

Some netizens predict that if you use AI to write code, you will eventually let engineers adjust it, which is essentially the same destination.

Do you use AI to write tools or make games?

Read on