Loading repository dataโฆ
Loading repository dataโฆ
Javier-Jimenez99 / repository
๐ค AI-powered Balatro automation system using multiagent orchestration, computer vision, and Docker. Features LangGraph, Azure OpenAI integration, and Streamlit web interface for autonomous gameplay.
Transform your Balatro gameplay with JokerNet ๐คโจ
JokerNet represents a foundational framework for AI-powered game automation that can be extended far beyond Balatro. This section outlines potential enhancements and broader applications that demonstrate the scalability and versatility of the current multiagent architecture. ๐คโจ
The system integrates Azure OpenAI for intelligent reasoning, Docker for scalable deployment, and custom mods for enhanced game interaction, making it a comprehensive solution for automated gaming.
Built with state-of-the-art AI frameworks like LangChain and LangGraph, this project exemplifies expertise in AI agent orchestration, full-stack development, and containerized gaming environments. As a software engineer specializing in AI and automation, I've crafted JokerNet to demonstrate innovative approaches to game AI - from sophisticated multiagent coordination to real-time visual analysis and precise control simulation.
| ๐ฏ AI-Powered Gameplay | ๐ฎ Dual Control Methods | ๐๏ธ Real-Time Vision |
|---|---|---|
| Multiagent orchestration using LangGraph for coordinated strategic decisions | Gamepad control (primary) + Mouse control (under development) | Computer vision-powered game state recognition and dynamic planning |
| Learn more โ | See interface โ | Explore architecture โ |
| ๐ Modern Web UI | ๐ณ Containerized | ๐ง Custom Mods |
|---|---|---|
| Responsive Streamlit interface for configuration and real-time monitoring | Fully containerized Balatro environment with noVNC remote access | Enhanced game experience with auto-start and automation features |
| View interface โ | Setup guide โ | Mod details โ |
JokerNet operates through a sophisticated multi-layered architecture designed for maximum scalability and modularity:
graph TB
subgraph "User Interface Layer"
A[Streamlit Interface<br/>Port 8501]
end
subgraph "AI Orchestration Layer"
C[Multiagent System<br/>LangGraph]
end
subgraph "๐ณ Docker Container<br/>Complete Game Environment"
subgraph "API Services"
F[REST API<br/>Port 8000]
G[MCP Server<br/>Port 8001]
end
subgraph "Game Runtime"
B[noVNC<br/>Port 6080]
D[Balatro Game<br/>Love2D Engine]
E[Custom Mods<br/>BalatroLogger]
end
subgraph "Display System"
H[Xvfb<br/>Virtual Display]
I[x11vnc<br/>VNC Server]
end
B --> I
I --> H
H --> D
F --> D
G --> D
E --> D
end
A --> F
A --> B
A --> C
C --> A
C --> G
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
style F fill:#fff3e0
Architecture Highlights:
For detailed agent orchestration, see Multiagent System
At the heart of JokerNet lies a sophisticated multiagent system built using LangGraph, a powerful framework for orchestrating complex AI workflows. This system intelligently decomposes the challenging task of autonomous Balatro gameplay into coordinated, specialized agents that collaborate seamlessly.
The multiagent architecture features three specialized agents, each with distinct responsibilities:
| Agent | Role | Specialization | Key Functions |
|---|---|---|---|
| ๐ง Planner Agent | Strategic Director | High-level decision making | Task decomposition, strategic planning |
| ๐๏ธ Visualizer Agent | Vision Specialist | Computer vision analysis | Screenshot processing, game state extraction |
| โ๏ธ Worker Agent | Execution Expert | Action implementation | Gamepad control (primary), mouse interaction (under development) |
---
config:
flowchart:
curve: linear
---
graph TD;
__start__([<p>__start__</p>]):::first
planner_visualizer(planner_visualizer)
planner(planner)
worker_visualizer(worker_visualizer)
worker(worker)
tool(tool)
output(output)
__end__([<p>__end__</p>]):::last
__start__ --> planner_visualizer;
planner -. end .-> output;
planner -.-> worker_visualizer;
planner_visualizer --> planner;
tool --> worker_visualizer;
worker -.-> planner;
worker -.-> tool;
worker_visualizer --> worker;
output --> __end__;
classDef default fill:#f2f0ff,line-height:1.2
classDef first fill-opacity:0
classDef last fill:#bfb6fc
๐ Workflow Breakdown:
๐ก๏ธ Advanced Flow Control Features:
This architecture enables complex decision-making while ensuring system reliability and user control. For the web interface that interacts with these agents, see Streamlit Interface
JokerNet features a modern, responsive Streamlit application that provides an intuitive and powerful interface for configuration, monitoring, and interaction with the AI agents.
| Feature | Description | Benefits |
|---|---|---|
| ๐บ Live Game View | Embedded noVNC viewer for game monitoring | Visual feedback and control |
| โ๏ธ Agent Configuration | Direct API calls for game and agent settings | Flexible automation strategies |
| ๐ฌ Chat Interface | Natural language interaction with AI agents | Intuitive user experience |
| ๐ฏ Run Configuration | Deck selection, stake adjustment via API | Customized gameplay scenarios |
| ๐ Progress Monitoring | Live updates on agent actions and game state | Transparent automation process |
JokerNet includes a comprehensive Docker setup that containerizes the entire Balatro gaming environment, complete with custom mods, API servers, and remote access capabilities.
The Docker environment provides a fully isolated and optimized gaming ecosystem with all services running within a single container:
graph TB
subgraph "๐ณ Docker Container<br/>Internal Architecture"
subgraph "API Services"
F[REST API<br/>Port 8000]
G[MCP Server<br/>Port 8001]
end
subgraph "Game Runtime"
B[noVNC<br/>Port 6080]
D[Balatro Game<br/>Love2D Engine]
E[Custom Mods<br/>BalatroLogger]
end
subgraph "Display System"
H[Xvfb<br/>Virtual Display]
I[x11vnc<br/>VNC Server]
end
B --> I
I --> H
H --> D
F --> D
G --> D
E --> D
end
style D fill:#e8f5e8
style F fill:#fff3e0
๐ง Internal Service Flow:
๐ณ Docker Container Benefits: