Understanding how the brain activity results into behavioral choices is one of the fundamental questions in the field of neuroscience. This project aims to address this question using experiments on the brains of simpler organisms such as flies. A technique called optogenetics will be used to activate neurons in the fly brain, while the fly walks over a custom-built treadmill-like setup. Using this approach, Specific neurons can be activated to see their effect on the behavior of the fly. The experimental setup will allow to generate a large number of activation patterns and use them to identify the logic that governs the translation of the neural activity in the insect brain into behavioral preference. It is planned to extend these experiments to mosquitoes.