How to lose weight if you’re addicted to food, according to a cognitive scientist who struggled for years