Sample $\theta^{*}$ from previous population ${\theta_{t-1}^{i}}$ with weights $v_{t-1}$.\
Peturb $\theta^*$ to give $\theta^{**} \sim K_t(\theta|\theta^*)$. If $\pi(\theta^{**}) = 0$, return to step 11. \[step4\] Simulate dataset $\mathbf{x}^{*i} \sim f(\mathbf{x}|\theta^{**}) $. Set $\theta^i_t = \theta^{**}.$\
Calculate the weight $v^i_t$ for particle $\theta^i_t$ as $$v^i_t = \frac{\pi (\theta_t^i)}{\sum_{j=1}^M v_{t-1}^j K_t (\theta_{t-1}^j, \theta_t^i)}.$$ Let $$L(\mathbf{w}) = 1 - \hat{D}_{\alpha}\left(\left\{ \xi^i \right\}_{i=1}^M || \left\{ \theta_t^i \right\}_{i=1}^M\right),$$ where $\left\{ \theta_t^i \right\}_{i=1}^M$ are the closest $M=\left \lfloor{\alpha N} \right \rfloor$ samples when ranked according to ABC distance from the pseudo dataset, $d_{\mathbf{w}}(s(\mathbf{y}),s(\mathbf{x}^{i*}))$. Maxmize $L(\mathbf{w})$ as a function of summary statistic weights, $\mathbf{w}$. Keep the samples $\left\{ \theta_t^i \right\}_{i=1}^M$ corresponding to the maxmimum of $L(\mathbf{w})$ (i.e. the maximum distance between prior and approximate posterior). Normalize the particle weights $\left\{ v_t^i \right\}_{i=1}^M$.\
**return** $\{\theta_T^i\}_{i=1}^M$, $\{v_T^i\}_{i=1}^M$

Theoretical justification {#justification}
=========================

The estimator we use is a $k$ nearest neighbour estimator relying only on distances between observations in a sample, as described above in Section \[knn\_estimator\]. We note that although the Hellinger distance, $D_h(p||q)$, is symmetric in $p$ and $q$, the estimator above in eq. is not. By using the estimator from eq. and choosing $q$ as the distribution that depends on the parameters, $\mathbf{w}$, we are able to 