Pathing system for 2-D square grid
I'm creating a game, city populization, and my worker pathing system isn't working very well. I first built it, so they ran right through everything, then I rebuilt it into an intelligent one... but it lagged like crazy because it looked at every possible path. After that, I rebuilt it into one that always turned right- causing workers to run in circles before they finally honed in on their destination. Now, I rebuilt it into annother intelligent one, but it gets laggy when there are many houses and you change any plot. It works the same way as the first intelligent one, except it searches ahead of time and stores all the paths it finds. None of these four pathing systems work good enough for me; I need an intelligent pathing system that quickly and easily finds the fastest path with no lag, no matter how extensive the area to path through. What would be an algorithm that I could use for this pathing system?