  We study the dynamics of opinion formation in a heterogeneous voter model on
a complete graph, in which each agent is endowed with an integer fitness
parameter $k \ge 0$, in addition to its $+$ or $-$ opinion state. The evolution
of the distribution of $k$--values and the opinion dynamics are coupled
together, so as to allow the system to dynamically develop heterogeneity and
memory in a simple way. When two agents with different opinions interact, their
$k$--values are compared and, with probability $p$ the agent with the lower
value adopts the opinion of the one with the higher value, while with
probability $1-p$ the opposite happens. The winning agent then increments its
$k$--value by one. We study the dynamics of the system in the entire $0 \le p
\le 1$ range and compare with the case $p=1/2$, which corresponds to the
standard voter model. When $0 \le p < 1/2$, the system approaches exponentially
fast to the consensus state of the initial majority opinion. The mean consensus
time $\tau$ grows logarithmically with the number of agents $N$, and it is
greatly decreased relative to the linear behaviour $\tau \sim N$ found in the
voter model. When $1/2 < p \le 1$, the system initially relaxes to a state with
an even coexistence of opinions, but eventually reaches consensus by
finite-size fluctuations. The approach to coexistence is monotonic for $1/2 < p
< 0.8$, while for $0.8 \le p \le 1$ there are damped oscillations around the
coexistence value. The final approach to coexistence is approximately a power
law $t^{-b(p)}$ in both regimes, where $b$ increases with $p$. Also, $\tau$
increases respect to the voter model, although it still scales linearly with
$N$. The $p=1$ case is special, with a relaxation to coexistence that scales as
$t^{-2.73}$ and a consensus time that scales as $\tau \sim N^\beta$, with
$\beta \simeq 1.45$.
