 Monte Carlo localization may be improved by sampling the particles in an adaptive manner based on an error estimate using the Kullback–Leibler divergence (KLD).Initially, it is necessary to use a large formula_6 due to the need to cover the entire map with a uniformly random distribution of particles.However, when the particles have converged around the same location, maintaining such a large sample size is computationally wasteful.