Devising ways for handling problem optimization is an important yet a challenging task. The aims are always for methods that can effectively and quickly discover the global optimum for rather complicated mathematical functions that model real-world settings. Typically these functions are too difficult to discover their global optima because they may (1) lack the continuity and differentiability, (2) have multiple local optima, and (3) have complex expressions. In this paper, we address this challenge by offering an algorithm that combines the random search techniques with both an effective mapping and a dynamic adjustment of its search behavior. Our proposed algorithm automatically builds two types of triangular search directives over the unity intervals: principal and marginal. These search directives guide the search within both the effective regions of the search domain that most likely contain the optimum and the marginal regions of the search domain that less likely contain the optimum. During the search the algorithm monitors the intermediate search results and dynamically adjusts the directives’ parameters to quickly move the search towards the optimum. Experiments with our prototype implementation showed that our method can effectively find the global optima for rather complicated mathematical functions chosen from well-known benchmarks, and performed better than other algorithms. © 2018 Elsevier B.V.