In the genetic algorithms, both crossover and mutation operators need one or more solutions from the population as inputs to be operated. Selection strategy decides which solutions should be selected as inputs of these operators. When a new solution is produced after applying one of these operators, the replacement strategy decides that is the new solution satiable to be inserted into the population, and if the answer is positive, then which of solutions in the population should be removed. The replacement plays a direct role in maintaining the diversity of the population, which is critical to avoid premature convergence problem. The selection effects on exploitation ability, which is vital to obtain high quality solutions. Where many of recent methods for the replacement and selection are time consuming or need complicated structures for the population, this paper proposes simple algorithms for the selection and the replacement, which are based on similarity between a pair of solutions.Result of experiments show how using the proposed strategies increases performance of genetic algorithm in terms of accuracy, on function optimization datasets. In addition, the proposed algorithms in this paper can be easily applied to different types of the population-based evolutionary algorithms. Results of experiments show how the proposed algorithms improve the performance of differential evolutionary algorithm in terms of accuracy, on variety of datasets including CEC-2015 Black Box Optimization.