Visual cues are important navigational tools for many solitary foraging insects. In addition to information provided by path integration, desert ants learn and use visual cues for homing back to their nest. In this study, we compared the visually based learning of two desert ant species: the North African Cataglyphis fortis and the Australian Melophorus bagoti, each of which lives in ecologically similar but visually different environments. In our experiment, ants' choice performance was measured by training foragers in a channel system. We used a decision box with two visual stimuli during their homebound trips, with one of the stimuli always being the correct one that provided thoroughfare. To determine any habitat effects on learning, we examined intraspecific comparisons in C. fortis with different nest surroundings. The intraspecific comparison in C. fortis revealed no differences in learning the task. In general, C. fortis showed little learning in our task and the results were similar for ants from barren and cluttered environments. Overall, M. bagoti learned the task faster and had a higher level of accuracy than C. fortis. One explanation for this species-specific difference could be that the cluttered habitat of M. bagoti favours the evolution of visual associative learning more so than the plain habitat of C. fortis.