This research aims to establish algorithm to optimize a function (calculate of lower limit) by random method. We have found algorithm that called algorithm of moving triangles. This algorithm have been experimented on a wide set of functions, and these experiments proved that algorithm is very useful in exploring the lower limit.