  We put forward a method for optimized distillation of partly entangled pairs
of qubits into a smaller number of more entangled pairs by recurrent local
unitary operations and projections. Optimized distillation is achieved by
minimization of a cost function with up to 30 real parameters, which is chosen
to be sensitive to the fidelity and the projection probability at each step. We
show that in many cases this approach can significantly improve the
distillation efficiency in comparison to the present methods.
