There is a pretty large number of algorithms in play for different aspects of the generator. The roads are based on "Parish-Müller's approach". Try googling these two names together, this should give links to a number of their papers.