A target is moving among a finite number of cells K={1,...,K} in discrete time T={1,...,T}. Knowing the probability of the target's path selection, a searcher is searching for the target with constraints that he can move from cell i to one of the adjacent cells I(i). The searcher detects the target with the probability pi on the look into cell i in which both the target and the searcher are there. He gains a value V(t) on the detection of the target at time t but expends cost c0(i, t) on the search in cell i at t. The searcher selects his route and determines whether he looks into his current cell on the route or not. In this paper, our purpose is to find an optimal strategy for the route and the look of the searcher, which maximizes the expected reward defined as the expected value minus the expected cost. The problem is formulated as an integer programming problem. For solving the problem, we use a branch and bound procedure with an upper bound estimation.