We have introduced evolutionary game dynamics to a one-dimensional cellular- automaton to investigate evolution and maintenance of cooperative avoiding behavior of self-driven particles in bidirectional flow. In our model, there are two kinds of particles, which are right-going particles and left-going particles. They often face opponent particles, so that they swerve to the right or left stochastically in order to avoid conflicts. The particles reinforce their preferences of the swerving direction after their successful avoidance. The preference is also weakened by memory-loss effect. Result of our simulation indicates that cooperative avoiding behavior is achieved, i.e., swerving directions of the particles are unified, when the density of particles is close to 1/2 and the memory-loss rate is small. Furthermore, when the right-going particles occupy the majority of the system, we observe that their flow increases when the number of left-going particles, which prevent the smooth movement of right-going particles, becomes large. It is also investigated that the critical memory-loss rate of the cooperative avoiding behavior strongly depends on the size of the system. Small system can prolong the cooperative avoiding behavior in wider range of memory-loss rate than large system.