We study analytically and by computer simulations a complex system of adapt
ive agents with finite memory. Borrowing the framework of the minority game
and using the replica formalism we show the existence of an equilibrium ph
ase transition as a function of the ratio between the memory lambda and the
learning rates Gamma of the agents. We show that, starting from a random c
onfiguration, a dynamic phase transition also exists, which prevents agents
from reaching optimal coordination. Furthermore, in a nonstationary enviro
nment, we show by numerical simulations that the phase transition becomes d
iscontinuous.