Project description: This directory contains code and documentation for three applications of a stochastically-seeded gradient algorithm as described in the paper included. The gradient algorithm is used to solve optimization problems given a set of constraints and an optimization metric. We have applied the algorithm to three different neuronal applications: 1. Triggering an action potential in the Hodgkin-Huxley model (an empirically validated ionic model of neuronal excitability) 2. Initiating repetitive firing in the FitzHugh-Nagumo model (an abstract model applied to a wide range of biological systems that exhibit an oscillatory state and a quiescent state), and 3. Suppressing repetitive firing in the FitzHugh-Nagumo model We demonstrate in our study that this algorithm enables automated exploration of a wide solution space with stochastic seeding that allows us to find multiple locally optimal solutions. Furthermore, this algorithm is robust enough that no a priori knowledge of the optimal stimulus is necessary. The code provided here are preset to run for these three applications, but they can be used as training tools to apply the gradient algorithm to any other application so desired. File Contents: Gradient Algorithm.pdf - The paper which describes the work that we have done. Hodgkin-Huxley/ gradAlg.m - This is the main program to run. hh.m - Function describe the Hodgkin-Huxley equations pInfluence.m - Function describing the p influence equations RInfluence.m - Function descibring the R influence equations FitzHugh-Nagumo/Initiating Repetitive Firing/ fhn.m - Function describing the FitzHugh-Nagumo equations gradAlg.m - This is the gradient algorithm for a single run with a given initial and terminal condition. optInOut.m - This is the main program to run used to process every single run between the quiescent state and every single point on the repetitive firing limit cycle. outX.mat - A set of 68 points defining the repetitive firing limit cycle. pInfluence.m - Function describing the p influence equations RInfluence.m - Function describing the R influence equations FitzHugh-Nagumo/Suppressing Repetitive Firing/ fhn.m - Function describing the FitzHugh-Nagumo equations gradAlg.m - This is the gradient algorithm for a single run with a given initial and terminal condition. optOutIn.m - This is the main program to run used to process every single run between every single point on the repetitive firing limit cycle and the quiescent state. outX.mat - A set of 68 points defining the repetitive firing limit cycle. pInfluence.m - Function describing the p influence equations RInfluence.m - Function describing the R influence equations