The main idea is to eliminate large portions of the search space all at once by identifying variable/value combinations that violate the constraints.
8 queens problem using CSP:
The initial state might be a random configuration of 8 queens in 8 columns
Each step moves a single queen to a new position in its column to minimize/eliminate conflict.
Typically, the initial guess violates several constraints.
The point of local search is to eliminate the violated constraints
Sudoko game:
A Sudoku board consists of 81 squares, some of which are initially filled with digits from 1 to 9. The puzzle is to fill in all the remaining squares such that no digit appears twice in any row, column, or 3×3 box. A row, column, or box is called a unit
#8queensProblemUsingCSP #SudokoGame
0 Comments