0% found this document useful (0 votes)
11 views2 pages

2024 Session 04 Local Search N Queens

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

2024 Session 04 Local Search N Queens

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Foundations of Artificial Intelligence — Lab

R S Milton
Department of CSE, SSN College of Engineering

Session 4: Local Search — N-Queens Problem


27 August 2024

Place 8 queens “safely” in a 8 × 8 chessboard – no queen is under attack from any other queen
(in horizontal, vertical and diagonal directions). Formulate it as a constraint satisfaction problem.
▷ One queen is placed in each column.

▷ Variables are the rows in which queens are placed in the columns

▷ Assignment: 8 row indexes.

▷ Evaluation function: the number of attacking pairs in 8-queens

Implement a local search algorithm to find one safe assignment.

1
Temporary page!

LATEX was unable to guess the total number of pages correctly. As there was some unprocessed
data that should have been added to the final page this extra page has been added to receive it.
If you rerun the document (without altering it) this surplus page will go away, because LATEX
now knows how many pages to expect for this document.

You might also like