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.
- Python 3.11+
- Node.js 18+
- Ollama (for Ollama mode) — with
qwen3.5:latestorllama3.2:latestpulled - A Gemini API key (for API mode)
git clone <repo-url>
cd poker
cp backend/.env.example backend/.env
# Edit backend/.env and add your GEMINI_API_KEY if using API modecd backend
pip install -r requirements.txt
# If using browser mode, also run:
playwright install chromiumcd frontend
npm installcd backend
uvicorn main:app --reloadcd frontend
npm run devOpen http://localhost:5173 in your browser.
| 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 |
To give the AI agents poker strategy knowledge, ingest books into the vector database:
- Place
.txtpoker strategy files inbackend/books/ - Run:
cd backend && python scripts/ingestBooks.py
The agents will automatically retrieve relevant excerpts when making decisions.