AI-Driven Energy Management and Optimization