1. A method comprising: determining, by a controller of a neuroprosthetic device, stimulation parameters for the neuroprosthetic device based on (i) a desired spatial pattern of neural activity, determining stimulation parameters for an array of electrodes of the neuroprosthetic device such that a difference between (i) the desired spatial pattern of neural activity and (ii) an estimated spatial pattern of neural activity is optimised and the estimated spatial pattern of neural activity is an estimate of a response of a target neural tissue to being stimulated by the neuroprosthetic device based on the stimulation parameters, determining the stimulation parameters further comprises estimating the response of the target neural tissue to being stimulated by the neuroprosthetic device based on the stimulation parameters using a model of how electrical stimulation evokes a spatial pattern of neural activity; and delivering by the controller, the stimulation parameters to the array of electrodes.