Play TicTacToe against ChatGPT!
Clone the repository into a local directory and cd into it:
git clone [email protected]:yribeiro/gpt4-tictactoe.git
cd ./gpt4-tictactoeCreate a python virtual environment using:
python3 -m venv .venvInstall the necessary requirements from requirements.txt file:
pip3 install -r requirements.txtThe application requires a valid OpenAPI key to be root folder of the repository.
Create an .env file in the root repository.
touch ./.envEnter the following contents:
OPENAI_API_KEY=<ENTER_YOUR_KEY>Activate the virtual environment using
source ./.venv/bin/activateLaunch the server using the streamlit commands:
streamlit run main.pyYour default browser should open up to the default app page.
Enter X and hit Enter to start playing:
Enter your first move from the choices:
[(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)]
E.g. 2, 2 and hit Enter
ChatGPT will response and the board will get drawn.
Continue entering moves, till the game is over.
Hit Ctrl+F5 to refresh the app and start a new game!
- Allow ChatGPT to start first
 - Generate image using DallE for the tic tac toe board representation
 - Allow user to select style for the board image
 - Refactor to include Controller that can be extended for Console and WebApp interaction
 - Generate text to voice functionality to allow ChatGPT to describe it's move
 - Allow user to select voice type for ChatGPT
 - Allow user to play in console mode
 



