Optimal Control Theory on the Tech Tree