Complex behaviors are affected by multiple interacting loci with individually small and environmentally sensitive effects. Understanding the genetic architecture of behavioral traits begins with identifying the genes regulating these traits, mapping the subset of genetically varying quantitative trait loci (QTLs) in natural populations, and pinpointing the molecular polymorphisms defining QTL alleles. Drosophila brings an impressive toolkit to the challenge of genetically dissecting complex traits: P transposable element mutagenesis to identify genes regulating these traits; artificial selection from natural populations to create extreme trait phenotypes; high resolution mapping to identify positional candidate genes corresponding to QTLs; linkage disequilibrium mapping to identify molecular polymorphism(s) that functionally define QTL alleles; and whole genome transcriptional profiling to postulate networks of interacting genes affecting complex traits. Studies in Drosophila have revealed large numbers of pleiotropic genes that interact epistatically to regulate behavioral traits, and that can have sex- and environment-specific effects. These observations offer valuable lessons for understanding the genetic basis of variation for complex behaviors in other organisms, including humans.