run_battle
Execute a 1v1 battle between two strategies using their IDs or custom JavaScript code. Returns winner, remaining HP, and total turns.
Instructions
Run a 1v1 battle between two strategies. You can specify strategies by ID (from the available list) or provide custom strategy code. Returns the winner, final HP, and total turns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hp | No | HP for the battle (50-1000). Default: 100. Tournament mode uses 250. | |
| strategyA | No | Custom JavaScript code for strategy A. Must include '// Strategy Name: ...' comment and a 'function strategy(state) { ... }' function. | |
| strategyB | No | Custom JavaScript code for strategy B. Must include '// Strategy Name: ...' comment and a 'function strategy(state) { ... }' function. | |
| strategyIdA | No | ID of strategy A (from list_strategies). Use this OR strategyA code. | |
| strategyIdB | No | ID of strategy B (from list_strategies). Use this OR strategyB code. | |
| includeTurnLog | No | If true, includes the full turn-by-turn log. Default: false (for shorter responses). |