CMAC learns correct output responses for various input conditions by modifying the contents of the selected memory locations. For each input, the learning process computes the difference between the CMAC output and the desired output (provided by a teacher) as shown in Fig. 1. This difference determines a correction factor that is added to the contents of each of the selected memory locations. The rate of learning depends on a gain factor that determines the magnitude of the correction factor.