1. A method of instructing a computer program to self-optimize, said method comprising: inputting a selection command that selects one function from a list of pre-selected functions for input into said computer program at a point of choice determined by a programmer, wherein each function from said list of pre-selected functions is associated with a reward; and allowing a learning protocol comprised of learning instructions in said computer program to track and reward said one function that is selected and to determine an approximate optimal choice of operation of said computer program based on said selection command and further comprising inputting a reward command that provides a reward, at a point of choice, determined by a programmer, in said computer program, for said one function selected by said selection command, which results in said approximate optimal choice for self-optimizing said computer program.