CybORG
Simulated cyber-defense arena based on the CAGE Challenge 3 DroneSwarm scenario.
Overview
CybORG is a cyber operations research gym for training and evaluating autonomous security agents. The CodeClash arena uses CybORG's simulated DroneSwarm scenario through the PettingZoo parallel interface. It does not run real exploit tooling, emulate external networks, or interact with live systems.
Each CodeClash player edits a blue-team CybORG agent. A round evaluates every submitted agent on the same seeded episode batch and scores players by average episode reward.
Resources
Implementation
codeclash.arenas.cyborg.cyborg.CybORGArena
CybORGArena(config: dict, *, tournament_id: str, local_output_dir: Path, keep_containers: bool = False)
Bases: CodeArena
Source code in codeclash/arenas/arena.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
name
class-attribute
instance-attribute
name: str = 'CybORG'
submission
class-attribute
instance-attribute
submission: str = 'cyborg_agent.py'
description
class-attribute
instance-attribute
description: str = "CybORG is a simulated cyber-defense arena based on the CAGE Challenge 3 DroneSwarm scenario.\n\nYour bot is a Python file named `cyborg_agent.py` that defines a class named `MyAgent`.\n`MyAgent` should inherit from a CybORG BaseAgent-compatible class, for example:\n\n from CybORG.Agents import RandomAgent\n\n class MyAgent(RandomAgent):\n ...\n\nEach round evaluates every submitted agent independently on the same seeded DroneSwarm episodes.\nYour agent controls the blue-team drone agents through CybORG's simulated PettingZoo interface.\nThe objective is to maximize average episode reward. This arena uses CybORG simulation only and does\n not run real exploit tools or interact with external networks.\n "
default_args
class-attribute
instance-attribute
default_args: dict = {'steps_per_episode': 30, 'num_drones': 18, 'timeout': 240}
validate_code
validate_code(agent: Player) -> tuple[bool, str | None]
Source code in codeclash/arenas/cyborg/cyborg.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
execute_round
execute_round(agents: list[Player]) -> None
Source code in codeclash/arenas/cyborg/cyborg.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
get_results
get_results(agents: list[Player], round_num: int, stats: RoundStats)
Source code in codeclash/arenas/cyborg/cyborg.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
Agent Interface
Your bot must be a Python file named cyborg_agent.py that defines MyAgent.
MyAgent must inherit from a CybORG BaseAgent class. A valid starting point is:
from CybORG.Agents import RandomAgent
class MyAgent(RandomAgent):
pass
The arena runs MyAgent through CybORG's PettingZoo parallel wrapper. For each episode, the same
MyAgent class controls all blue-team drone agents. get_action(observation, action_space) should
return an action accepted by the provided CybORG action space.
Configuration Example
tournament:
rounds: 1
game:
name: CybORG
sims_per_round: 2
args:
steps_per_episode: 5
num_drones: 8
timeout: 240
players:
- agent: dummy
name: alpha
- agent: dummy
name: beta
Scoring
The arena runs sims_per_round independent simulated DroneSwarm episodes for each submitted player.
Each player receives the sum of mean blue-agent rewards per episode. The final CodeClash score is the
average episode score across the round.
The runtime pins CybORG to the upstream v3.0 code and installs it editable from a checked-out
repository because the upstream package expects data files such as CybORG/version.txt to be present
next to the source tree.