Our legal and even moral system is based on the notion of free will. We do things wrong or well because we want to do it. Naturally, with the development of technology and psychology we can identify some defenses. For example, if alcohol. Or an episode of mental derangement.
As these disciplines develop more, then, we have to deduce that more exceptions will appear, more volitional layers to take into account. Ultimately, we will embrace much more the idea not of a total free will, but a mitigated one. The idea that acts are rarely voluntary (perhaps never will be), but are semi-voluntary.
Who is responsible for what?
To the question of who is the murderer, I would have to answer as in the Murder on the Orient Express, from Christie Agatha: all are. We all have a degree of responsibility. Determining that the culprit of a crime is the one who pulls the trigger or inflicts the stab is like reducing a century of neurobiological research to a mere question of mechanics or hydraulics.
For example, if someone has his frontal lobe completely destroyed, surely we cannot hold him responsible for his actions, because his rationality is very impeded when deciding how he is going to act. But the question is where do I put the line. What if 99% of the frontal lobe is destroyed? What if 80% is? These questions are not simple philosophies, but a very pertinent question, as the Stanford professor of neurology explains. Robert Sapolsky in his book Behave:
This is of enormous practical importance, given the huge percentage of those sentenced to death who have a history of frontal lobe damage, especially of the most disabling type, that is, occurring early in life.
In addition to frontal lobe injuries, there are many other factors that we know are correlated with an increased propensity to commit crimes: blood glucose levels, socioeconomic status of the family of origin, whether the mother smoked or drank during pregnancy and other prenatal factors, lead levels in water as a child. a head injury caused by a blow, levels of stress and glucorticoids, variant of the dopamine D4 receptor gene, the variant of the MAO-A gene that you have, and a long etcetera.
Bearing all these conditions in mind, then, we must reevaluate our legal and moral systems. Because the concept of author, responsible, criminal will be much more diluted. You can delve into all this, as well as the possible solutions in the medium or long term, in the following video: