On recurrence and transience of self-interacting random walks