Title: Steel Beach. (SFBC 50th Anniversary Collection)
Description: From back cover of Ace paperback August 1993:

Fleeing Earth after an alien invasion, the human race stands on the threshold of evolution, like a fish cast on artificial shores.  Their new home is Luna, a moon colony blessed with creatre comforts, prolonged lifespans, digital memories, and instant sex changes.  But the people of Luna are bored, restless, suicidal -- and so is the computer that monitors their existence...