Four levels of pattern recognition