Skip to content

bagotios/intent-driven-task-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Intent-Driven Task Assignment (IDTA)

A scalable asynchronous decision layer for game AI with 500+ coordinated agents at 60 FPS

License: CC BY 4.0

Overview

Intent-Driven Task Assignment (IDTA) is an AI architecture that enables hundreds of game agents to exhibit coordinated, tactically sophisticated behavior while maintaining real-time performance. Traditional Goal-Oriented Action Planning (GOAP) systems cost O(n) per agent, making 500 agents at 60 FPS computationally prohibitive. IDTA achieves O(m+n) complexity independent of agent count — providing up to 300x+ performance improvements.

The Challenge

Traditional GOAP with 500 units:

  • Each agent independently evaluates all possible goals
  • 500 agents × 5ms evaluation = 2,500ms per frame (unplayable at 60 FPS)

The IDTA Solution

IDTA with 500 units:

  • Strategic decisions computed once and broadcast
  • 4 directions × 10 categories = 4ms total (playable)
  • Agents autonomously match tasks to their capabilities

Result: Faster decision-making while maintaining behavioral sophistication.

Core Concept

IDTA separates strategic intent from operational execution:

  • Strategic Layer: Broadcasts high-level intent ("Destroy the main base")
  • Tactical Layer (IDTA): Translates intent into specific tasks (NORTH+MELEE → ASSAULT_BASE)
  • Operational Layer: Agents execute tasks autonomously

Key Innovation: Task decisions are computed asynchronously and broadcast rather than computed per-agent every frame/tick.

How It Works

Task Assignment Function

$$\text{Task} = f(\text{Intent}, \text{Direction}, \text{Category}, \text{SpatialModel})$$

Example:

  • Intent: DESTROY_MAIN_BASE
  • Direction: NORTH (1 of 4 cardinal directions)
  • Category: MELEE (1 of 10 unit types)
  • Result: ASSAULT_BASE(target=main_base, priority=HIGH)

Complexity: 4 directions × 10 categories = 40 tasks computed once when intent changes, not per-frame.

Four-Layer Architecture

  1. Procurement (spawn systems): Introduces agents with category tags
  2. Strategic (director AI/scripts): Broadcasts high-level intent
  3. Tactical - IDTA: Translates intent → tasks in O(m+n) time
  4. Operational (execution): Agents autonomously match and execute tasks

Key Features

Performance & Scalability

  • Agent-count independent: Same computational cost for 50 or 5,000 agents
  • Asynchronous updates: Event-driven recomputation, not per-frame
  • Reduces per-agent overhead from 5-10ms → 0.5-1ms
  • Enables 500+ agents at 60 FPS on modest hardware

Emergent Coordination

  • Forces naturally distribute across objectives without centralized assignment
  • Implicit squad formation through shared task broadcasts
  • Complex group tactics from simple autonomous rules

Integration Flexibility

  • Intent-source agnostic: Works with director AI, scripts, game modes, player commands
  • Execution-agnostic: Compatible with GOAP, Behavior Trees, FSMs
  • Modular design: Swap strategic/execution layers without touching IDTA core

Performance Comparison

Approach 50 Agents 500 Agents 1,000 Agents
Traditional GOAP 250ms 2,500ms 5,000ms
IDTA 4ms 4ms 4ms
Speedup 62x 625x 1,250x

Assumes 5ms per GOAP evaluation, 4ms for IDTA task computation

Use Cases

Ideal For

  • Horde games: Zombie swarms, alien invasions, defending armies
  • RTS defense: Waves of attackers, siege scenarios
  • Tower defense: Hundreds of enemies with varied behavior
  • Large-scale battles: 100+ units requiring coordination

Examples by Genre

  • Zombie Survival: 500 zombies coordinate multi-directional base assault
  • RTS: Enemy forces distribute across 3 resource outposts + main base
  • Tower Defense: Mixed enemy types (fast, tank, flying) execute coordinated strategies
  • Fantasy Siege: Melee, ranged, and siege units coordinate castle assault

Core Principles

Intent Stability

  • Maintain intent for 30-60+ seconds minimum
  • Avoid constant task switching (thrashing)
  • Change only on significant events

Category Design

  • Use capability-based tags (MELEE, FAST), not identity (ZOMBIE, ROBOT)
  • Start with 5-10 categories
  • Allow units to have 2-4 categories for flexibility

Direction Granularity

  • 4-way cardinal (N/S/E/W) recommended for most games
  • 8-way for large maps with 400+ units
  • Aim for 20+ units per sector to avoid fragmentation

Task Commitment

  • Agents stick with tasks until completion, impossibility, or priority change
  • Prevents reactive thrashing
  • Enables sustained progress toward objectives

Key Contributions

  1. Asynchronous decision layer decoupling strategic intent from per-agent planning
  2. Category-based task matching enabling autonomous agent self-selection
  3. Event-driven updates avoiding excessive recomputation and polling rigidity
  4. Emergent coordination framework producing complex group behaviors without explicit communication
  5. GOAP transformation from multi-goal planning to single-goal execution (10x per-agent speedup)

Requirements

Minimal

  • Event system for intent/world state changes
  • Ability to tag units with categories
  • Basic spatial awareness (position → direction mapping)

Recommended

  • Lightweight execution layer (GOAP, BT, or FSM)
  • Director AI or scripted intent source
  • Spatial partitioning for performance optimization
  • Visualization/debugging tools

Documentation

The full paper provides:

  • Detailed architecture and algorithms
  • Task determination strategies for various intents
  • Spatial model integration
  • Event-driven update triggers
  • Multi-category priority matching
  • Integration with GOAP/BT/FSM execution layers

Related Work

IDTA builds upon and integrates with:

  • Goal-Oriented Action Planning (GOAP)
  • Behavior Trees (BT)
  • Multi-agent coordination systems
  • Event-driven architectures
  • Director AI and dynamic difficulty adjustment

Citation

If you use IDTA in academic work, please cite:

@article{stuckert2024idta,
  title={Intent-Driven Task Assignment: An Asynchronous Decision Layer for Scalable Game AI},
  author={Stuckert, Daniel},
  year={2024},
  version={1.0}
}

License

This work is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

You are free to share and adapt the material with appropriate attribution to the author.


Scalable AI for massive agent coordination: hundreds of agents with emergent, coordinated, tactically sophisticated behavior at 60 FPS

About

A scalable asynchronous decision layer for game AI with 500+ coordinated agents at 60 FPS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published