Developing implantable devices for the treatment of neurological disorders by responsive brain stimulation