Two teams creating devices that stimulate the brain to restore memory function have been granted $37.5 million by DARPA to develop the technology.

Both will initially work with people with epilepsy who have been given implants to locate where their seizures originate. The researchers will reuse the data gathered during this process to monitor other brain activity, such as the patterns that occur when the brain stores and retrieves memories.

One team will then attempt to map these patterns by recording the brain activity of epilepsy sufferers with mild memory problems while they play a computer game about remembering things. The pattern differences between the best and worst scores among these patients will be used to develop an algorithm for a personalized stimulation pattern to keep the brain performing at an optimal level.

The second team will create a small device to be implanted into the brain, which can record and analyze electrical activity in real time, as well as deliver stimulation. A specific part of the brain's entorhinal cortex—the area that feeds information into the hippocampus—will be targeted.

So far, there is no evidence of any side effects of this technique, but the team is taking precautions to minimize disruption to other areas of the brain—such as using extremely low levels of stimulation.

It's hoped that the work will be able to treat different types of memory loss, including that from Alzheimer's disease. But no device can restore memories that have been "lost"—just enhance the ability to form and retrieve new ones.

The leader of the first team, Michael Kahana at the University of Pennsylvania, said: "We've got to help people before they forget the names of their children."

This story originally appeared on Wired UK.