The crackle of electricity inside your brain has long been too complex to decode. Artificial intelligence is changing that.