Learning the habits to lose weight