  This study uses data from the China Educational Panel Survey (CEPS) to design
a classroom assignment policy that maximizes peer effects. Our approach
comprises three steps: firstly, we develop a friendship formation discrete
choice model and estimate it with an interpretable neural network architecture,
PeerNN, generating an adjacency-probability matrix $\Omega$ that reflects
friendship formation probabilities. Secondly, we incorporate $\Omega$ into a
linear-in-means model to estimate peer effects. The peer effect parameter,
$\beta$, has a different interpretation from the conventional linear-in-means
model and opens up a strategic scope of mean-maximizing classroom assignment
policy. By exploiting the conditional random classroom assignment in many
Chinese middle schools, we construct a valid instrument to address the
endogeneity issue induced by $\Omega$ and consistently estimate $\beta$.
Lastly, utilizing the estimates of $\Omega$ and $\beta$, we employ a genetic
algorithm (GA) to search for the mean-maximizing class assignment policy.
Though the result is much more efficient (i.e. more positive average peer
effect) than random classroom assignment (i.e. the current practice in most
Chinese middle schools), GA policy is highly inequitable: a small number of
students are predicted to experience severely negative peer effects. To balance
students' academic performance with educational equity, we propose a fairness
metric and penalize classroom assignment that generates large variances in peer
effects. The modified method is called algorithmically fair genetic algorithm
(AFGA). AFGA policy is less efficient but much more equitable. We allow
user-defined parameters for AFGA such that the school principals can adjust the
trade-off between efficiency and equity according to their preferences.
