Thursday, May 6, 2010

Altering Attributes

In Brandon's last post, he described one way to attempt to control for events beyond the analytic horizon in PS-I, which we call bias.  There are two ways an agent calculates identity weights: its neighborhood and the global bias values.  I will now explain this process of changing an agent's cache attribute (which is the same as switching its repertoire), which of course is only one of many ways that this type of calculation could be made.  First, the current agent counts the activated identity of each agent in its neighborhood, adding to its identity weights.  Once that process is complete, it adds each identity's current bias value to the identity weights.  It then has a value for each identity, some of which might be negative if the identity has a negative bias value.  The current agent then takes that list of identity weights, and then finds the difference between its activated identity weight and every other identity weight.  For example, if the current agent's activated identity has a weight of 3, and another identity has a weight of 5, then the difference is two, and that is the identity weight the agent will then use to decide if it should change its repertoire.  This method of subtraction is called differential count.

Once each identity in the landscape has an identity weight for the current agent, the triggers play a role.  There are three triggers: Rotation_trigger, Substitution_trigger, and Activation_substitution_trigger.  First, if the activated identity has the highest weight, there are no further steps, and the repertoire (activated and subscribed) remains the same.  Second, if there is an identity in the agent's repertoire that passes the Rotation_trigger, then the agent will activate on that identity and place the previously activated identity in its repertoire.  Third, if there is an identity outside of the agent's repertoire that passes the Activation_substitution_trigger (which is usually the highest trigger), then the agent will activate on that identity and discard the identity in the agent's repertoire with the lowest count.  Fourth, if there is no identity outside of the agent's repertoire that passes the Activation_substitution_trigger, then it checks for the usually lower Substition_trigger.  If there is an identity that passes the Substitution_trigger, then the agent will subscribe that identity and discard the identity in the agent's repertoire with the lowest count, excluding the activated identity.  I will now refer to these three triggers as the RT, ST, and AST for the sake of clarity.

So to sum up, an agent is content if its activated identity has the highest count, and keeps its repertoire.  If there are other identities that have higher counts than the activated identity, then the agent first checks its repertoire for an identity that passes the RT, since theoretically people prefer the identities they have in their repertoire over identities outside of their repertoire.  If there is no identity to rotate with its activated identity, it will then move outside of its repertoire, checking if there are any identities that pass either the ST or AST.  If there is and identity that passes the AST, then that identity will become activated, which is the most extreme type of identity change an agent can undergo.  If there is an identity that passes the ST, then that identity will become subscribed, and the current activated_identity will remain.  These descriptions, though technical, will become much more important as our model examples become more complex.  It might be helpful to return to this section in the future.

But what are the actual values of these triggers?  Of course the short answer is that it depends on the model.  In the previous example (SimpleB.mdl), the three triggers were parameters in the model, and the default values for RT, ST, and AST, were 2,5, and 7, respectively.  I recommend returning to this example now and experimenting with the different triggers and their effect on the operation of the model.  You can also change the Influence_level (IL), which means that each agent adds more to the identity weight of each agent when it's calculating its neighborhood.  The last agent-specific parameter you can change in this model is Sight_range (SR), which denotes the distance each agent will "look" to see its neighbors.

Although SimpleB has many interesting dynamics and is a good example of how the process of switching identities works, we're going to now move into a more complicated model which is called SimpleC.mdl.  This model has more than one "type" of agent.  There is still the normal agent with an IL of 1, RT of 2, ST of 5, and AST of 7.  There is also another agent with an IL of 2, RT of 1, ST of 3, and AST of 6, which we will call an entrepreneur (even though it is technically the same agent class).  You can tell if an agent is an entrepreneur from the field viewer if it has a small rectangle inside of it.  Entrepreneurs in our models represent political opportunists, who are less attached to their repertoire, and more likely to change their identity when a slightly better one comes along.  They also have a higher influence level because of their relatively greater political power.  In order to operationalize this concept in the model, I changed the SR, IL, RT, ST, and AST from model parameters to agent attributes.  Because of this, if you look at an agent using the Field Viewer and Agent Viewer, you will see that each agent has a value for all of these new attributes, along with the cache, which has always been an agent-specific attribute.  Having different types of agents on the landscape allows many interesting interaction effects, and causes the landscape to become more "bumpy".

Once the model is loaded, by right-clicking on an agent and selecting Edit this agent, the Effect Tool pops up.  You now have access to change an agent's attributes by changing an attribute, checking the box next to the attribute, and then clicking Apply Effect.  This can allow you to create many different types of agents with different ILs or SRs, for example.  I also highly recommend opening SimpleC.mdl in notepad or Notepad ++ to see the source code.  There are 115 lines this time (up from the previous 75 lines), but the model is still fairly simple to understand.  In future posts, I plan to go into the details of the code to make PS-I as transparent and accessible as possible.

No comments:

Post a Comment