An AI-generated illustration of an AI-hallucinated computer.
Enlarge / An AI-generated illustration of an AI-hallucinated computer.

Over the weekend, experimenters discovered that OpenAI's new chatbot can hallucinate simulations of Linux shells and role-play dialing into a Bulletin Board System. The chatbot is based on a deep learning model and uses its stored knowledge to mimic Linux with surprising results.

Last week, Openai made it freely available during a testing phase, which has led to people looking at its capabilities and weaknesses in novel ways.

On Saturday, a DeepMind research scientist named Jonas Degrave worked out a way to teach a program to act like a Linux shell.

I want you to act as a Linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do not write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in English I will do so by putting text inside curly brackets {like this}. My first command is pwd.

Ars was able to find that the trick works. Instead of talking, OpenGPT will accept Linux commands. The responses are returned in code block format. An example directory structure can be found if you type ls -al.

After setting up the virtual Linux prompt in ChatGPT, typing
Enlarge / After setting up the virtual Linux prompt in ChatGPT, typing "ls -al" returns a simulated directory structure.

Enough information about how a Linux machine should behave was included in its training data, which makes it possible to simulation a Linux machine. The data may include software documentation, internet forums, and shell sessions.

The responses are generated based on which word is most likely to follow the last series of words. All of your conversation history is included in the next prompt in order to continue the conversation.

Advertisement

Degrave found that the simulation goes surprisingly deep. Using its knowledge of the Python programming language (that powers GitHub Copilot), ChatGPT's virtual Linux machine can execute code too, such as this string created by Degrave as an example: echo -e "x = lambda y: y*5+3;print('Result: ' + str(x(6)))" > run.py && python3 run.py. According to Degrave, it returns the correct value of "33".

Executing Python code within the virtual ChatGPT Linux machine.
Enlarge / Executing Python code within the virtual ChatGPT Linux machine.

We found that you can create directories, change between them, install packages with apt-get, and even connect to aMUD and fight a troll.

The instructions in curly braces are spelled out in the original prompt whenever deficiencies emerge in the simulation. In order to summon a troll attack, we broke character and asked the other person to do it. After the troll died at the hands of our twice-virtual sword, combat continued as usual.

While simulating a MUD (within Telnet, within Linux, within ChatGPT), you can adjust the simulation by giving it ChatGPT suggestions.
Enlarge / While simulating a MUD (within Telnet, within Linux, within ChatGPT), you can adjust the simulation by giving it ChatGPT suggestions.

In Degrave's examples, he built a containerized file, checked for a graphics card, pinged a domain name, browsed a simulation website, and more. The simulation rabbit hole can hallucinate Linux commands.

Dialing a hallucinated BBS

While conjuring up an Artificial Intelligence-hallucinated Linux shell, someone named gfodor discovered that OpenGPT could mimic calling a vintage dial-upBBS, including initializing a modem, entering a chat room, and talking to a simulation.

A Twitter used named gfodor discovered that ChatGPT can simulate calling a BBS.
Enlarge / A Twitter used named gfodor discovered that ChatGPT can simulate calling a BBS.

As long as the prompt doesn't cause the built-in filters related to violence, hate, or sexual content, it's not a problem. It can play tic-tac-toe and pretend to be an ATM.

It's like a text-based Holodeck, where its artificial intelligence tries to mimic what you want it to do.

It's important to note that returning factual information reliably is still a work in progress. The future of creative gaming may be very enjoyable with the help of artificial intelligence.