So the plurality from aircraft, then, with a strong trend line, I imagine (although Japanese planes not only hit Pearl Harbor but took out Prince of Wales and Repulse three days later, so maybe there is no trend line). Anyway, guided missiles, as Condottiere said. Guns only have so much range. I suppose somebody could have built a guided missile battleship (did anyone?), but since you don't need to support multi-thousand ton turrets, you can get away with splitting onto smaller hulls like cruisers, destroyers, frigates, or whatever.Only 20 or so battleships from all nations were lost to aircraft during WWII, 14 were lost to enemy ships and 7 scuttled.
Though this has nothing to do with robots.