In this paper we show how addiction can be thought of as the outcome of learning. We look to the increasingly influential predictive processing theory for an account of how learning can go wrong in addiction. Perhaps counter intuitively, it is a consequence of this predictive processing perspective on addiction that while the brain plays a deep and important role in leading a person into addiction, it cannot be the whole story. We'll argue that predictive processing implies a view of addiction not as a brain disease, but rather as a breakdown in the dynamics of the wider agent-environment system. The environment becomes meaningfully organised around the agent's drug-seeking and using behaviours. Our account of addiction offers a new perspective on what is harmful about addiction. Philosophers often characterise addiction as a mental illness because addicts irrationally shift in their judgement of how they should act based on cues that predict drug use. We argue that predictive processing leads to a different view of what can go wrong in addiction. We suggest that addiction can prove harmful to the person because as their addiction progressively takes hold, the addict comes to embody a predictive model of the environment that fails to adequately attune them to a volatile, dynamic environment. The use of an addictive substance produces illusory feedback of being well-attuned to the environment when the reality is the opposite. This can be comforting for a person inhabiting a hostile niche, but it can also prove to be harmful to the person as they become skilled at living the life of an addict, to the neglect of all other alternatives. The harm in addiction we'll argue is not to be found in the brains of addicts, but in their way of life.