Conceptual models of epithelial carcinogenesis typically depict a sequence of heritable changes that give rise to a population of cells possessing the hallmarks of invasive cancer. We propose the evolutionary dynamics that give rise to the phenotypic properties of malignant cells must be understood within the context of specific selection forces generated by the microenvironment. This can be accomplished by using an "inverse problem" approach in which we use observed typical phenotypic traits of primary and metastatic cancers to infer the evolutionary dynamics. This has led to the hypothesis that heritable changes in genes controlling cellular proliferation, apoptosis, and senescence, while necessary, are not usually sufficient to produce an invasive cancer. In addition to these evolutionary steps, we propose that the common observation of aerobic glycolysis in human cancers indicates, via the inverse problem analysis, that adaptation to hypoxia and acidosis must be a major component of the carcinogenic sequence. The details of the hypothesis are based on recognition that premalignant populations evolve within ducts and remain separated from their blood supply by a basement membrane. As tumor cells proliferate into the lumen, diffusion-reaction kinetics enforced by this separation result in hypoxia and acidosis in regions of the tumor the most distant from the basement membrane. This produces new evolutionary selection forces that promote constitutive upregulation of glycolysis and resistance to acid-induced toxicity. We hypothesize that these phenotypic adaptations are critical late steps in carcinogenesis conferring proliferative advantages even in normoxic conditions by allowing the population to produce an acidic environment (through aerobic glycolysis) which is toxic to other local cell populations and promotes extracellular matrix degradation, increasing invasiveness.