Optimal solver for Switchtile