Instead of casting a ray per particle, AMCL bakes a distance field once (distance from every cell to the nearest wall),
then scores a pose by projecting the observed scan endpoints and reading that field — an O(1) lookup per ray.
W = ∏ L(zk) = — · endpoints on a wall —W is high; a wrong pose throws them into the dark open space (red) and W collapses. No rays are traced here — only endpoint projection + a field lookup, which is why it runs fast on a CPU.