The trial and error approach to epilepsy treatment has not changed for over a century but machine learning and patient derived stem cells promise a personalised and more effective strategy, argue Patrick Kwan and colleagues