The technology is already there to create robots that function on their own, i.e. many of the vacuum robots available on the market. As we come closer to the Internet of Things (IoT), artificial intelligence will make many of the functions of civilian life very convenient and effortless.
As for the military, AI is under consideration for nuclear, aerospace, cyber, and biotech research related to practical matters regarding national security. Currently, research is being funded to explore how AI can be used with cybersecurity in the future.
Then, AI will definitely be a part of warfare as a part of robotic and autonomous systems including drone systems.
Currently, there is technology that allows drones to do reconnaissance and to perform simple tasks such as disposing bombs, but at this point, the technology is still in its formative stages. In the future, AI can function in the same way that many view IoT in that all technologies exist on one main frame and operates with little intervention from humans.