Playing around with an algorithm to optimize a Posh order.