In this Excellence-project funded by the Spanish Ministry for Science, Juan Ramón Peralta Rincón evaluated the varied impacts that Matching Habitat Choice may have on individuals and populations. For this we used different lines of genetically modified Fruit flies. When these special flies are exposed to a pulse of light of a specific colour, a subset of their neurons become activated, and the fly perceives something about the environment (e.g. the presence of CO2 gas) – even when that isn’t actually true! This cool new technique is called optogenetics. It has been developed in the field of neurobiology to figure out what each neuron does, but we introduced it to eco-evolutionary studies. It is a great way to manipulate the perception of flies about different habitats, after which they are allowed to choose the one they like most. This spatial movement based on the perception of local performance allowed us to test how this behaviour affects reproductive output, capacity to invade novel habitats, interactions with other species, and even the potential for speciation.