I have the following problem:

Consider the problem of placing 2 knights and 2 queens on a 4 x 4 chessboard, each piece (knight or queen) per row (denoted by R1, R2, R3, and R4) as shown in the figure, such that no two pieces are attacking each other. One knight must be placed in row R1, the other in R2, one queen in R3, and the other queen in R4.

Formulate this problem as a Constraint Satisfaction problem. Describe the set of variables, and their domain. List the set of constraints. Draw the constraint graph.

  • $\begingroup$ It sounds like this might be a homework problem. What are your thoughts about what the variables might be? How about the constraints? Did you get stuck somewhere in the problem, or not know where to start? $\endgroup$ – Jonathan Moore Feb 20 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.