CyberGameGT is an educational platform for demonstrating Game Theory and AI-driven Cyber Security defense strategies.
- Python 3.8+
- Node.js 16+
- pip
- npm
Install backend dependencies:
cd backend
pip install -r requirements.txtStart the backend server:
uvicorn app.main:app --reloadThe API will be available at http://localhost:8000.
Install frontend dependencies:
cd web
npm installStart the frontend development server:
npm run devThe dashboard will be available at http://localhost:5173.
From the repository root:
docker build -f backend/Dockerfile -t cybergame-backend backendAlternative backend Dockerfile:
docker build -f backend/venv/Dockerfile -t cybergame-backend-venv backendFrom the repository root:
docker compose up --buildServices:
- Backend API:
http://localhost:8000 - Web App:
http://localhost:5173
From the repository root:
docker compose -f docker-compose.prod.yml up --build -dProduction stack services:
- Backend API:
http://localhost:8000 - Web (Nginx static):
http://localhost:5173
make help
make up
make down
make build
make logs
make up-prod
make down-prod
make build-prod
make logs-prodThe dashboard visualizes a simulated network with:
- Nodes: Endpoints, Servers, Core, Firewall.
- Links: Connections between nodes.
- AI Agent Controls: Compute Nash Equilibrium and run simulations.
The backend uses Python with NumPy/SciPy to solve mixed-strategy Nash Equilibria.
- Endpoint:
http://localhost:8000/game/nash - Request:
POSTwithpayoff_matrix. - Response: Mixed strategies and equilibrium values.
Run dynamic simulations with the AI agent:
- Endpoint:
http://localhost:8000/network/simulate-attack - Request:
POSTwithtopology_typeandattack_type. - Response: Attack results and threat level.
The backend exposes two probe endpoints:
- Liveness:
GET /health - Readiness:
GET /ready
Use these mappings in deployments:
livenessProbe->/healthreadinessProbe->/ready
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3)"livenessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
readinessProbe:
httpGet:
path: /ready
port: 8000
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 3Context: A defender manages a small enterprise network. An attacker attempts to compromise it. The game repeats over rounds, modeling dynamic adaptation.
- Firewall: Static rule updates (Low cost, medium protection).
- IDS: Intrusion Detection System signatures (Medium cost, medium protection).
- Patch System: Deploying security patches (High cost, high protection).
- Honey Pot: Deploying decoy systems (Low cost, low protection).
- SQLi: SQL Injection (Low cost, medium risk).
- DDoS Flood: Distributed Denial of Service (Medium cost, high risk).
- Zero-Day Exploit: Using unknown vulnerabilities (High cost, critical risk).
- Phishing APT: Advanced Persistent Threat via phishing (Low cost, low risk).
Values represent Defender Utility (Risk/Cost). Attacker aims to minimize this value.
| Attacker \ Defender | Firewall | IDS | Patch System | Honey Pot |
|---|---|---|---|---|
| SQLi | 35 | 40 | 25 | 45 |
| DDoS Flood | 65 | 70 | 40 | 75 |
| Zero-Day Exploit | 80 | 85 | 50 | 90 |
| Phishing APT | 20 | 25 | 15 | 30 |
In the Learning Tab, the AI agent:
- Computes the Nash Equilibrium using the current payoff matrix.
- Simulates attacks and defenses to update threat levels.
- Learns to adapt strategies based on opponent behavior.