AI is helping scientists crack the code on next-gen batteries that could replace lithium-ion tech. By discovering novel porous materials, researchers may have paved the way for more powerful and sustainable energy storage using abundant elements like magnesium.