Smart Farming is a feature located in Global Settings -> General tab.
Normally when your bot farms, it will only hit a npc after it has been fully regenerated of resources, this takes 8.4 hours. There are several options for changing the speed at which your bot will farm a particular npc instead of waiting the full 8.4 hours. You can change the speed with config FarmingCycle, config FarmingCycleMin, and FarmingPolicy. You can also change the speed with Smart Farming.
Instead of hitting the npc on a schedule of hours in between that you specify, the bot will calculate how many resources would be in the npc based on the previous time you hit it, and decide whether it's more worthwhile to hit it again or another npc. For example, if you had two npcs at 1 mile away with 50% of their resources regenerated, then it would make more sense to hit both of them than it would to hit a single npc at 6 miles away with 100% resources. Your farmers could hit both 1 mile npcs and return and be ready to hit a 3rd npc before the farmers marching at the 6 mile away one would even arrive to it.
There are also benefits in Smart Farming that may not be so obvious. For example, in a crowded setting, your bot will be hammering the npcs closest to you and keeping them empty more efficiently than it could if it were marching further out. This means your neighbors will not be taking the loot from your doorstep while you're marching 60 minutes to their doorstep and 60 minutes back. More people can farm the same amount of space and get similar amounts of resources as they would hitting with a traditional 8.4 hour cycle.
Another "side-effect" benefit to Smart Farming is hero experience. The troops inside a npc regenerate completely in 1 hour. If you hit a npc 2-3 times during a 8.4 hour period for partial resources you're still getting 100% xp per hit, whereas if you hit the npc 1 time in 8.4 hours you're getting 100% xp only one time.
The possible options for Smart Farming are:
0 - off
1 - off, but send only trans needed
2 - on, send full trans
3 - on, send only trans needed
0 and 1 will turn off the Smart Farming feature, so your bot will hit every 8.4 hours per npc unless you've specified otherwise in goals.
2 and 3 will enable Smart Farming so the bot will hit whichever npc is more beneficial next.
1 and 3 have the added ability to send only enough transports as would be needed to collect all the resources inside the npc based on what it thinks it should have regenerated since you last hit it. It does not pre-scout to get this info, it just remembers.
Clearing your farming history will clear Smart Farming's "memory" of what has been hit and when.