in Algorithm 1. We outline our proposed methodology in Algorithm 2.

At each generation, we search for the weights, $\mathbf{w}$, of the distance function that maximize the distance between the prior and resulting posterior, given $N$ ABC samples from the model for different $\theta$ values. This distance between prior and posterior gives a measure of the information gain in moving from the prior to the posterior.

Distance between distributions
------------------------------

We use the Hellinger distance to measure the discrepency between the prior and posterior, and so to detect the optimality of our posterior. The Hellinger distance is defined, for distributions $P$ and $Q$, with densities $p$ and $q$, respectively, as $$\begin{aligned}
 H^{2}(P,Q) &= {\frac{1}{2}}\int \left({\sqrt{p(x)}}-{\sqrt{q(x)}}\right)^{2}\,\mathrm{d}x \\
        &= 1 - \int \sqrt{p(x)q(x)} \, \mathrm{d} x.\end{aligned}$$ Alternative measures of distance between distributions such as the Euclidean distance or Kullback-Leibler (or KL) divergence can be used. In our experience, the Hellinger distance performs better than alternatives, particularly for robustly identifying relatively small differences between posterior distributions when weights are optimized, an observation that is supported by other work [@jones2015inference]. In addition, the Hellinger distance is finite when comparing distributions with different support (unlike the KL divergence). This property is desirable when comparing a 