Twilio Challenge: Can You Beat Gemini? Tic Tac Toe

This is a submission for the Twilio Challenge

What I Built

I built an interactive Tic-Tac-Toe game called “Can You Beat Gemini? Tic Tac Toe.” This project allows players to test their skills against Gemini AI, providing a challenging and f…


This content originally appeared on DEV Community and was authored by dami

This is a submission for the Twilio Challenge

What I Built

I built an interactive Tic-Tac-Toe game called "Can You Beat Gemini? Tic Tac Toe." This project allows players to test their skills against Gemini AI, providing a challenging and fun experience.

Demo

To See it in action, make a call to *+1 (806) *

Source Code

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.

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

Twilio and AI

I used Twilio to get input from the user in digits (1-9), each representing a cell on the Tic-Tac-Toe board. Then, I used Gemini AI to play against the human user. Finally, I used the Twilio Messaging API (WhatsApp) to send the updated board when both AI and human players make their moves. I also used Twilio Functions to host the code.

Additional Prize Categories

Twilio Times Two - The project uses Twilio Programmable Messaging (WhatsApp Sandbox), Twilio Programmable Voice and, Twilio Functions.
Entertaining Endeavors - The project creatively combines a classic game with advanced AI technology, making it not just a simple Tic Tac Toe game but an engaging battle of wits against an AI opponent. By leveraging Twilio to receive user inputs and send real-time game updates via WhatsApp, the project ensures continuous engagement and keeps the players entertained throughout the game.


This content originally appeared on DEV Community and was authored by dami


Print Share Comment Cite Upload Translate Updates
APA

dami | Sciencx (2024-06-17T00:20:22+00:00) Twilio Challenge: Can You Beat Gemini? Tic Tac Toe. Retrieved from https://www.scien.cx/2024/06/17/twilio-challenge-can-you-beat-gemini-tic-tac-toe/

MLA
" » Twilio Challenge: Can You Beat Gemini? Tic Tac Toe." dami | Sciencx - Monday June 17, 2024, https://www.scien.cx/2024/06/17/twilio-challenge-can-you-beat-gemini-tic-tac-toe/
HARVARD
dami | Sciencx Monday June 17, 2024 » Twilio Challenge: Can You Beat Gemini? Tic Tac Toe., viewed ,<https://www.scien.cx/2024/06/17/twilio-challenge-can-you-beat-gemini-tic-tac-toe/>
VANCOUVER
dami | Sciencx - » Twilio Challenge: Can You Beat Gemini? Tic Tac Toe. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/17/twilio-challenge-can-you-beat-gemini-tic-tac-toe/
CHICAGO
" » Twilio Challenge: Can You Beat Gemini? Tic Tac Toe." dami | Sciencx - Accessed . https://www.scien.cx/2024/06/17/twilio-challenge-can-you-beat-gemini-tic-tac-toe/
IEEE
" » Twilio Challenge: Can You Beat Gemini? Tic Tac Toe." dami | Sciencx [Online]. Available: https://www.scien.cx/2024/06/17/twilio-challenge-can-you-beat-gemini-tic-tac-toe/. [Accessed: ]
rf:citation
» Twilio Challenge: Can You Beat Gemini? Tic Tac Toe | dami | Sciencx | https://www.scien.cx/2024/06/17/twilio-challenge-can-you-beat-gemini-tic-tac-toe/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.