Method and system for determining a cognitive enhancement and/or anti-epileptic effect comprising: detecting synchronized neuronal activity in neuronal tissue (601), monitoring spreading of the synchronized neuronal activity (602), determining a parameter (604, 605) indicative of the closeness of the synchronized neuronal activity to the critical state and comparing (613) the parameter to a predetermined value.