stochastic_opt by matlab
4.0
%J.C. Spall, Jan. 2000
%This code implements SPSA with constraints for theta to lie in
%a specified hypercube.
%Code includes more "bells and whistles" than required for basic SPSA (as
%available at the SPSA web site and code 'spsa_basic_constrained').
%Code includes loss-based and theta-based
%blocking of iterates (both of these blocking steps are optional).
%Code also allows for averaging SP gradients at each iteration. This code includes
%some evaluation material that is not essential to a basic run of SPSA (i.e., when
%cases > 1, the code is performing multiple runs on the same problem).