Start to implement SPSA algorithm