All participants were treated with a cranially implanted responsive neurostimulator that delivers stimulation to 1 or 2 seizure foci via chronically implanted electrodes when specific electrocorticographic patterns are detected ( RNS System ) .