This study introduces the diet-choice problem in foraging as a framework to investigate search and decision making in an uncertain environment. Using a mathematical model based on signal detection-based optimal foraging theory and conducting behavioral experiments, we examined whether the choice of uncertain options in a visual foraging task followed the optimal strategy. In addition, we explored whether search history affects behavior by changing the environment in a stepwise manner. We used a visual foraging task in which participants searched for visual stimuli and selected them using mouse clicks. To introduce uncertainty, the stimuli were designed in a way that they could not be completely discriminated by visual inspection. The study consisted of four sessions, during which the ratio of the number of gains to loss stimuli in Experiment 1 and the magnitude of loss in Experiment 2 were varied in a stepwise manner. Although search strategies can adapt to environmental changes, this adjustment is not always optimal. Specifically, although both the rising and falling groups experienced the same environment, their performance differed depending on the order in which participants experienced changing environments. Search strategy can be adjusted in the presence of environmental uncertainty, but it deviates from the optimal strategy due to the influence of the search history in the experienced environment. (PsycInfo Database Record (c) 2024 APA, all rights reserved).