Solving constraint satisfaction and optimization problems by a neuro-fuzzy approach