Formal Specification
Tai Hang Fire Dragon Dance — Formal Specification
Hong Kong · festival-ritual · Confidence: low
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: abstractedGap-fills: 4
# Tai Hang Fo Lung — AI-optimized specification
## General idea
A large-scale cooperative ritual performance and synchronized trajectory navigation game based on the Hong Kong *Tai Hang Fo Lung* (Tai Hang Fire Dragon Dance). A distributed multi-agent ensemble coordinates the movement of a 67-meter multi-segment dragon through narrow street corridors, executing signature rotational figures (Dragon Chasing Pearl, Twisting Pillar, Hurricane Vortex) while managing bearer fatigue, incense burning rates, and shift rotations.
## Formal model
- **Abstraction taken:** The physical ritual performance is formalized as a multi-agent cooperative kinematic snake model on a discrete 2D street grid. The 67-meter dragon is discretized into 32 interconnected kinematic segments linked by rigid distance constraints, driven by 2 lead Pearl agents. Incense life is modeled as a continuous thermal decay resource.
- **Player/agent count:** 34 active bearer agents (2 Pearl Swirlers, 1 Dragon Head Bearer, 30 Body Segment Bearers, 1 Dragon Tail Bearer) plus a reserve rotation pool.
- **Turn model:** Real-time synchronized discrete ticks (, ).
## Formal rules
R1. **Dragon Kinematics & Graph:** The dragon consists of 32 sequential nodes where is the Dragon Head and is the Tail. Segment length between adjacent nodes is constrained to .
R2. **Pearl Guidance:** Two Pearl Swirler agents move dynamically in front of . The Dragon Head tracks the centroid of and . Each trailing segment follows the previous segment using inverse kinematic snake pursuit.
R3. **Choreography Figures:** The performance progresses through 4 mandatory choreographic states:
- *Figure 1: Dragon Chasing Pearl (雙珠戲火龍):* Sinusoidal forward street transit.
- *Figure 2: Crossing the Bridge (火龍過橋):* Tight 90-degree street corner negotiation without body collisions.
- *Figure 3: Twisting the Pillar (火龍纏柱):* Inward Archimedean spiral coiling and outward unwinding.
- *Figure 4: The Great Hurricane (大風起雙翼):* High-speed rotational circular vortex.
R4. **Bearer Fatigue & Shift Rotation:**
- Each bearer has a fatigue meter . Carrying the 48 kg Head consumes fatigue at normal rate.
- When , the bearer must execute `SWAP_RELAY` with an adjacent reserve bearer without interrupting dragon forward velocity.
R5. **Incense Glow Management:** Each segment holds an incense combustion counter . If , support crew agents must execute `INSERT_INCENSE` to maintain the glowing visual aura.
R6. **Cooperative Score & Completion:** The troupe earns a composite Performance Score based on formation cohesion, rhythm synchronization, and zero collision faults over the 3-night festival routine.
R7. [gap-fill] Discrete street grid representing Tai Hang (Wun Sha Street and Sun Chun Street) mapped as a 2D polygonal corridor graph.
R8. [gap-fill] Segment tension bounds: If distance between adjacent segments exceeds , a tension fault penalty is recorded.
R9. [gap-fill] Incense combustion decay: per tick; fresh bundle insertion restores to 100.
R10. [gap-fill] Fixed performance timeline: Each routine executes over 600 discrete ticks (, 5 minutes simulated time); completion triggers ritual blessing evaluation.
## Edge cases
- **Tie at the end condition:** Not applicable (pure cooperative ensemble performance evaluation).
- **A player with no legal move:** Kinematic following rules provide unique deterministic positions for trailing segments based on the Head's vector.
- **Repetition / cycles:** Fixed global performance clock guarantees termination.
- **Simultaneous claims on the same resource or position:** Segment collision avoidance prevents overlapping coordinate claims on street nodes.
- **Player elimination mid-round:** If a bearer reaches before relay, an emergency reserve bearer auto-slots into position.
- **Resource exhaustion:** Reserve bearer pool and incense supply bundles are pre-stocked to exceed maximum performance requirements.
- **Termination guarantee:** Guaranteed by strictly monotonic time progression .
## State representation
- **Persistent state:** `street_graph_nodes`, `segment_count: 32`, `target_choreo_sequence: List[str]`.
- **Per-player/segment state:**
- `segment_positions: List[Tuple[float, float]]`
- `bearer_fatigue: List[float]`
- `incense_glow: List[float]`
- `current_choreo_mode: str`
- **Per-turn ephemeral state:**
- `current_tick: int`
- `lead_pearl_vectors: Tuple[Tuple[float, float], Tuple[float, float]]`
- `active_relay_events: List[int]`
- **Observable information:** Fully observable centralized coordination state.
## Action space
- `move_pearl(dx, dy)`: Parameters: displacement vector for Pearl Swirlers.
- `step_head(target_coord)`: Parameters: target coordinate following Pearl centroid.
- `swap_relay(bearer_idx, reserve_id)`: Parameters: bearer replacement execution.
- `insert_incense(segment_idx)`: Parameters: replenishes segment incense counter.
## Playability notes
- **Single-player-vs-AI:** Operates as a cooperative rhythm / formation-control puzzle where the player steers the Pearl Swirler while AI handles multi-segment snake kinematics and bearer rotations.
- **Group games (n>4):** Natively models large-scale cooperative multi-agent swarms.
- **Physical-skill games:** Acrobatic strength, smoke endurance, and physical heat tolerance are abstracted into kinematic constraints and fatigue decay equations.
- **What is lost in the adaptation:** Fragrant incense smoke, thunderous gong and drum beats, shower of glowing sparks in night air, and community spiritual atmosphere.
## Implementation hints
- Model as an Inverse Kinematics (IK) multi-link snake chain in 2D.
- Primary algorithmic challenge: Path planning for a 67-meter snake through narrow street corridors without self-intersection during spiral coiling figures.
- First milestone: 2D simulation of a 32-segment chain tracking 2 revolving lead pearls through a 90-degree street bend.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Tai Hang Fire Dragon Dance (Hong Kong). (n.d.). Games of Countries. https://gamesofcountries.com/games/hk-hong-kong/tai-hang-fo-lung
@misc{gamesofcountries-hk-hong-kong-tai-hang-fo-lung,
title = {Tai Hang Fire Dragon Dance (Hong Kong)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/hk-hong-kong/tai-hang-fo-lung}
}