In the understanding process, memory retrieval may have returned concepts which were not considered ``good enough'' matches by the reasoning supertask. This may happen because the memory supertask was using some set of ``internal'' matching criteria which determined that these retrieved concepts were in some way similar to the concept being understood. In this situation, analogical mapping can be utilized to discover if any of the similar concepts are analogues of the concept being understood.
The analogical mapping algorithm is shown in Figure 25. The two concepts are compared by analyzing the attributes of the base concept, one by one. If the same attribute exists in the target, then the two values are compared to see if they are functionally equivalent--this means that the two values have to be capable of filling the same function. The function of the concept filling the base's attribute must be equivalent to the function of the concept filling the attribute in the target. For example, a pencil with a length of six inches can be compared to a pencil with a length of ten inches. Since six inches and ten inches are functionally equivalent (they both fill the role of specifying length in a normal pencil), the length attribute will be mapped in this instance. Any two values will not be functionally equivalent; for example, a length of six inches for one pencil and a length of one micron for the other are not functionally equivalent when considering the pencil's function of writing. Since the one micron pencil is impossible to write with, the two lengths are not equivalent when considering a pencil as a writing tool.
If the same attribute does not exist, it might be that an equivalent value does. This can be ascertained by appealing to the knowledge one has about the function which the concepts are filling and by determining if an equivalent attribute exists. For example, suppose one wanted to perform an analogical mapping between two geometric figures--a square and a circle. What attribute in the square is functionally equivalent to the circumference attribute of the circle? Squares do not possess circumferences so there is not a direct match; however, squares do possess perimeters. The perimeter fills some of the same functional roles in the square as the circumference does in the circle.
If analogical mapping is successful, the task will return a structure describing which attributes match exactly and which are functionally equivalent. By knowing this, a reasoner will be able to adapt known predictions, abductions, and explanations about the base in such a way that they apply to the target. If the analogy task fails, then the structure returned will contain the same information, along with what attributes did not match and therefore caused the failure; this information can prove useful to the next task.