Plain English → AI Robot Rules Generator

Type plain English like "Stop if obstacle within 50cm" and auto-generate JSON behavior rules via LLM. Directly upgrades your existing simulator. Lowest effort, highest viral potential.

Describe Robot Behavior in Plain English

💡 Tip

Use natural language. Include conditions (if/when/until) and actions (move/stop/rotate). The AI will convert to structured JSON for your robot simulator.

Generated JSON Behavior Rules

Status
✅ Ready to generate
Generated Rules (JSON)
{
  "rules": [
    {
      "condition": "obstacle_within_30cm",
      "action": "stop",
      "priority": 1,
      "description": "Move forward until obstacle within 30cm"
    },
    {
      "condition": "battery_below_20_percent",
      "action": "goto_charger",
      "priority": 2,
      "description": "If battery below 20%, go to charger"
    },
    {
      "condition": "cliff_detected",
      "action": "stop_and_turn_around",
      "priority": 3,
      "description": "When cliff detected, stop and turn around"
    },
    {
      "action": "rotate_left_90_degrees",
      "frequency_sec": 10,
      "priority": 4,
      "description": "Rotate left 90 degrees every 10 seconds"
    },
    {
      "condition": "line_sensor_sees_black",
      "action": "follow_line",
      "priority": 5,
      "description": "Follow line if sensor sees black tape"
    }
  ],
  "version": "1.0",
  "simulator_compatible": true
}

📘 How To Use Plain English → AI Robot Rules Generator

📝 Step 1: Enter Plain English Instructions

Type robot behavior rules in natural language. One rule per line. Be descriptive: include conditions (if, when, until) and actions (move, stop, rotate, follow).

⚙️ Step 2: Generate JSON Rules

Click Generate JSON Rules. The AI interprets your text and converts it into structured JSON format compatible with most robot simulators.

🔧 Step 3: Review & Adjust

Check the generated JSON. Each rule includes conditions, actions, priority, and metadata. You can manually tweak the JSON if needed.

📋 Step 4: Copy or Download

Use Copy to clipboard or Download as a .json file to import directly into your robot simulator.

💡 Pro Tips

  • Use the Load Samples button to see common patterns
  • Include thresholds: "within 30cm", "below 20%" for better precision
  • Combine actions: "stop and turn around" works well
  • The generator understands time-based rules: "every 10 seconds"
  • All processing happens in your browser — no data is sent to a server

Example Plain English:
"If temperature above 40°C, activate fan and slow down"

Generated JSON snippet:
{"condition": "temp_above_40c", "actions": ["activate_fan", "slow_down"], "priority": 2}

❓ Frequently Asked Questions

What robot simulators are compatible? ▼
The generated JSON follows a flexible schema compatible with most educational and hobby robot simulators, including our AI Robot Behavior Simulator. You can easily adapt the output format with minor tweaks.
How accurate is the AI interpretation? ▼
The generator uses pattern matching and natural language understanding to extract conditions, actions, and parameters. It works best for simple imperative sentences. For complex logic, you may want to fine-tune the JSON.
Can I use multiple conditions per rule? ▼
Yes! You can combine conditions using "and" or "or". For example: "If obstacle within 20cm and battery above 10%, turn right". The generator will create appropriate composite conditions.
What kind of actions are supported? ▼
Common actions include: move, stop, rotate (left/right/degrees), follow (line), go to charger, play sound, change speed, activate/deactivate sensors, and more. Custom actions can be added by editing the JSON.
Is my data secure? ▼
Absolutely. All processing happens client-side in your browser. Your plain English rules and generated JSON never leave your computer. No server-side API calls are made.
What are common errors? ▼
Vague descriptions like "do something" without conditions may produce incomplete rules. Missing units (like "within 30" vs "30cm") can lead to incorrect thresholds. The tool highlights potential ambiguities.
Can I import existing JSON? ▼
Currently the tool generates JSON from plain English. To edit existing JSON, you can paste it into the output area and modify manually, then use the copy/download buttons.
Does it support timing events? ▼
Yes! Phrases like "every X seconds", "after 5 seconds", or "delay 2 seconds" are recognized and added as timing parameters in the JSON (e.g., "frequency_sec", "delay_sec").