The busy human brain creates fast, low-cost habits when choices are frequent and are providing stable rewards. Using evidence from animal learning and cognitive neuroscience, we model a two-controller system in which habit and model-based choice coexist. The key inputs are reward prediction error (RPE) and the absolute magnitude of RPE. As the RPEs from a choice move toward zero, habits form. When the magnitude of averaged RPE exceeds a threshold, habits are overridden by model-based choice. The model contrasts with long-standing approach in economics (which relies on complementarity of consumption choice) and has several interesting properties that can be tested with behavioral and cognitive data.