This paper presents a hybrid backtracking algorithm for the N-Queens problem that incorporates knight-move avoidance as a soft constraint with selective relaxation. The proposed method achieves significant runtime improvements over classical and bitmask backtracking approaches, particularly for larger board sizes.
Prakhar Dwivedi (Sat,) studied this question.