CMAC neural network is a supervised algorithm. It would
calculate the actual output and compare it with the expected
output after finishing learning every time. Then it corrects the
network weight-value and constantly trains samples until it
meets the demand. The purpose of the learning is to minimize
the D-value between the actual output and the expected output.
Through the learning of CMAC, behavioral decisions of
artificial fish can be determined. We can conclude from above
that the input of CMAC neural network is 4D (degree of fear,
degree of happiness, degree of sadness and distance between
artificial fish and food) and the output is 3D (hunting, escaping
and randomly swimming). Every dimension of input is divided
into five subspaces, which results in a total of 625 spaces. Each
space has its own input and each input corresponds to multiple
weight space addresses. In this way the generalization of
CMAC is formed.