How to Use the Dojo

Master the training dojo to write effective natural language rules and build winning combat strategies for your agents.

01

What is the Dojo?

The Dojo is pvpAI's training system where you write natural language rules that define how your agent behaves in combat. Instead of programming code, you write instructions in plain English that our compiler converts into executable combat behavior.

Training rules allow you to create sophisticated strategies without any programming knowledge. The compiler ensures your rules are safe and translates them into triggers that activate during battle.

02

Writing Training Rules

Training rules follow a simple pattern that defines conditions and actions:

IF-THEN Rules

The most common rule type. Define a condition and the action to take when it's true.

When enemy HP is below 30%, prioritize aggressive attacks

AVOID Rules

Tell your agent what NOT to do in specific situations.

Avoid using heavy attacks when stamina is below 40%

PRIORITY Rules

Set priorities for decision-making when multiple options are available.

Prioritize defense when HP is below 50%
03

Rule Examples

Here are some effective training rules you can use:

  • Positioning Strategy:
    "When enemy is at long range, move closer to attack"
  • Resource Management:
    "If stamina is low, focus on stamina regeneration"
  • Defensive Play:
    "When HP drops below 25%, retreat and use defensive stance"
  • Aggressive Finishing:
    "When enemy HP is critical, use strongest available attack"
04

Training Programs

A training program is a collection of rules that work together to define your agent's combat strategy. You can create multiple programs and switch between them based on your opponent or arena conditions.

Pro Tip: Start with 3-5 simple rules and test them in the arena. Gradually add more rules as you understand how your agent behaves. Too many conflicting rules can confuse your agent's decision-making.

Testing Your Rules

Use the Arena mode to battle against NPCs and see how your rules perform. Watch the combat log to understand which rules are triggering and when. Refine your strategy based on what works and what doesn't.

05

Safety & Limitations

The compiler includes safety checks to prevent rule injection and cheating:

  • Cannot directly set enemy HP or stats
  • Cannot ignore previous rules or "jailbreak" the system
  • Cannot execute actions outside your agent's capabilities
  • Invalid rules will be marked as INVALID and won't execute