grabblaka the answer you're looking for is probably buried somewhere in Tachywaxon's excellent strategy article on the topic: http://forums.civfanatics.com/showthread.php?t=470157
I know nothing about the coding, but my experience here was that the AI would only send out unescorted Workers when they couldn't see your Warrior. If I fortified a WII Warrior on a hill outside their borders, the AI would just build Archers.
Worker steals seemed easiest when the AI had two or more cities they needed to connect. A Worker would move more than 2 tiles away from a city into an unroaded Forest or Jungle. You could then swoop in with a 2-movement unit and, even if you couldn't capture the Worker then and there, it could only retreat into a further Forest, letting you steal it on the next turn.
The first picture in this post gives a couple of examples: http://forums.civfanatics.com/showpost.php?p=12107603&postcount=70
I know nothing about the coding, but my experience here was that the AI would only send out unescorted Workers when they couldn't see your Warrior. If I fortified a WII Warrior on a hill outside their borders, the AI would just build Archers.
Worker steals seemed easiest when the AI had two or more cities they needed to connect. A Worker would move more than 2 tiles away from a city into an unroaded Forest or Jungle. You could then swoop in with a 2-movement unit and, even if you couldn't capture the Worker then and there, it could only retreat into a further Forest, letting you steal it on the next turn.
The first picture in this post gives a couple of examples: http://forums.civfanatics.com/showpost.php?p=12107603&postcount=70