Football rules

From aws-samples/sample-ai-possibilities · View interactive version

Football rules is an AI agent skill from the GitHub repository aws-samples/sample-ai-possibilities. Activate when discussing game rules, player actions, scoring, fouls, cards, or match format

How to use this skill

Skill file

Football Game Rules & Mechanics

Comprehensive reference for the Agentic Football 5v5 game — actions, player stats, fouls, match format, and coaching.

Match Format

| Attribute | Value |

|-----------|-------|

| Team Size | 5 players per team |

| Match Duration | 5 minutes (single half, no halftime) |

| Game Speed | 60 ticks per second |

| Agent Response Time | 500ms maximum per decision |

Every tick, the server sends game state to your agent. Your agent analyzes the situation (within 500ms) and returns an action. The server validates and executes it, then repeats.

Player Positions

Actions

Movement Actions

| Action | Description | When to Use |

|--------|-------------|-------------|

| WALK | Slow movement (conserves stamina) | Positioning, when not urgent |

| RUN | Fast movement (uses stamina) | Chasing ball, getting into position |

| SPRINT | Maximum speed (high stamina cost) | Critical moments, breakaways |

| STOP | Stop moving | When in position, waiting for pass |

Parameters: Direction (N, NE, E, SE, S, SW, W, NW), Speed (1-10)

Ball Actions (When You Have Possession)

| Action | Description | Parameters |

|--------|-------------|------------|

| SHORT_PASS | Ground pass to nearby teammate | Target player ID, Power (1-5) |

| LONG_PASS | Aerial pass to distant teammate | Target player ID, Power (1-10) |

| THROUGH_PASS | Pass into space ahead of teammate | Direction, Power |

| CROSS | Aerial pass into penalty box | Target zone, Power |

| SHOOT | Attempt to score | Direction, Power (1-10) |

| DRIBBLE | Move while keeping the ball | Direction, Speed |

Defensive Actions (When You Don't Have the Ball)

| Action | Description | Risk Level |

|--------|-------------|------------|

| TACKLE | Attempt to take the ball | Medium — can foul |

| SLIDE_TACKLE | Sliding tackle | High — likely foul if mistimed |

| INTERCEPT | Position to intercept a pass | Low |

| MARK | Follow a specific opponent | Low |

Goalkeeper Actions

| Action | Description |

|--------|-------------|

| DIVE | Dive to save a shot (left/right/up) |

| CATCH | Catch the ball |

| PUNCH | Punch the ball away |

| THROW | Throw to a teammate |

| GOAL_KICK | Long kick from the goal area |

Special Actions

| Action | Description |

|--------|-------------|

| IDLE | Do nothing (default if agent times out) |

| HEADER | Head the ball (automatic when ball is aerial) |

| CELEBRATE | Celebration animation after scoring |

Player Stats

Physical Stats

| Stat | Range | Effect |

|------|-------|--------|

| Speed | 1-100 | Maximum movement speed |

| Stamina | 1-100 | Endurance; depletes during running/sprinting |

| Strength | 1-100 | Tackle effectiveness, ball retention |

Technical Stats

| Stat | Range | Effect |

|------|-------|--------|

| Shooting | 1-100 | Shot accuracy and power |

| Passing | 1-100 | Pass accuracy |

| Dribbling | 1-100 | Ball control while moving |

| Tackling | 1-100 | Tackle success rate |

Goalkeeper Stats

| Stat | Range | Effect |

|------|-------|--------|

| Reflexes | 1-100 | Save reaction time |

| Positioning | 1-100 | Optimal position selection |

| Handling | 1-100 | Catch vs punch decision quality |

Runtime State

| State | Description |

|-------|-------------|

| Current Stamina | Depletes during match, affects speed |

| Yellow Cards | 2 yellows = red card = ejection |

| Red Card | Player is ejected from match |

| Injured | Reduces speed and effectiveness |

Scoring

Fouls and Cards

Yellow Card Offenses

Red Card Offenses

Consequences

Ball Out of Play

Game State (What Your Agent Sees)

Each tick your agent receives:

Your agent cannot see: opponent agent code/strategy, future predictions, hidden stats, or other agents' decision-making.

Coaching System

During live matches, coaches can send natural language instructions to agents via the Viewer Portal.

Examples:

Limitations:

Conversation History:

Coaching Tips:

The Field

Key zones:

Spatial concepts: width (spread for passing options), depth (support at different distances), spacing (prevent crowding), positioning (right place, right time).

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.