In this paper we study the problem of designing search strategies to find a target whose motion is described by a random walk along a one-dimensional bounded environment. The sensing model and the characteristic of the environment require the searcher and the target to be on the same site at the same time to guarantee capture. The objective is to optimize the searcher's motion, given by a sequence of actions (move right, left or remain stationary), so that the probability of capturing the target is maximized. Each action is associated with an energy cost. The searcher strategy is constrained by a total energy budget. We propose a class of randomized strategies for which we provide an analytical expression for the capture probability as a function of a single parameter. We then use this expression to find the best strategy within this class. In addition to theoretical results, the algorithms are analyzed in simulation and compared with other intuitive solutions.