Models of Adaptive Behavior and Problem of Origin of Intelligence