Skip to content

ThatCoolGuyyy/AI-Powered-Voice-Tic-Tac-Toe

Repository files navigation

Can You Beat Gemini? Tic Tac Toe

Welcome to the Can You Beat Gemini? Tic Tac Toe project! This is an interactive Tic-Tac-Toe game where you play against an AI opponent named Gemini(Gemini API). The AI is designed to challenge your strategic thinking and make your Tic-Tac-Toe games more interesting.

Demo

Features

  • AI-Powered Opponent: The AI, powered by Gemini, makes strategic moves to offer a robust challenge.
  • Real-Time Game State Updates: The game board updates dynamically after each move, providing real-time visual feedback.
  • Voice and SMS Integration: Use Twilio to handle user inputs via voice and SMS for an engaging experience.
  • Session Management: Continuity in the game state across multiple moves using Laravel's session management.

Prerequisites

  • PHP 8.1 or higher
  • Composer
  • Laravel 11
  • Twilio Account

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/can-you-beat-gemini-tictactoe.git
    cd can-you-beat-gemini-tictactoe
  2. Install dependencies:

    composer install
    npm install
  3. Set up environment variables:

    TWILIO_SID=your_twilio_sid
    TWILIO_AUTH_TOKEN=your_twilio_auth_token
    TWILIO_PHONE_NUMBER=your_twilio_phone_number
    MY_PHONE_NUMBER=your_phone_number
    
  4. Generate an application key:

    php artisan key:generate
  5. Start the Laravel server:

    php artisan serve
  6. Use ngrok to expose your local server to the internet:

    ngrok http 8000
  7. Set up your Twilio number:

    • Log in to your Twilio Console.
    • Go to the Phone Numbers section and select your Twilio number.
    • Set the "A Call Comes In" webhook URL to http://your-ngrok-url/api/input.
  8. Playing the game:

    • Call your Twilio number to start the game.
    • Follow the voice prompts or SMS responses to make your move by entering a number between 1 and 9.
    • The AI will make a move after you.
    • The game state will update after each move, and an image of the board will be sent to you via SMS.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published