First Contact GPT is a conversational AI game inspired by Star Trek. In this game, you take on the role of Joseph Rybar, the captain of the USS Carpathia, who is sent out to establish contact with an advanced, unknown alien race. Your objective is to communicate with the alien race and negotiate a personal meeting with their representatives.
How to install First Contact GPT (a guide for non-Python users):
- Download and install the latest version of Python from python.org
- When installing Python it is important to tick the "Add Python 3.X to PATH" option!
- Once Python is installed, open the Command Prompt. You can do this by pressing the Win + R key, then typing "cmd" (without the quotation marks) and hitting OK. This will launch the Command Prompt window. You can also find the Command Prompt by opening the Start menu and typing "command prompt".
- Inside the Command Prompt you will need to run two commands:
- Type "pip install openai" (without the quotation marks) and hit Enter. This will install the OpenAI Python package.
- Type "pip install tiktoken" (without the quotation marks) and hit Enter. This will install the Python package to count the number of words/tokens in your prompts. Don't worry, this has nothing to do with TikTok.
- You can close the Command Prompt window
- Download and unzip First Contact GPT to any folder on your PC. You can download the latest version of the game here.
- Create an OpenAI developer account here. You can conveniently use your Google or Microsoft account.
- Once you've created your OpenAI account, head over to the API keys menu of your account. You can find it by clicking on your account in the upper right corner.
- Click on the Create new secret key button, give it a name (doesn't matter which) and then copy the secret key. You will need to paste it into the game's source code in the next step.
- Open FirstContactGPT.py in the folder where you unzipped the game in a text editor. Default Notepad will do just fine. You can drag and drop the file into Notepad. The 10th line of code reads:
openai.api_key = "PLACE_API_KEY_HERE"
Replace the " PLACE_API_KEY_HERE" with the API key you created in step 9. You should still have it copied in your clipboard. The line of code should like like this:
openai.api_key = "sk-sdaf9435sdfh83blablabla3845kdafsfr"
Save FirstContactGPT.py and close the text editor. Now you can run the game by double-clicking on FirstContactGPT.py.
Known issues:
- The game's AI mission objective checker may falsely identify the alien's response (both false positive or false negative). I hope this will be resolved with newer GPT models and/or better prompts.