Documente Academic
Documente Profesional
Documente Cultură
Hridaya Kandel
hridayakandel@gmail.com
AI Lecturer
BScCSIT Vth
States:
Any arrangement of 0 to 8
Q
queens on the board
Initial state:
Q
No queens on the board Q
Successor function:
Add a queen to an empty Q
square
Goal Test: Q
8 queens on the board and
none are attacked Q
The initial state has 64 Q
successors and 63 and 62 so
on Q
Hridaya Kandel (AI Lecturer) 16
Eight Queens: Problem formulation 2
States:
Q
Any arrangement of 8 queens
on the board Q
Initial state:
All queens are at any (say Q
column 1)
Successor function:
Q
Change the position of any Q
one queen
Goal test: Q
8 queens on the board, none
are attacked Q
Q
Hridaya Kandel (AI Lecturer) 17
Eight Queens: Problem formulation 3
States:
Q
Any arrangement of k queens
in the first k rows such that Q
none are attacked
Initial state: Q
Zero queens on the board
Successor function:
Add a queen to the (k+1)th
row so that none are attacked
Goal test:
8 queens on the board, none
are attacked
If a production's precondition matches the current state of the world, then the
production is said to be triggered.
If a production's action is executed, it is said to have fired.
The underlying idea of production systems is to represent knowledge in the form
of condition-action pairs called production rules:
If the condition C is satisfied then the action A is appropriate.
Hridaya Kandel (AI Lecturer) 22
Production system is also called ruled-based system
Production system: Architecture
The four color theorem states that given any plane separated into regions,
such as a political map of the countries of a state, the regions may be
colored using no more than four colors in such a way that no two adjacent
regions receive the same color.
we have to replace each letter by a distinct digit so that the resulting sum is
correct. (Class Assignment)
Note:
A CS problem is usually represented as an undirected graph, called Constraint Graph where
the nodes are the variables and the edges are the binary constraints.