No not the plastic mail-order kind. The heavy-duty scientific versions — the same type of elaborate set-ups that entomologists construct as ant terrariums in their labs. These scientists must keep ants alive for years in order to study them. There’s nothing bummer for a scientist — or a kid — than a dead ant farm. This wonderful site gives very explicit instructions on how to create a sustainable ant habitat. It includes an extensive FAQ on where/how-to-find queens and covers many other issues of ant farming.
The principle of these lab habitats is similar to the plastic see-through frames we remember as kids: you have a medium the ants tunnel in, sandwiched between two pieces of glass. Only here, the frames are more substantial, the medium more suitable for sustained ant-living, and the colony is made vaster by connecting frames with plastic hose, which the ants travel along. In this kind of set up the ant colony can live much longer than your $20 Ant Farm. But be warned; like all living organisms, they will take lots of TLC, and probably more attention than you expect. But you’ll learn lots.
The great ant expert E.O. Wilson still keeps ant farms in his labs. Here is a picture of my friend Ted Schultz’s ant farm at the Smithsonian Museum of Natural History. It’s engineered for fungus growing ants but you can get a sense of what a real ant terrarium is like.