This paper examines the use of machine learning algorithms to model polyalphabetic ciphers for decryption. The focus of this research is to train and evaluate different machine learning algorithms to model the polyalphabetic cipher. The algorithms that have been selected are: (1) hill climbing; (2) genetic algorithm; (3) simulated annealing; and (4), random optimisation. The resulting models were deployed in a simulation to decrypt sample codes. The resulting analysis showed that the genetic algorithm was the most effective technique used in with hill climbing as second. Furthermore, both have the potential to be useful for larger problems.