Supervised Project · SCE · Computer Science · Ashdod

Zone Tag

A symmetric multi-agent reinforcement-learning environment in which two agents learn to pursue, evade, orient, and counter-adapt through self-play.

2024–2025Daniel Cohen · Gal ElhianiPPOUnity ML-AgentsSelf-playOutstanding Research Project · 2025
3M+training steps
17observation dimensions
2continuous actions
PPOself-play policy learning
Research question

Can directional geometry shape richer competitive behavior?

The project asks whether two identically structured agents, without fixed chaser/evader roles, can learn meaningful pursuit-evasion strategies when tagging is determined not only by contact but by who is facing the opponent more directly at the moment of collision.

When the two agents touch, a dot-product comparison between each agent’s forward vector and the direction toward its opponent determines the successful tag. This turns orientation itself into part of the game mechanics and reward structure.

Core objectives

  • Build a symmetric two-agent tag environment.
  • Train both agents simultaneously with PPO (Proximal Policy Optimization, a reinforcement-learning method).
  • Use geometric alignment to resolve tagging.
  • Study emergent strategies and counter-strategies.
  • Use staged (curriculum) training to improve learning stability and generalization.
System design

Self-play, geometric rewards, and curriculum learning

Observation space

Each agent observes its own position and forward direction, the opponent’s position and orientation, direction and distance to the opponent, and a directional-alignment comparison.

Action space

Two continuous controls govern forward/backward motion and rotation, enabling fine-grained maneuvering rather than discrete movement.

Reward structure

A successful directional tag earns a positive reward, being tagged is penalized, and a small time penalty discourages stalling.

PPO

Proximal Policy Optimization (PPO) is a reinforcement-learning method in which each agent improves its policy, the rule that maps what it observes to what it does, from repeated simulated play. PPO limits how far each update can move the policy from the previous one, which keeps learning stable.

Self-play

Both agents learn at the same time against each other. The opponent is not a fixed scripted bot: its policy is swapped every 2,000 steps from a pool of the last ten saved versions, and half the time the agent faces the most recent one, so the opposition keeps changing as both improve.

The tag rule

A tag happens when the two agents touch. At that moment each agent’s facing is measured with a dot product: 1 means looking straight at the opponent, 0 sideways, and negative away. Whichever agent was more directly facing the other gets the tag, so contact alone is not enough.

Curriculum learning

Training was staged: a small arena with frequent encounters first, then randomized spawn positions and orientations, then larger arenas and obstacles, advancing when the agents tagged consistently. This is a training design. The report credits it with scaffolding learning, but does not isolate its contribution with a controlled comparison against training without a curriculum.

Unity scene view of the Zone Tag arena: a walled square arena with two humanoid agents, one red and one blue, and cube obstacles around it.
The Zone Tag arena in the Unity editor, with the two competing agents. Select the image to open it full size.
Diagram of the Zone Tag training system: agents, geometric tag rule, PPO self-play and curriculum stages.
Conceptual view of the training loop and the geometric tag rule.
What the experiments revealed

The interesting part was not just learning; it was adaptation.

Emergent exploit

In a compact arena, one agent discovered a spinning strategy that maximized directional coverage and initially dominated the opponent.

Counter-strategy

The opponent later adapted by charging directly into the predictable spinning behavior, reversing the performance gap. This was a useful demonstration of strategic co-adaptation in self-play.

Overfitting failure

With fixed spawn locations, both policies began exploiting positional regularities rather than learning general game dynamics. Randomized spawning and orientation were introduced to break those shortcuts.

Obstacle failure

When obstacles were added without being represented properly in the agents’ observations, behavior degraded. The agents could not reliably reason about objects they were not actually observing. This was a concrete lesson in state representation design.

Evaluation

Success was measured behaviorally as well as numerically.

The evaluation combined tag win rate, cumulative reward, episode length, periodic model snapshots, learning curves, and qualitative replay analysis. That combination mattered because an apparently high reward could still reflect an exploit or overfitting rather than robust strategic behavior.

Main metrics

  • Tag win rate
  • Average episode length
  • Cumulative reward
  • Behavioral replay analysis
  • Performance against earlier policy snapshots
Related

Related work

Smart Traffic Control →

Another reinforcement-learning project: a Q-learning controller trained in a simulated environment.

Project materials

Final report.

The student final report for this project, as a PDF.

Research continuation

From capstone to research question

The project developed into a broader research direction on geometric awareness in agent-based tag, including how facing direction changes the learned behavior of autonomous agents.