Skip to content

Releases: mracko/FirstContactGPT

First Contact GPT v1.0

04 May 13:35
f165d2e
Compare
Choose a tag to compare

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):

  1. Download and install the latest version of Python from python.org
  2. When installing Python it is important to tick the "Add Python 3.X to PATH" option!
  3. 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".
  4. 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.
  5. You can close the Command Prompt window
  6. Download and unzip First Contact GPT to any folder on your PC. You can download the latest version of the game here.
  7. Create an OpenAI developer account here. You can conveniently use your Google or Microsoft account.
  8. 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.
  9. 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.
  10. 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.