Artificial Intelligence and energy optimization