Distance Measure between Cognitive Agent's Stored Perceptions