A package for training AI agents to play retro games using natural language
Project description
🎮 Casino of Life
A revolutionary framework for training AI agents in retro fighting games using natural language interactions. Casino of Life combines reinforcement learning with natural language processing to create an intuitive interface for training game-playing AI agents.
🌟 Features
Natural Language Training Interface
- Train AI agents using natural conversations
- Explain strategies in plain English
- Get real-time feedback on training progress
- Interactive chat with CaballoLoko, your AI training assistant
Supported Games
- Mortal Kombat II (Genesis)
- Street Fighter II (Coming Soon)
- More fighting games to be added
Advanced Training Capabilities
- Multiple training strategies (Aggressive, Defensive, Balanced)
- Various learning policies (PPO, A2C, DQN, MLP)
- Custom reward functions
- Save and load training states
- Real-time training visualization
🚀 Quick Start
Installation
pip install casino-of-life
Basic Usage
from casino_of_life.environment import CasinoFightingEnv
from casino_of_life.agents import FightingAgent
# Create environment
env = CasinoFightingEnv(
game='MortalKombatII-Genesis',
character='liu-kang',
strategy='aggressive'
)
# Initialize agent
agent = FightingAgent(
env=env,
policy='PPO',
learning_rate=0.0003
)
# Start training with natural language guidance
agent.train(
message="Train Liu Kang to be aggressive with jump kicks and fireballs",
timesteps=100000
)
🎯 Use Cases
Game Developers
- Test game balance
- Create sophisticated AI opponents
- Generate training data for game testing
AI Researchers
- Experiment with reinforcement learning in complex environments
- Study human-AI interaction through natural language
- Develop and test new training strategies
Gaming Community
- Create custom AI training scenarios
- Share and compare training results
- Contribute to the evolution of game AI and the Casino of Life framework.
🛠 Advanced Features
Custom Training Scenarios
from casino_of_life.scenarios import create_scenario
scenario = create_scenario(
name="tournament",
difficulty="hard",
opponent="random",
rounds=3
)
Training State Management
# Save training progress
agent.save_state("liu_kang_aggressive_v1")
# Load existing training
agent.load_state("liu_kang_aggressive_v1")
Real-time Metrics
from casino_of_life.metrics import TrainingMonitor
monitor = TrainingMonitor(agent)
monitor.start_tracking()
📊 Web Interface
Access the training interface at https://casino.cimai.biz
- Interactive chat with CaballoLoko
- Real-time training visualization
- Model management interface
- Community features
�� Contributing
We welcome contributions! See our Contributing Guide for details.
Development Setup
git clone https://github.com/Cimai-Decentralized-Games/casino-of-life.git
cd casino-of-life
pip install -r requirements.txt
📚 Documentation
Full documentation available at https://docs.cimai.biz
- API Reference
- Training Guides
- Example Projects
- Best Practices
🔗 Links
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- G4F for GPT models and other Providers
- Stable-Retro for game emulation
- Stable-Baselines3 for RL implementations
- The fighting game community for inspiration and support
Made with ❤️ by Cimai Decentralized Games
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file casino_of_life-0.1.0.tar.gz.
File metadata
- Download URL: casino_of_life-0.1.0.tar.gz
- Upload date:
- Size: 34.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1384a74540f7d9377b6091040ea10d82e68364d3b97873c49046daf46a118b6e
|
|
| MD5 |
833c524119c95bb0f928cb90f8f515d2
|
|
| BLAKE2b-256 |
5bebc08064a862f244429fadf2f754337ffe6aeacb8a2d67b076dddc1dff6bb5
|
File details
Details for the file casino_of_life-0.1.0-py3-none-any.whl.
File metadata
- Download URL: casino_of_life-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bb0988b374c378de7012a7ae68a9784384927a29b9870810cce1d607d5d0ddf
|
|
| MD5 |
b07eb34486f33e04de75e145eee71fc3
|
|
| BLAKE2b-256 |
dc47f6938243610428f90726ae6c2fb527ace429e8a9dc2c851eedaa79e45812
|