AI-driven energy optimization