The thread should also help you understand how the M2Ks struck multiple targets with such ease.
Approaching the target, the seeker, using scene matching algorithm, compares the electro-optical image from its EO sensor with the target image in the mission profile and identifies the target.
If the target is obscured, the bomb reverts to GPS guidance.