Skip to content

DylanY661/PokerSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poker Simulator

An AI-powered Texas Hold'em simulator where 3–5 LLM agents with distinct personalities (Calculator, Shark, Gambler, Maniac, Rock) play poker against each other. Supports three AI backends: local Ollama models, the Gemini API, or Gemini via Chrome automation.

Full Documentation


Prerequisites

  • Python 3.11+
  • Node.js 18+
  • Ollama (for Ollama mode) — with qwen3.5:latest or llama3.2:latest pulled
  • A Gemini API key (for API mode)

Setup

1. Clone and configure environment

git clone <repo-url>
cd poker
cp backend/.env.example backend/.env
# Edit backend/.env and add your GEMINI_API_KEY if using API mode

2. Install backend dependencies

cd backend
pip install -r requirements.txt
# If using browser mode, also run:
playwright install chromium

3. Install frontend dependencies

cd frontend
npm install

4. Start the backend

cd backend
uvicorn main:app --reload

5. Start the frontend

cd frontend
npm run dev

Open http://localhost:5173 in your browser.


AI Modes

Mode Description Requirements
Ollama Runs a local model via Ollama OLLAMA_URL in .env, model pulled
API Calls Gemini API directly GEMINI_API_KEY in .env
Browser Automates Gemini via Chrome Click "Init Browser" in settings

RAG / Book Ingestion (optional)

To give the AI agents poker strategy knowledge, ingest books into the vector database:

  1. Place .txt poker strategy files in backend/books/
  2. Run: cd backend && python scripts/ingestBooks.py

The agents will automatically retrieve relevant excerpts when making decisions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors