# File ai/csp/backtracking.rb, line 45
        def each_solution(csp)
            @constraint_checks = @nodes_explored = @solutions = 0
            # reset all constraint check stats
            csp.each_constraint {|con| con.checks = 0 }
            start = Time.now
            
            each(csp, 0) { |solution|
                @solutions += 1
                @time = Time.now - start
                yield solution
            }
            
            @time = Time.now - start
            csp.each_constraint {|con| @constraint_checks += con.checks }
        end