Homeostatic Agent for General Environment (Journal of Artificial General Intelligence, 2018)