\[algo:pi\_tilde\] provides, for all $t\geq 0$, a Monte Carlo approximation $\tilde{\pi}^N_t:=\sum_{n=1}^N W_t^n\delta_{\theta_t^n}$ of $\tilde{\pi}_t$ and a Monte Carlo approximation $\bar{\pi}_t^{N,K}:=\frac{1}{K}\sum_{k=1}^K\delta_{\bar{\theta}_t^k}$ of $\bar{\pi}_t$.

Following the idea of the IBIS algorithm [@MR1929161], at iteration $t\geq 1$ the observation $Y_t$ is processed and the approximation $\tilde{\pi}^N_{t-1}$ of $\tilde{\pi}_{t-1}$ is updated to yield an approximation $\tilde{\pi}^N_{t}$ of $\tilde{\pi}_t$, while the approximation $\bar{\pi}^{N,K}_{t-1}$ of $\bar{\pi}_{t-1}$ is updated to yield an approximation $\bar{\pi}^{N,K}_{t}$ of $\bar{\pi}_t$. Algorithm \[algo:pi\_tilde\] is therefore a sequential algorithm and its memory and computational requirement to process a new observation depends on the sequence $(h_t)_{t\geq 0}$ (see Section \[sub:running\_time\]). Remark that if $h_t>0$ for all $t\geq 1$ then Algorithm \[algo:pi\_tilde\] is a standard particle filter algorithm [see e.g. @doucet2009tutorial] while, if $h_t=0$ for all $t\geq 1$, it reduces to a particular instance of the IBIS algorithm where the particles are rejuvenated by mean a Metropolis-Hastings kernel.

Before describing Algorithm \[algo:pi\_tilde\] in more details the following three observations are worth making. Firstly, the support of $\bar{\pi}_t^{N,K}$ is generated by sampling $K$ independent random variables from the mixture $ (t+1)^{-1}\sum_{s=0}^t\tilde{\pi}^N_s$. Secondly, if we are interested in estimating $\bar{\pi}_t(\varphi_i)$ for a small number of functions $\{\varphi_i\}_{i=1}^I$ then the estimates $\big\{(t+1)^{-1}\sum_{s=0}^t\tilde{\pi}^N_s(\varphi_i)\big\}_{i=1}^I$ are both cheaper to compute and 