Yes you could. Almost certainly in a couple of hundred years almost all drug development will be done virtually in the way you describe.
The reason we can’t do it now is that we still don’t know a lot about how human biology works. Oh sure we know that the heart goes pump, pump, pump. But we have only just unlocked a computational method for figuring out how proteins will fold into 3 dimensions (and I’ll betcha that work is a little wrong some times and there will need to be fixes made to it over the coming decades).
There is a ton about how the brain works, our genes, and a ton of chemicals and proteins in our bodies that we don’t really know much about and it will be the work of decades or centuries to figure it all out.
Once that is done we will be left with a mammoth computational problem but one that computers of the distant future will probably be powerful enough to figure out.
But let me mess with your head here. Lets say you need to figure out if an anti-depressant is going to work. You start up your perfect computer simulation and you add the drug and observe how the perfectly simulated human brain in the computer works. If your simulation really is perfect, is the brain inside the computer alive and self-aware? If not then doesn’t it mean the simulation is missing something? If the simulation is missing something doesn’t that mean there is some potential for its results to be wrong?
If that brain is alive, is it ethical to create digital people to experiment upon? How is it any different than experimenting on living non-digital people?
Latest Answers