In this paper we introduce an algorithm for generating random numbers with binomial distribution. The algorithm is based on the idea of a "pipe" between the simulation of a statistical experiment and the algorithm for selection according to utility, often invoked in genetic search problems.