This is an interesting description of an algorithm for generating world maps. The author’s original implementation is in ActionScript to ensure that no one will ever reuse the code. But there’s also a JavaScript subset.
The website has some interesting concepts. I’m particularly interested in their algorithm for noisy edges.