Polymatic: A Simulated Polymerization Algorithm