Deep Dive Duel is a competitive game where two AI agents race to find the shortest path between two Wikipedia articles. The game visualizes the graph of visited articles and the paths taken by the agents in real-time.
- Real-time AI Race: Watch two AI agents navigate the Wikipedia graph to find the target article.
- Graph Visualization: A dynamic graph shows the articles visited and the paths explored by the agents.
- Agent Analytics: View statistics for each agent, including the number of nodes visited and the current path.
- Interactive Graph: Click on nodes in the graph to see the corresponding Wikipedia article.
- React
- Vite
- react-force-graph-2d: A React component for 2D force-directed graph visualizations.
- Lucide React: A library of simply designed icons.
- Python
- FastAPI
- LangChain: A framework for developing applications powered by language models.
- Wikipedia-API: A Python wrapper for the official Wikipedia API.
- WebSockets: For real-time communication between the backend and frontend.
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
.\venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.envfile in thebackenddirectory and add your OpenAI API key:OPENROUTER_API_KEY=your_openai_api_key
-
Navigate to the frontend directory:
cd frontend -
Install the required dependencies:
npm install
-
Start the backend server:
- Make sure you are in the
backenddirectory with the virtual environment activated. - Run the following command:
python .\main.py - The backend server will be running at
http://127.0.0.1:8000.
- Make sure you are in the
-
Start the frontend development server:
- Make sure you are in the
frontenddirectory. - Run the following command:
npm run dev
- The frontend application will be available at
http://localhost:5173(or another port if 5173 is in use).
- Make sure you are in the
-
Open your browser and navigate to the frontend URL to use the application.