The behavior files vary depending on the dog's stage and personality variant. State transitions are done through a system of Patterns and Arcs. Patterns are the conditions under which a state transition will take place.
Arcs are the way of transitioning from one state to another.
Each Pattern has one or more Arcs attached to it. The Arcs are attached to the Pattern with a weight, or probability. When a Pattern's condition is true, one of the Arcs is picked based on a random number and each Arc's probability. Each Arc has an optional action to perform and a new state to goto. There are two Arcs, each with a 50-50 chance of being chosen.