I attempted an AI system using economics. Whilst I dont think this would be ideal for what your looking for it gives some hints about programming and stuff in there.
http://www.cartographersguild.com/sh...sing-economics

I also did one about automated Thatching which might generate some textures for houses.
http://www.cartographersguild.com/sh...ng-for-dummies

and then there is my automated texturing where we can drive the texturing from some masks
http://www.cartographersguild.com/sh...textured-paths

which was similarly done by RobA and made into a Gimp script
http://www.cartographersguild.com/sh...rettier-Script

There are loads of random terrain, fractal terrain, noise maps, fractalizing coast lines etc - try a few searches. RobA has a lot of GIMP scripts for all sorts of stuff and some others have wrote cave generators, and Traveller star chart generators as well.