The problem of automated algorithm discovery has been mainly approached by means of Genetic programming. Recently, Monte-Carlo tree search methods—well known from games—have been used for program discovery, using stack-based program representations. In this paper, we analyze the behavior of the stack-based representations and describe an approach that provides finer control over generated program sizes and fast uniform playouts. Our approach utilizes type system with parametric polymorphism to generate typed programs. We evaluate the proposed solution with two Monte-Carlo tree search algorithms, and conclude that it is a good alternative which has a better control of exploration.