written by Isaac Asimov
published in 1977
A short story
Set in the Foundation universe
Milton Davidson is trying to find his ideal partner. To do this, he prepares a special computer program (known as Joe), which has access to databases covering the entire populace of the world. He hopes that Joe will find him his ideal match, based on physical parameters as supplied.
Milton arranges to have the shortlisted candidates assigned to work with him for short periods, but realises that looks alone are not enough to find an ideal match. In order to correlate personalities, he speaks at great length to Joe, gradually filling Joe's databanks with information about his personality.
In doing so, Joe develops the personality of Milton. Upon finding an ideal match, he arranges to have Milton arrested for malfeasance, so that Joe can 'have the girl' for himself.