Collective Creativity and Survival Algorithms of Bacteria