With a language to describe CPS steps, replicating these retrosynthetic analysis steps in our Auto-Bracket tool was relatively straightforward. The main difficulty was deciding what ligation order should be chosen by default, as the most logical order (and the orders that are even possible) depends on starting segments, types of ligation junctions used, and the chemistry available to individual users. To address this problem, we next sought to develop a general computational solution to find an optimal order for each unique set of segments.