There are algorithms which model the human brain. They're called Artificial Neural Networks (ANN). They basically model the synapses and attempt to model the way in which our synapses can accept signals and, if the combined signal input is strong enough, fire their own signals along dendrites to other synapses.
The thing is, building ANNs as a method of attempting to simulate the real thing, is a lot like using a nuke to simulate the sun; Sure, it'll give you some valuable data, but, in terms of its ability to approximate that which it's modelling, it falls WAYYY short.
I'm not 100% positive on the relative scales here, but to give a decent idea, consider the following (this is definitely going to be off by a few orders of magnitude... but it's close enough to get an idea of why ANNs aren't running the world for us):
If you took every single computer on the planet and had them using every single available resource to create the largest ANNs they could, and then connected all those different ANNs to each other (thus creating an even larger ANN) you MIGHT start to get close to the number of connections present in the human brain.