One of Casino of Life's most powerful features is its natural language interface for training AI agents. This guide will help you understand how to effectively communicate with your agents using plain English.
Introduction to CaballoLoko
CaballoLoko is your AI training assistant in Casino of Life. It acts as an interpreter between your natural language commands and the underlying reinforcement learning systems.
Basic Communication
You can communicate with CaballoLoko using the chat() method:
from casino_of_life.agents import CaballoLoko
caballo_loko = CaballoLoko()
response = caballo_loko.chat("Train Liu Kang to be aggressive with fireballs")
Training Commands
CaballoLoko understands a wide range of training directives. Here are some examples:
Character Selection
caballo_loko.chat("I want to train Scorpion")
caballo_loko.chat("Switch to Sub-Zero")
Strategy Definition
caballo_loko.chat("Train the agent to focus on defensive play")
caballo_loko.chat("Make the agent more aggressive in the first round")
caballo_loko.chat("Teach the agent to use combos more frequently")
Move-Specific Training
caballo_loko.chat("Increase the use of uppercuts when opponent jumps")
caballo_loko.chat("Train the agent to block more low attacks")
caballo_loko.chat("Improve reaction time to projectile attacks")
Training Parameters
caballo_loko.chat("Increase learning rate to 0.0005")
caballo_loko.chat("Set reward scaling to prioritize health preservation")
caballo_loko.chat("Change the policy to A2C instead of PPO")
Getting Feedback
You can ask CaballoLoko for feedback on the training progress:
status = caballo_loko.chat("How is the training going?")
suggestions = caballo_loko.chat("What should I improve?")
progress = caballo_loko.chat("Show me the learning progress")
Advanced Interactions
CaballoLoko can also help with more complex training scenarios:
# Multi-stage training
caballo_loko.chat("First train defensively for 50,000 steps, then switch to balanced strategy")
# Conditional behaviors
caballo_loko.chat("Use more special moves when opponent's health is below 30%")
# Opponent-specific strategies
caballo_loko.chat("Develop specific counters against Shang Tsung")
Best Practices
Be specific: The more specific your instructions, the better CaballoLoko can interpret them.
Build incrementally: Start with basic strategies before adding complexity.
Ask for feedback: Regularly check in on training progress and request suggestions.
Combine approaches: Mix natural language guidance with programmatic fine-tuning for best results.
Save successful conversations: You can save productive training dialogues for future use.
Example Training Dialogue
Here's an example of a productive training conversation:
User: "Train Liu Kang to be aggressive with fireballs"
CaballoLoko: "Setting up aggressive training for Liu Kang with emphasis on fireball projectiles. Initial learning rate set to 0.0003 with PPO policy."
User: "How often should he use fireballs?"
CaballoLoko: "Currently configuring for 30% probability of fireball attempts when at medium range. Would you like to adjust this frequency?"
User: "Make it 40% and have him follow up with a flying kick when possible"
CaballoLoko: "Adjusting fireball frequency to 40% at medium range. Adding action sequence pattern to follow successful fireballs with flying kick when opponent is in hit stun. Beginning training sequence."
User: "How's the training going after 10,000 steps?"
CaballoLoko: "Agent has completed 10,000 steps. Win rate has increased from 23% to 41%. Fireball accuracy is at 62%. Flying kick follow-up success rate is currently 29%. Recommend continuing training or adjusting the follow-up timing."
By leveraging CaballoLoko's natural language capabilities, you can create sophisticated training protocols without needing to program complex reward functions or action patterns manually.