We develop and analyze a population model allowing us to examine a system, where people coexist with artificial beings (robots) and the both consume the same resource entering the system. The robot population consists of friendly and aggressive robots that differ in their attitudes towards people. We propose a system of differential equations, which define a dynamics of the populations of people, friendly robots and aggressive robots, and discuss different scenarios of the system evolution including those that lead to disappearance of the human population. We determine conditions that ensure a more or less prosperous future for humanity. We analyze the behavior of the system for different time dependences of the rate of the resource flow (a constant function, a step-like function, constant functions with undershoots and overshoots, a periodic function, monotonically increasing and decreasing functions). Our analysis shows that the dynamics of the rate of the resource flow defines the changes of the tendencies of the population sizes. Among the obtained solutions, there are solutions that lead to an equilibrium between populations. For people this equilibrium may be regarded as favorable if robots prefer to benefit from communication with people, but not from their extermination. However, equilibrium solutions imply a constant or slowly changes of the rate of the resource flow. Short-term changes of the rate of the resource flow modify the balance between the human population and the robot population. Accumulation of the changes can even lead to disappearance of one of the populations. Qualitative analyzes of the proposed system of differential equations along with computer simulations allow us to conclude that there are some necessary conditions for a well-being of the humans and robots. These conditions are as follows. Firstly, the benefit of the robot from communicating with people has to be higher than the benefit from their extermination. Secondly, to prevent the appearance of the aggressive robots the humanity has to regulate effectively the size of its own population. Thirdly, people have to be able to restrict their needs while maintaining the reproduction rate.