The Role of Artificial Intelligence in Grid Management and Optimization