Today's industrial machines and manipulators have no capability to learn by experience. Performance and productivity could be greatly enhanced if a machine could modify its operation based on previous actions. This paper presents a learning control scheme that provides the ability for machines to utilize their past experiences. The objective is to have machines mimic the human learning process as closely as possible. A data base is formulated to provide the machine with experience. An optical infrared distance sensor is developed to inform the machine about objects in its working space. A learning control scheme is presented that utilizes the sensory information to enhance machine performance in the next trial. An adaptive scheme is proposed for the modification of learning gain matrices, and is implemented on an industrial robot. Experimental results verify the potentials of the proposed adaptive learning scheme, and illustrate how it can be used for improvement of different manufacturing processes.