Numerical aspects in the optimal control and anti-control of rigid block dynamics