Scientists have developed an algorithm for portable devices such as mobile phones or smartwatches that can warn epileptic sufferers of an upcoming seizure with 20 minutes notice. Being able to predict the onset of a debilitating seizure would significantly improve the quality of life of epileptics, researchers from CEU Cardenal Herrera University in Spain said. Scientists developed an algorithm able to interpret the relevant data and predict a seizure up to 20 minutes before it occurs, giving the patient time to take their medication and stop the seizure. The idea is that a portable device like a mobile phone or a smartwatch reads signals sent from a microchip implanted in the patient's brain, interpreting the data according to the algorithm and warning the patient of an upcoming seizure. The benefits of this set-up are two-fold - Epilepsy sufferers will have to take their medication in the event of a predicted seizure and not constantly throughout the day, mitigating any adverse effects. They would also be able to reclaim a normal life, only avoiding 'high-risk' activities like driving or swimming until the risk of their having a seizure had passed, researchers said. The study was published in the journal Brain.