Battery-based energy storage is a key component in making renewable energy competitive with fossil fuel generation. What has to happen for batteries to be part of the solution? Batteries may degrade gracefully up to a point, then experience “rapid fade” and lose capacity quickly. Machine learning can help utility-grade battery manufacturers understanding battery capacity prediction to know when units are actually likely to fail. The manufacturers can optimize their financial risk calculations based on reinforcement learning models that can take into account constantly changing variables like the market prices of manufacturing inputs and inventory levels.