Thursday, September 12, 2013

Subsumption game rules, an AI approach to game design

I'm a big robotics fan, and back in the day when I was doing way more robotics than I have time for today I had the good fortune to stumble upon some good reads from Rodney Brooks and learned about the subsumption architecture,
"... a way of decomposing complicated intelligent behaviour into many "simple" behaviour modules, which are in turn organized into layers. Each layer implements a particular goal of the agent, and higher layers are increasingly abstract." 1

It is inherently a bottom-up design that starts with small and simple systems that are incorporated into bigger ones. The small systems become part of a bigger system that emerges through the union of different layers. It is a design mechanism I've been using for Weapons Free. During the first playtests players would ask how I was determining initiative, order of events, etc. I was, as it is commonly said, winging it. I lacked the systems to determine many of the things players are used to in games which are designed in a top-down manner. In these, combat is decomposed into different elements and in turn these elements into their individual black boxes that make up the whole combat mechanics.

Although subsumption and Brooks are common terms in AI based RPGs I haven't found that many references to such an architecture applied to RPG rule designs nor its impact on rule simplification. I'm really interested in seeing where this ends up as I strongly believe a layered rule system would be simpler than a complex flow chart type rule system. Particularly when it comes to complex tasks like combat.

The following diagram show an example subsumption network for a robot. It's pretty easy to see how terms can be replaced to account for protection/cover, movement and attack behavior. In a subsumption system "the main caveat is that separate tasks can suppress (or overrule) inputs or inhibit outputs. This way, the lowest layers can work like fast-adapting mechanisms (e.g. reflexes), while the higher layers work to achieve the overall goal" 2

The higher layers in this architecture hold the more abstract goals: "I attack the orc", "I cast fireball at the goblins", etc. Middle layers handle elements like the actual sword swings or spell casting, on top of the lower layers handling the environment and movement. Attacking and moving are things done concurrently and handled by each layer of the rule system, instead of a fixed sequence of activities done by each character in the party, like a move, casting and attack phase.

This way of assembling the rules poses some problems, but also some great benefits. On the downside there is no clear flowchart to follow and that is something players familiar with initiative-round-robin type rules will find disturbing. Initiative, which sets sequence of events in most games, must be replaced with a means to synchronize concurrent player action. All players in a scene are acting out their higher level activities, and each can be suppressed by their lower layers. The advantage I see is that a great deal many possibilities become available which were blocked out by a more structured flowchart type rule system. Quick reflexes are not commonly handled well in structured flowchart mechanics. If your character moved and is then attacked he can't move again. Why? Because the rules say so even when his instincts would say otherwise. If as player I decide to move and attack and the battlefield changes and my move doesn't seem that wise anymore, there is little I can do. Not because my character wouldn't move, but because the rules say so. All the actions my character could take at that point are blocked, not because my character could or couldn't really do them, but because the rules state something like one move and one action, etc.

In a subsumption system some layers can kick in and quickly change the flow of events. This is possible because they're occurring concurrently instead of being fixed at some point on a flowchart. For example in the game a soldier may raise his rifle and aim to shoot at a target. He may go unnoticed or call attention and get fired upon. The moment he begins to take fire his survival layer makes him take cover even when his intent is to fire the rifle. His higher, more abstract objective to attack is suppressed by the lower more imminent objective of staying alive. This turns game design from creating a series of flow charts describing the combat process in a neat cut way, as would be done in a top-down design, to an assemble of perception rules, notification rules, and activity rules.

Perception rules describe how your character or NPCs for that matter sense and are influenced by their environment: spotting rules, listening rules, etc., in general how the current environment is perceived by the character and turned into decisions by each layer. Notification rules specify how each layer can intercede in the other layers: ducking when taking fire, running when all is clear, etc. Activity rules specify how each activity in turn modifies the environment: casting a spell, firing a weapon, slashing with the sword, speaking, and moving around, among others.

Rules then become an assembly of lower systems that kick in when needed instead of a fixed set of rules described in a flowchart. So far these rules are simpler than their flowchart counterparts. Although I still have many holes in the system, the overall experience that emerges from the interaction of what is already in place is a lot more interesting that what I could have done with a more classic top-down approach to modern combat rules. The rules are more compact and more flexible.

Subsumption image courtesy:

1, 2 :
Post a Comment