aimacode / aima-java

Java implementation of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AC-3 algorithm in CSPNQueens

ThuriyaThwin opened this issue · comments

I am testing CSP NQueens and I found that AC-3 algorithm output is the same as MAC-3 algorithm.Why this happen?
Is this really AC-3 algorithm,how can i modify to get MAC-3 algorithm?Please guide me.

I test with AIMA 3 ed.

Can you be more specific as to what you tried, what you expected and what you observed? What exactly is the MAC3 algorithm?

MAC is maintaining arc consistency algorithm.
I have tried Improved Backtracking algorithm with your AC-3 algorithm.But ,the result is as MAC algorithm,.

Can you paste your code along with the inputs and outputs? It is a bit difficult to spot a problem as your query is too wide. Also, if your CSP has a particular solution then all algorithms to calculate an exact solution should return the same answer. Broadly speaking, MAC refers to a backtracking search scheme
where after each instantiation of a variable, arc consistency is maintained (or enforced) on the new network. In both these algorithms, the solution values should be similar.

Yes,I got it ,fri.Thanks a lot.