AI Job System¶
This page explains the Legacy AI Behavior we experimented with for the project.
Our unfinished AI design used well-defined behavioral roles called Jobs. Each job had its own file in ai/behavior/, implementing the abstract JobTemplate class. This class provided a shared structure for all specialized behaviors.
Overview¶
Newcomer - Default job for any freshly spawned player. - Waits to be assigned a role by the existing Elder. - If no Elder broadcast is heard for 50 ticks, promotes itself to Elder.
Elder - A single Elder exists per civilization. - Acts as the central coordinator:
Chooses a “home tile” near civilization center.
Receives stones, food, and players for incantations.
Assigns jobs to newcomers.
Tracks the roles and locations of all known players.
Garblers are a partial exception: they are not tracked as precisely, and assignment is rarer to avoid confusion.
Basic - Default worker role. - Randomly paths around the map, collecting any stones in its way. - Broadcasts when it has enough resources to evolve.
Collector - Focuses on gathering specific stones. - Delivers resources to the Elder’s designated home tile.
Garbler - Leaves the civilization to embed itself in an enemy team. - Goal is to disrupt enemy communication. - For every message it sends, it cycles modes:
50% Raven: emits nonsense (including invalid encodings like feff).
40% Mimicry: repeats verbatim any intercepted enemy message.
10% Parrot: repeats messages with heavy modification.
Job Assignment System¶
The Elder assigns jobs dynamically, using our team’s broadcast protocol. Each player listens for instructions and responds appropriately.
Communication Protocol¶
All inter-player instructions passed through team broadcasts during the game are defined below:
Job |
Instruction (Recv) |
Instruction (Send) |
Effect |
Args / Type |
|---|---|---|---|---|
Basic |
|
|
Elder-directed reassignment; immediate job transition |
id: |
|
|
Respond to group evolution call |
id: |
|
|
|
Periodic status update to elder |
level: |
|
|
|
Respond if excess resource is held |
resource: |
|
Elder |
|
|
Assigns newcomer to job |
id: |
|
|
Update depot stock from collector; ask for reports |
resource: |
|
|
Updates elder position for everyone |
x: |
||
Newcomer |
|
|
Announces presence and level; awaits elder reply |
id: |
|
|
Elder assigns role; confirms join |
id: |
|
Collector |
|
Dispose of the collected stones on the Elder’s tile |
resource: |
|
Garbler |
variable garbage |
Disruption: random unreadable text |
|
|
intercepted_message (mimicry/parrot) |
Disruption: repeated or modified enemy message |
|
||
any enemy message |
Stores for mimicry or parrot use |
|
Behavior Philosophy¶
This system was designed to:
Decentralize coordination via broadcast-based communication.
Have a single Elder coordinate overall strategy.
Allow role reassignment and adaptability during play.
Disrupt enemy teams by embedding Garblers who mimic or garble enemy messages.
Although unfinished, this “Job System” represents an ambitious attempt to create complex AI behaviors resembling a true in-game society.