1. A method for optimizing the configuration of multisite transcranial current stimulation, comprising: providing an electric field characteristic target map of a brain's cortex that comprises desired values for the electrical field on the cortex surface to modulate neuronal function, said target map having either single or multiple cortical targets; providing a weight map of the cortical surface prioritizing important areas in said target map for the purposes of optimization, said target map and said weight map being obtained from brain activity data or neuroimaging data acquired by means of a brain monitoring technology; calculating, based on electric field modeling with the target and weight maps, optimal currents and optimal number and locations for a plurality of electrodes to hit said target map; wherein said calculation of optimal electrode number and locations is performed with a genetic algorithm with cross-over and mutation functions, where a binary DNA string specifies a montage of electrode number and locations; and providing, via said plurality of electrodes having the optimal currents and optimal number and locations, transcranial current stimulation to a subject to globally stimulate at once said targets in the target map with excitatory, inhibitory or neutral stimulation.