here is implementation of Cellular automata and maze generator. They are good for proceduraly generated levels.
PV8 archive file
This is really great so thanks for sharing. I could actually use this to help with testing out the tilemap logic. I have a few bugs still in there I need to hunt down and was going to try to port over some of my own map generation code to do it.