We demonstrate how basic cognitive functions of learning and memory can be modeled mathematically and how such models are first built from a bare minimum of essential information and then developed systematically in a step by step manner to include more and more realistic features.