In recent iterated prisoner's dilemma tournaments, the most successful strategies were those that had identification mechanisms. By playing a predetermined sequence of moves and learning from their opponents' responses, these strategies managed to identify their opponents. We believe that these identification mechanisms may be very useful in evolutionary games. In this paper one such strategy, which we call collective strategy, is analyzed. Collective strategies apply a simple but efficient identification mechanism (that just distinguishes themselves from other strategies), and this mechanism allows them to only cooperate with their group members and defect against any others. In this way, collective strategies are able to maintain a stable population in evolutionary iterated prisoner's dilemma. By means of an invasion barrier, this strategy is compared with other strategies in evolutionary dynamics in order to demonstrate its evolutionary features. We also find that this collective behavior assists the evolution of cooperation in specific evolutionary environments.