Animals often alternate between searching for food locally and moving over larger distances depending on the amount of food they find. This ability to switch between movement modes can have large implications on the fate of individuals and populations, and a mechanism that allows animals to find the optimal balance between alternative movement strategies is therefore selectively advantageous. Recent theory suggests that animals are capable of switching movement mode depending on heterogeneities in the landscape, and that different modes may predominate at different temporal scales. Here we develop a conceptual model that enables animals to use either an area-concentrated food search behavior or undirected random movements. The model builds on the animals’ ability to remember the profitability and location of previously visited areas. In contrast to classical optimal foraging models, our model does not assume food to be distributed in large, well-defined patches, and our focus is on animal movement rather than on how animals choose between foraging patches with known locations and value. After parameterizing the fine-scale movements to resemble those of the harbor porpoise Phocoena phocoena we investigate whether the model is capable of producing emergent home ranges and use pattern-oriented modeling to evaluate whether it can reproduce the large-scale movement patterns observed for porpoises in nature. Finally we investigate whether the model enables animals to forage optimally. We found that the model was indeed able to produce either stable home ranges or movement patterns that resembled those of real porpoises. It enabled animals to maximize their food intake when fine-tuning the memory parameters that controlled the relative contribution of area concentrated and random movements.