how many years ago did the allosaurus exist?
155 to 145 million years ago
Allosaurus
Allosaurus () is a genus of carnivorous theropod dinosaur that lived 155 to 145 million years ago during the late Jurassic period (Kimmeridgian to late Tithonian). 
wiki:1566122
Allosaurus [SEP] Introduction
As the most abundant large predator in the Morrison Formation, "Allosaurus" was at the top of the food chain, probably preying on contemporaneous large herbivorous dinosaurs, and perhaps other predators. Potential prey included ornithopods, stegosaurids, and sauropods. Some paleontologists interpret "Allosaurus" as having had cooperative social behavior, and hunting in packs, while others believe individuals may have been aggressive toward each other, and that congregations of this genus are the result of lone individuals feeding on the same carcasses.