# Commits

committed 1e40a60

Don't use superscript for identifiers; use subscript. the index set can live in the parameter

• Participants
• Parent commits 537c541

# File docs/dan.pdf

Binary file modified.

# File docs/dan.tex

 \maketitle


-Each worker, $w$ indexed by $j$, has two fixed parameters: a knowledge value, $b^j$;
-and a culture vector $c^j$.
+Each worker $w$, indexed by $j$, has two fixed parameters: a knowledge value, $b_j$;
+and a culture vector $c_j$.
 Knowledge is presumed public,
 but the culture vector is visible to other agents only by its effects on productivity.

-$c^j$ is binary, of length, say, $8$.
-$b^j$ is chosen uniformly from the interval [0,1],
-and the elements of $c^k$ are chosen by i.i.d. fair coin-toss from $\{0,1\}$.
+$c_j$ is binary, of length, say, $8$.
+$b_j$ is chosen uniformly from the interval [0,1],
+and the elements of $c_k$ are chosen by i.i.d. fair coin-toss from $\{0,1\}$.

 There is a fixed finite market whose per-turn returns are fixed at unity.

-Each firm, $F^k$ is associated with a set $W^k_i$ of workers at each timestep $i$,
+Each firm, $F_k$ is associated with a set $W_k(t)$ of workers at each timestep $t$,
 which partition the workforce, i.e. each worker has at most one employer.
-It pays each worker a wage $\omega_i^j$, determined by means that will be
+It pays each worker a wage $\omega_j(t)$, determined by means that will be
 expanded momentarily.
-We denote by $f(n, i)$ the index of the firm whose
-worker set contains $w^n$ at time $i$.
-(We sometimes omit the $i$ parameter in
-this function, and the $i$ subscript in series variables, when the timestep
+We denote by $f(n, t)$ the index of the firm whose
+worker set contains $w_n$ at time $t$.
+(We sometimes omit the $t$ parameter in
+this function, and the $t$ parameters in series variables, when the timestep
 may be assumed from context.)

 Workers are initially assigned to firms at random with zero wages.

-Each turn, each firm receives a pro-rata distribution of the market, $R_i^k$
-based on firm effectiveness $E_i^k$,
+Each turn, each firm receives a pro-rata distribution of the market, $R_k(t)$
+based on firm effectiveness $E_k(t)$,
 \footnote{
 Alternately, a formal approach would be to use some game theory model, such as
 the Logit Quantal Response Equilibrium, in a simplified form

-$R^k = \frac{e^{\beta E^k}}{\sum_m e^{\beta E^m}}$
+$R_k = \frac{e^{\beta E_k}}{\sum_m e^{\beta E_m}}$

-where $R^k$ is the probability that a buyer chooses firm $k$.
+where $R_k$ is the probability that a buyer chooses firm $k$.
 I don't do this
 at the moment since I have no reason to suppose that the the addition of a new free parameter is merited.
 }

-$R^k = \frac{E^k}{\sum_m E^m}$
+$R_k = \frac{E_k}{\sum_m E_m}$

-Firm profit, $P^k$ is given $P^k=R^k-\sum_{j \in W^k} \omega_i^j$ - that is,
+Firm profit, $P^k$ is given $P^k=R_k-\sum_{j \in W_k} \omega_j(t)$ - that is,
 the profitability is income minus expenses, where expenses are assumed to be
 comprised only of worker wages.

-Firm funds, $\Phi^k$, are given
-$\Phi_i^k = \sum_{m=1}^i P_m^k + \Phi_0$ for $\Phi_0$ the startup capital.
+Firm funds, $\Phi_k$, are given
+$\Phi_k(t) = \sum_{i=1}^t P_k(t) + \Phi_k(0)$ for $\Phi_k(0)$ the startup capital.

 When a firm has no funds it may not spend any money. It could optionally
 be replaced by a new firm with different hiring rules. This is not yet
 implemented.

-Now we stipulate the performance of firms. Let $n^k=|W^k|$, i.e. the number of
-agents employed by firm $F^k$.
+Now we stipulate the performance of firms. Let $n_k=|W_k|$, i.e. the number of
+agents employed by firm $F_k$.

 Then we calculate the performance of a firm $k$ by
 \footnote{
 or if you wanted, you might raise these factors to an arbitrary power because you have
 reason to suppose as a kind of nonlinear scaling.

-$R_k=(B^k)^g(C^k)^h n^k$
+$R_k=(B_k)^g(C_k)^h n_k$

 You could even enforce
 $g+h=1$
-and make this a weighted geometric mean, if you'd like. Since $B^k$ and $C^k$
+and make this a weighted geometric mean, if you'd like. Since $B_k$ and $C_k$
 have both been specified to have mean between 0 and 1, this would allow a pleasing
 symmetry.

 creating estimates of the marginal benefit of a given agent with a given
 knowledge factor.
 }
-$E^k=B^kC^kn^k$
+$E_k=B_kC_kn_k$

 Now, we need to define the culture multiplier $C_i^k$.
 We associate a matrix $\kappa^k$ with each firm at each time step,
 means.

 \begin{align*}
-C_i^k &= 0, & n^k=0 \\
-C_i^k &= \sum_y d\left( \frac{1}{n^k}\sum_{y=1}^{n^k} \kappa^y_i \right), & n^k>0
+C_k(t) &= 0, & n_k=0 \\
+C_k(t) &= \sum_y d\left( \frac{1}{n_k}\sum_{y=1}^{n_k} \kappa^y_i \right), & n_k>0
 \end{align*}

 for $y$ ranging over all the elements of the culture vector, and for a
 We give the knowledge multiplier more simply as the mean of the vector of all
 employee knowledge values.

-$B^k=\sum_{j=1}^{n^k} b_j$
+$B_k=\sum_{j=1}^{n_k} b_j$

 Workers are assigned, each turn, a canonical'' performance measure
-$p_i^j$, based on a share of their firm's market distribution, attributed
-pro-rata according to $b^j$.
+$p_j(t)$, based on a share of their firm's market distribution, attributed
+pro-rata according to $b_j$.
 This is a measure, discarding the effect of
 culture vector, and making strong linearisation assumptions, of the marginal
 return to a firm of the given worker.

-$p_i^k = \frac{b_i^j}{\sum_{j \in W_{f(j)}} b_i^j}$
+$p_k(t) = \frac{b_j(t)}{\sum_{j \in W_{f(j)}} b^j(t)}$

 They are also assigned apublished'' valuation, which, in this simplest
 version of the sim, is assumed to be the same, but which could be made
 bounded above by the requirement of predicted profitability.
 Workers may optionally presumed to have tenure, and only leave for a better wage rather
 than having their own contract re-evaluated.
-We denote the valuation function $v$ for the value to $F^k$ of worker $w^j$ for the next timestep at timestep
-$i$ by
-$v(F^k, w^j, i)$
+We denote the valuation function $v$ for the value to $F_k$ of worker $w_j$ for the next timestep at timestep
+$t$ by
+$v(F_k, w_j, t)$

 This notation implies that all firms share a valuation function, based
 presumably on public information.

 I have partially implemented the latter.

-The model in this case is that value of a worker $w^j$ to an arbitrary firm
-$f^k$ at time $i$ is the canonical value they have at their current firm
-$f(j,i)$ multiplied by a coefficient, reflecting the typical change in
+The model in this case is that value of a worker $w_j$ to an arbitrary firm
+$f_k$ at time $t$ is the canonical value they have at their current firm
+$f(j,t)$ multiplied by a coefficient, reflecting the typical change in
 canonical values experienced by workers moving from that previous firm to this
 one over a timestep.
 That is, this valuation function imputes a mean change
 coefficient to all pairwise changes in employment.

 Symbolically we write
-$v(f^k, w^j, i) := V_{f(j,i),F^k}p_i^k$
+$v(f_k, w_j, t) := V_{f(j,t),F_k} p_k(t)$

 where $V_{x,y}$ is a matrix of these pairwise firm coefficients.

-The estimator for the matrix entries is simply a decaying mean of datapoints
+The estimator for the matrix entries is, for the minute, simply a decaying mean of datapoints
 so far, i.e. a normalised 1-pole lowpass filter.
 We maintain a running estimate of $V_{x,y}$ based on earlier
 transitions.

 So, define

-$S_ab^j:= \{i:f(j,i-1)=F^a \land f(j, i)=F^b\}$
+$S_{ab}(t):= \{t:f(j,t-1)=F_a \land f(j, t)=F_b\}$

 Then we may construct the estimator, $\bar{V}_{x,y}$.