Bearing the context of determinism in mind, how can an alcoholic be held accountable for something he has no control over, that is, genes, since he has been programmed to do so? Doesn't Allah know his actions and intentions beforehand? Although we can change the environmental factor which influences our actions, can we manipulate the role of genes?
The Islamic perspective does incorporate the concept of accountability, so we do believe that the actions of the alcoholic are at least partly due to free will for which he must abstain from alcohol. Every one of us is tested in different ways. We all have certain predispositions depending on our genetic makeup, but we have the ability to strive hard and work on these.
The Messenger of Allah (ﷺ) said: “Knowledge is acquired by seeking it, and patience is acquiring by striving to be patient. The one who strives to attain good will be given it, and the one who strives to protect himself from evil will be protected.” 
“If a person wants to attain the characteristic of generosity, the way to attain that is by pushing himself to do the actions of one who is generous, which is giving away wealth. So he keeps pushing himself and persisting in that, striving against his own inclinations, until that becomes second nature and it becomes easy for him, thus he becomes generous.
Similarly, if a person wants to attain the characteristic of humility, when he is inclined to be arrogant, he can persist in doing the actions of the humble for a long time, striving and pushing himself, until that becomes one of his characteristics, and it becomes second nature to him and easy for him.
All praiseworthy characteristics that are prescribed in Islam may be acquired in this way. Religious characteristics will never become entrenched in the soul unless the soul gets accustomed to doing all good habits, unless it gives up all bad habits, and unless it persists in doing good deeds like one who loves good deeds and enjoys doing them, and hates bad deeds and is pained by them.” [Shaykh Salih al Munajjid] 
Allah, the Most High, states:
“But as for him who feared standing before his Lord, and restrained himself from impure evil desires and lusts. Verily, Paradise will be his abode” 
This is how we can understand it from the Islamic viewpoint.
 Narrated by al-Khateeb and others from the hadeeth of Abu’l-Darda’; classed as hasan by al-Albaani
 Al-Naazi’aat, 79:40-41< Back to Questions