Automatic Pattern-Learning Architecture Based on Associative Memory and Short/Long Term Storage Concept