This is one way of 'teaching' the AI to use it's environment, but in essence all it is is providing pre-set locations and paths. If you've obseved the AI acting under a 'DoMove' command you'll see this behaviour. In fact, this approach is the one favoured by most games. You will find that BF1942 uses a variation on this theme also, and although it might be harder to observe it's still there.
Teaching the AI to 'read' it's environment dynamically, like you mention, is most certainly possible, and I am making (or was making, it's kind of on hold at the moment) one or two subclasses of AI in UT that attempt to do this, but the problem I find is the sheer processing power and large chunks of memory required to do the calculations. The standard AI in Unreal Tournament uses a set a pre-defined coordinates called pathnodes which it interpolates to calculate the shortest distance to a point; UT can have dozens of creatures roaming the map at any one time, smoothly. I can run one instance of my creature in UT at a time, and it takes several seconds where my computer is totally frozen for it to calculate a path through some obstacles on a level suface.
Phew, going a bit OT there, back to what you were saying.
I guess technically (though this is very advanced) you could actually place one AI unit on the map - place a grid-like arrangement of other AI units around it - and use the "can see" command to automatically determine field of view/line of sight from any given position on the map.
I've never heard of the 'can see' command- what is this
Is it a function someone has made?
A good defense position usually is one with the defender in cover, and the enemy in the open. If you can determine line of sight from any given position, you could create parameters that would automatically identify good defense positions
Line of sight has been a problem I spent a lot of time on, and could come up with no reliable method to determine. My best attempts were often up to 1-2 metres wrong, the projectile used succumbed to gravity and was totally inaccurate over long distances.... the full story is in another topic on this board.
I agree totally that LOS would be incredibly useful if indeed it were possible, and that it would be easy for the game designers to add a scripted command, given that they must surely use raytraces in the AI core :-\, but people inform me that that is unlikely to happen.
Lastly, if you use the knowledge about LOS from any given point on, you could actually simulate the AI "sneaking up" to pre-set victory locations on their own without the need for user-created waypoints.
Terrain is just one of the problems with this, and although I'll admit it probably is possible, I've had only limited luck calculating paths on sloped surfaces so far (speaking about UT now). It's possible, straightforward even to help an AI navigate along on a flat plane, but more difficult when you introduce inclines. LOS and collision cylinder checks often fail on inclines where in fact there is a clear path between two points. Introduce obstacles (for example editor-placed sandbags and fortifications, if we're talking OFP) and it becomes even more difficult.
Hm, to round this off... the idea of preset locations may well work, but storing the data you collect might be a problem. You want to produce some sort of output file that the mission designer can user later for their map, because it's not possible to transfer information between two separate instances of a mission. When a player plays a mission, any information for that mission must come from that mission itself.
So you'd need some for of storing all this tactical data in a form that the mission designer can readily translate into AI waypoints, domove commands, et cetera. I've no idea how you could achieve this, short of making a dialog that dumps the data in a text field for the mission designer to copy and use later. That's still quite a lot of work..... but certainly possible. However I think the LOS idea is doomed, unless this 'cansee' function works. Otherwise, you just have no tools available to do what you suggest.