My aim in this paper is to describe how the therapeutic alliance evolves during psychoanalytic treatment. Lindgren has shown that a coevolutionary process can optimize the level of cooperation by the players in the game of prisoner's dilemma. This level is reached when strategies for recognizing reliable patterns in the sequence of moves by the other player have evolved. These are multiple memory strategies. Lindgren's work suggests that the analytic process must have sufficient time for multiple memory strategies to emerge if it is to achieve the necessary level of trust for an effective therapeutic alliance to develop.