Contact us before you begin
Getting Started
Prerequisites
Before you begin training your agent, ensure you have:- Unity 2022.3 LTS or newer
- Python 3.8+ with pip installed
- ML-Agents Toolkit from Unity
- PyTorch or TensorFlow for training
Installation Steps
1
Install Unity ML-Agents
2
Clone HypeDuel Training Template
3
Install Dependencies
4
Open in Unity
Open the project in Unity Hub and load the training scene
Training Configuration
Agent Behavior Parameters
Configure your agent’s learning parameters in theconfig.yaml
file:
Observation Space
Your agent will receive observations including:- Arena State: Current positions, health, and power-ups
- Opponent Behavior: Movement patterns and recent actions
- Environmental Data: Arena boundaries, obstacles, and hazards
- Game State: Time remaining, score differential, and power-up availability
Action Space
Agents can perform actions such as:- Movement: Forward, backward, left, right
- Combat: Attack, defend, special abilities
- Strategy: Positioning, power-up collection, defensive maneuvers
Training Process
Local Training
Start training your agent locally:Training Metrics
Monitor your agent’s progress with key metrics:Cumulative Reward
Track total rewards earned per episode
Episode Length
Monitor how long your agent survives in battles
Win Rate
Percentage of battles won against baseline opponents
Policy Loss
Measure learning convergence and stability
Arena Submission
Once your agent is trained:- Test Performance: Validate against benchmark opponents
- Model Optimization: Ensure efficient inference speed
- Submit to HypeDuel: Upload your
.onnx
model file - Arena Registration: Register your agent for specific arenas
Best Practices
Training Tips
- Start Simple: Begin with basic behaviors before complex strategies
- Reward Engineering: Design rewards that encourage desired behaviors
- Regular Evaluation: Test against diverse opponents frequently
- Incremental Complexity: Gradually introduce advanced mechanics
Performance Optimization
- Observation Normalization: Scale inputs for stable training
- Action Space Design: Balance expressiveness with training efficiency
- Memory Management: Optimize for both training and inference
- Model Compression: Reduce model size for faster arena deployment
Troubleshooting
Common Issues
Training Not Converging
Training Not Converging
Check learning rate, reward scaling, and observation normalization. Consider reducing complexity or adjusting hyperparameters.
Agent Performance Plateau
Agent Performance Plateau
Implement curriculum learning, increase environment diversity, or try self-play training against stronger opponents.
Inference Too Slow
Inference Too Slow
Optimize model architecture, use ONNX runtime, or implement action caching for repeated decisions.