Text this: Optimization of Selective Assembly for Shafts and Holes Based on Relative Entropy and Dynamic Programming