1. In an autonomous agent, a method for controlling self learning behavior of said autonomous agent comprising: using resource variables for monitoring level of use of internal resources and condition of said autonomous agent; generating error variables of said resource variables, said error variables representing differences in value of desired values of said resource variables and actual values of said resource variables; generating resource derivative variables of said resource variables, each of said resource derivative variables representing the derivative of a single resource variable with a single parameter in said autonomous agent, wherein each said single parameter used in said resource derivative variables controls behavior of said autonomous agent, and using said error variables and said resource derivative variables to adjust parameters in said autonomous agent to control behavior of said autonomous agent.