Understanding the genetic architecture of complex traits requires identification of the underlying genes and characterization of gene-by-gene and genotype-by-environment interactions. Behaviors that mediate interactions between organisms and their environment are complex traits expected to be especially sensitive to environmental conditions. Previous studies on the olfactory avoidance response of Drosophila melanogaster showed that the genetic architecture of this model behavior depends on epistatic networks of pleiotropic genes. We performed a screen of 1339 co-isogenic p[GT1]-element insertion lines to identify novel genes that contribute to odor-guided behavior and identified 55 candidate genes with known p[GT1]-element insertion sites. Characterization of the expression profiles of 10 p[GT1]-element insertion lines showed that the effects of the transposon insertions are often dependent on developmental stage and that hypomorphic mutations in developmental genes can elicit profound adult behavioral deficits. We assessed epistasis among these genes by constructing all possible double heterozygotes and measuring avoidance responses under two stimulus conditions. We observed enhancer and suppressor effects among subsets of these P-element-tagged genes, and surprisingly, epistatic interactions shifted with changes in the concentration of the olfactory stimulus. Our results show that the manifestation of epistatic networks dynamically changes with alterations in the environment.