Friday, May 14, 2010

Running Experiments and Using Scripts

One of the huge advantages of using a computer simulation platform such as PS-I lies in its ability to generate large sample sizes for experiments in a relatively short amount of time as well as being able to easily store and process large amounts of data.  However, taking advantage of these capabilities requires a basic understanding of Tcl/Tk, a programming language that can be used to give a series of instructions to PS-I.  Tcl/Tk can be used to produce scripts (.scp files) which you can load in PS-I the same way you would load a model file (.mdl).  Scripts have a wide range of functionality, but for the purposes of this post we will be using scripts to a) Run a model multiple times while collecting statistics for each run and b) Change model parameters during the course of a run.

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.