INSIDE A LAB at Stanford University’s Precourt Institute for Energy, there are a half dozen refrigerator-sized cabinets designed to kill batteries as fast as they can. Each holds around 100 lithium-ion cells secured in trays that can charge and discharge the batteries dozens of times per day. Ordinarily, the batteries that go into these electrochemical torture chambers would be found inside gadgets or electric vehicles, but when they’re put in these hulking machines, they aren’t powering anything at all. Instead, energy is dumped in and out of these cells as fast as possible to generate reams of performance data that will teach artificial intelligence how to build a better battery.