You are on page 1of 3

UNIVERSITY OF ENGINEERING

AND TECHNOLOGY
MARDAN

LAB TASKS – 09
NAME : HAROON MASIH
REG NO : 19MDBCS040
SUBJECT : AI LAB
BATCH : 2ND
DEPARTMENT: COMPUTER SCIENCE
Run/execute the codes given for lab # 11 modify it for the following description of
a problem.
A chessboard is an eight-by-eight grid of squares. A queen is a chess piece that can
move on the chessboard any number of squares along any row, column, or
diagonal. A queen is attacking another piece if, in a single move, it can move to the
square the piece is on without jumping over any other piece. If the other piece is in
the line of sight of the queen, then it’s attacked by it).
The eight queen’s problem poses the question of how eight queens can be placed
on a chessboard without any queen attacking another queen.

You might also like