  We discuss a model of heterogeneous, inductive rational agents inspired by
the El Farol Bar problem and the Minority Game. As in markets, agents interact
through a collective aggregate variable -- which plays a role similar to price
-- whose value is fixed by all of them. Agents follow a simple
reinforcement-learning dynamics where the reinforcement, for each of their
available strategies, is related to the payoff delivered by that strategy. We
derive the exact solution of the model in the ``thermodynamic'' limit of
infinitely many agents using tools of statistical physics of disordered
systems. Our results show that the impact of agents on the market price plays a
key role: even though price has a weak dependence on the behavior of each
individual agent, the collective behavior crucially depends on whether agents
account for such dependence or not. Remarkably, if the adaptive behavior of
agents accounts even ``infinitesimally'' for this dependence they can, in a
whole range of parameters, reduce global fluctuations by a finite amount. Both
global efficiency and individual utility improve with respect to a ``price
taker'' behavior if agents account for their market impact.
