system
Given the following post, respond as if you're commenting on Reddit:
human
How does electricity know what the shortest path is to its destination?

Not sure if it belongs to this tag, or another one but this one started bugging me as soon as I thought of it.

I assume it works by distributing a small amount of charge in all directions and then moves to the point where the electricity has not bounced back yet, but then again, that's just my assumption and is most likely completely wrong.
gpt
So let’s scrap the classic image most people have of electricity where you have an electron source pushing out electrons towards a positive pole. Instead, let’s think of this like gravity and water. Your negative source is at the top of a hill, and the positive sink is at the bottom. If you dump a bunch of water on top of the hill, the water doesn’t just flow straight down the hill to the bottom, it flows in all directions, but most of it goes straight down to the hole as gravity **pulls** the water down. In reality the positive pole sends out a field, similar to a magnet, that pulls on the electrons in the source, pulling them towards the positive terminal. As the electrons are pulled, there are infinitely many paths they can take, but each path has its own resistance. Also, because these paths are different but leave and arrive at the same place, they are called parallel and follow an important law of circuits. Namely that the amount of current (electrons) flowing through an individual branch of a parallel circuit is inversely proportional to the resistance of that branch. So the electricity actually is moving through all the paths, because the field generated by the positive source pulls along all the paths, but the amount going through the higher resistance paths is so small we essentially ignore it because of the law mentioned above.