Initialize particles:
for to do
Predict
   Draw particles from transition density
Update
   Compute particle likelihoods
   Output point estimate as weighted sum
   Compute normalized weights
   Draw from with probability Resample particles
end for

Algorithm 2: Bootstrap particle filter.