# Modeling Firm Search and Innovation Trajectory Using Swarm Intelligence
## 3 Materials & Methods
### Model Development
Setting \(\epsilon=0\) allows for collocation, while setting \(\epsilon\) to a very small number insures some minimal \"separation\". In addition to the three classic parameters--alignment, cohesion, and separation--we added two additional ones that capture theoretically interesting firm search behavior. Evolutionary economic models suggest that firms will be influenced by their past performance and may exhibit path-dependent behavior. To incorporate this element into our model, we defined the following equation:  
\[\overset{\rightharpoonup}{v}_{P,t}^{(i)}=(1-\alpha_{P})\overset{\rightharpoonup}{u} _{t}^{(i)}+\alpha_{P}(\overset{\rightharpoonup}{p}_{t}^{(i)}-\overset{ \rightharpoonup}{x}_{t}^{(i)}) \tag{5}\]  
where, for the \(i\)th firm, \(\overset{\rightharpoonup}{u}_{t}^{(i)}\) is a uniform random number in [0,1], \(\overset{\rightharpoonup}{p}_{t}^{(i)}\) is the historical personal best (measured by the fitness function), and \(0\leq\alpha_{P}\leq 1\) is a weight allowing the firm to choose between full exploration \(\alpha_{P}=0\) (which is a totally random move) and full exploitation \(\alpha_{P}=1\) (only follow its own personal best). Organizational theory suggests that a firm may follow specific competitors, such as the leader in the market [64]. We modeled this possibility as follows:  
\[\overset{\rightharpoonup}{v}_{L,t}^{(i)}=\alpha_{L}(\overset{\rightharpoonup}{g }_{t-1}-\overset{\rightharpoonup}{x}_{t-1}^{(i)}) \tag{6}\]  
where \(\overset{\rightharpoonup}{g}_{t-1}\) is the leader's position which is chosen from all the personal bests and \(\alpha_{L}\) is a scaler to gauge how a firm decides to follow the industry leader, e.g., a negative \(\alpha_{L}\) indicates that the firm chooses to move away from the leader. In our demonstration, we defined the leader based on who has the highest performance at time \(t-1\). The ability to define \(\overset{\rightharpoonup}{g}_{t-1}\) in a variety of ways allows for a simple yet flexible way of modeling a variety of variations of imitative behavior. To update a firm's position, we used the following formula:  
\[\overset{\rightharpoonup}{x}_{t}^{(i)}=\overset{\rightharpoonup}{x}_{t-1}^{(i )}+\overset{\rightharpoonup}{v}_{t}^{(i)} \tag{7}\]  
In Section 4, we describe how to fit this model to data and provide some example results on a test sample of patent data. In a simulation of firms' behaviors, one starts with a randomly chosen landscape (\(n\)-dimensional \(\overset{\rightharpoonup}{x}_{0}^{(i)}\)) with a set of chosen parameter values \(w_{A},w_{C},w_{S},w_{L},w_{P}\), and \(\alpha_{P},\alpha_{L}\). These allow one to first calculate Equation (2) through (6) and then Equation (1). Once the velocity (Equation (1)) is calculated, the next landscape \(\overset{\rightharpoonup}{x}_{1}^{(i)}\) can be calculated by Equation (7). The process repeats as many times as one desires. In a long simulation, the parameters that describe the initial landscape are ultimately irrelevant. For example, if \(w_{P}\), \(w_{L}\), \(\alpha_{P}\) and \(\alpha_{L}\) are high, then the swarm will converge to a single point ultimately. Or alternatively, if \(w_{A}\) and \(w_{C}\) are high, then firms move in a group (much like a school of fish). Note that while the parameter values could change over time, they are not made to do so. This is because we want to observe the search behavior over time (e.g., so that we can examine if firms converge or diverge from each other). Most likely, in real situations such as ours they will be time-varying. However, an empirical concern is whether there is enough data to solve for time-varying parameters. This issue is discussed in the next section. In our empirical work here, we used data to solve for the parameter values in order to examine and explain how firms interact with one another. Using data, we first obtained all the positions of all the firms, i.e., \(\overset{\rightharpoonup}{x}_{t}^{(i)}\) for all \(t=0,1,\cdots,T\).