function M = generateConflMatrix(x)

%%return a matrix that represent the number of conflicts for all possible
%%next move of all queens starting from init configuration x

n = size(x,2);
M = zeros(n,n);

for i = 1:n
    next = x;
    for j = 1:n
     next(i) = j;
     M(j,i) = conflicts(next);
    end
end

