Action Space & Kinematics
This page details the discrete action space, kinematic transition dynamics, vertical thrust equations, and joint action space formulations for the multi-agent drone swarm in ScrollSwarm.
1. Discrete Action Space
Each autonomous UAV \(i \in \{1, \dots, N\}\) operates over a discrete action space conforming to Gymnasium and PettingZoo standards:
| Action Index | Identifier | Vertical Velocity / Thrust | Physical Displacement \(\Delta y\) | Description |
|---|---|---|---|---|
0 |
Action.UP |
Negative vertical velocity | \(\Delta y = -k\text{ px}\) | Ascends (climbs) toward higher altitude |
1 |
Action.STAY |
Zero vertical velocity | \(\Delta y = 0\text{ px}\) | Maintains current flight altitude |
2 |
Action.DOWN |
Positive vertical velocity | \(\Delta y = +k\text{ px}\) | Descends (dives) toward lower altitude |
By default, the vertical step size is \(k = 5\text{ px/step}\).
2. Kinematic Transition Equations
2.1 State Evolution
At time step \(t\), UAV \(i\) is positioned at \((x_i, y_i(t))\). Because UAVs occupy fixed longitudinal station-keeping columns along the \(x\)-axis, horizontal coordinates remain fixed in the screen frame:
Vertical altitude evolves according to the selected discrete action \(a_{i, t} \in \mathcal{A}_i\):
Where:
- \(h_{\text{uav}} = 16.0\text{ px}\) is the physical bounding height of the UAV.
- \(H = 400\text{ px}\) is the total corridor height.
- Clamping ensures the drone geometry physically remains within the screen bounds even before boundary collision checks occur.
2.2 Terminated / Crashed UAV Invariant
If a UAV collides with an obstacle or corridor boundary at time \(t\), its operational state transitions to alive = False:
Terminated drones become inactive obstacles on the field; their actions are ignored, and they are pruned from env.agents.
3. Joint Action Space
In multi-agent systems with \(N\) drones, the joint action space \(\pmb{\mathcal{A}}\) is the Cartesian product of the individual action spaces (Boutilier, 1996; Oliehoek & Amato, 2016):
The cardinality of the joint action space grows exponentially with swarm size \(N\):
| Swarm Size \(N\) | Joint Action Combinations \(\|\pmb{\mathcal{A}}\|\) | Complexity Class |
|---|---|---|
| 1 | \(3^1 = 3\) | Standard single-agent discrete space |
| 3 | \(3^3 = 27\) | Easily solvable via centralized value iteration |
| 5 (Default) | \(3^5 = 243\) | Combinatorial multi-agent coordination |
| 8 | \(3^8 = 6,561\) | Requires factorized value functions (e.g., QMIX, VDN) |
| 10 (Maximum) | \(3^{10} = 59,049\) | High-dimensional joint action space |
This combinatorial growth illustrates why independent decentralized execution or factorized value decomposition is necessary for large swarms.
4. Code Implementation & Tuning Parameters
Action mapping and kinematic stepping are implemented in scrollswarm/agent.py:
from scrollswarm.agent import Agent, Action
# Instantiate a single UAV
drone = Agent(
agent_id=0,
x=100.0,
y=200.0,
step_size=5, # Vertical step k (px)
width=20.0, # Horizontal collision span (px)
height=16.0, # Vertical collision span (px)
)
# Step UAV with discrete action
drone.step(Action.UP, map_height=400)
assert drone.y == 195.0
Parameter Tuning Table
| Argument | Class / Location | Default | Range | Impact on Dynamics |
|---|---|---|---|---|
step_size |
Agent.__init__ |
5 |
\([1, 20]\) | Vertical agility; larger values allow faster obstacle evasion but coarser vertical positioning |
width |
Agent.__init__ |
20.0 |
\([8.0, 40.0]\) | Physical horizontal collision width of the quadcopter |
height |
Agent.__init__ |
16.0 |
\([8.0, 32.0]\) | Physical vertical collision height of the quadcopter |
num_agents |
ScrollSwarmEnv.__init__ |
5 |
\([1, 10]\) | Swarm cardinality \(N\), defining joint action space dimension \(3^N\) |
5. References
- Boutilier, C. (1996). Planning, learning and coordination in multiagent decision processes. In Proceedings of the 6th Conference on Theoretical Aspects of Rationality and Knowledge (TARK), pp. 195–210. ACM DL: 237197.
- Sutton, R. S., & Barto, A. G. (2018). Reinforcement Learning: An Introduction (2nd Edition). MIT Press. Book Link.
- Oliehoek, F. A., & Amato, C. (2016). A Concise Introduction to Decentralized POMDPs. SpringerBriefs in Intelligent Systems, Springer. DOI: 10.1007/978-3-319-28929-8.