Fortress-cities are heavily fortified cities whose assigned task is to provide a barrier along some political border or natural bottleneck. They optimize for this task, and do not step outside of it. This may mean:
- Building on terrain with high defense value, rather than high food or productivity value,
- Building attack units with high attack value, rather than high mobility (eg, cannons rather than dragoons, or even musketeers rather than chariots),
- Never moving attack units outside of the city, except to reinforce a neighboring fortress-city in the line.
This last point highlights the goal-oriented nature of the fortress-cities, to keep the line intact, not just defend the squares adjacent to itself. The fortress-cities should be joined to one another by roads to allow for mutual support. They should also have "clear" terrain in the expected direction of the enemy, so that the enemy will not have the advantage of favorable defensive terrain.
Thus, when choosing building sites for fortress-cities:
- The cities should be two or three spaces apart, and not perfectly diagonal to each other, so that enemy units cannot bypass them,
- The cities should be located on forests or hills, or occasionally even mountains,
- The map squares immediately adjacent to the city in the direction of the expected threat should be grass, plains, or desert,
- The endpoints of the line of fortress-cities should be one or two map squares adjacent to the ocean, so that they form an "airtight" seal which land units cannot circumvent.
The placement of fortress-cities should serve some strategic purpose -- decide what border you want to keep static, and fortify that border, while throwing all of your offensive forces in another direction. This allows for economy of force in both the offense and defense. Venturing beyond your fortress-city line is uneconomical. The investment only pays off if you keep that border static for a very long time.
My usual city production plan "recipe" for growing a line early in the game is: Phalanx, Settlers, Barracks, Settlers, Phalanx, Catapult (or Chariot), City Walls, Diplomat, Catapult (or Chariot), Coinage.
Experienced Civ players will already be familiar with this concept, but laying it out like this is useful for the purpose of codifying a set of rules an AI player can follow.