Intelligent Autonomous Systems: Foundations and