Differences in size and resource holding power of males should affect how each competes for food and females. Subordinate males often search for undefended resources, whereas dominant males aggressively take over resources and usually defend them against nearby competitors. Furthermore, during ontogeny males may gain reproductively, and early developmental stages may value food over females, while the opposite may be true for dominants. Based on these assumptions we hypothesized that subordinate and dominant males would differ in their behaviour during resource location and acquisition. Subordinate males should spend more time searching over larger areas compared to dominant males, and compete more aggressively for food than for females, while dominants should do the reverse. In a laboratory study using rock shrimp, Rhynchocinetes typus, we found that subordinate males (called typus) searched more actively and over a larger area than dominant males (robustus) in noncompetitive contexts. In a competitive context with food, typus males also showed higher searching activity than robustus males, but in competition for females these differences disappeared: typus males decreased and robustus males increased searching. Subordinate typus males competed more aggressively for food than for females, whereas robustus males competed more aggressively for females than for food. The dominance of robustus males was evident only in competition for females but not for food. Our study is one of only a few about the ontogeny of locomotor performance in invertebrates and shows that male searching behaviour and the use of aggression are affected by competitive ability, female mate preferences and ontogenetic changes in subjective resource value.