We present a real-time algorithm of search for static or moving target by a mobile agent with erroneous sensor. The algorithm is based on previously developed double-distance search algorithm. We assume that the search is conducted by an autonomous mobile agent whose mission is to find the target in minimum time. The agent starts with the initial probability distribution of the target's location over a considered domain. At each search step, the agent obtains information regarding target's location in the agent's local neighborhood (observed area) up to a certain radius. In contrast to the previously developed algorithm, at this step imperfect observation is allowed that there is non-zero probability that the searcher does not detect the target while observing its true location. The suggested algorithm includes two decision-making stages. The first stage inherits from the previously developed algorithm and implements a probabilistic version of local search with estimated global distances, while the second stage provides a dynamical selection of probabilistic space, on which the decision-making is conducted. The algorithm results in the path of the agent over a domain and also provides a distribution of search efforts. In the report, we present comparative simulation results and illustrate the actions of the algorithm by running examples.