Solver for chess task