Applying Artificial Intelligence to Accelerators