Here're soem random parts of the SSAI thread, I dont knwo who posted them though I know I posted the last one
And A huge post of mine concerning SSAI and my greatly ambitious Adaptive AI which funnily enough turned into a flmae over wether it was feasable or notMaybe i misunderstood what you meant but wouldn't that make things like a commander start inside the water in a map like Gods-of-War possible!? Or generaly start the game away from the designated place (which usually has some metal patches)!?
So the AI wouldn't update the threat area on a place where the radars are showing a mass of enemies but it is not under LoS...?
You could have a seperate value-map for Subsurface, Surface, and Air.
Thus only Subsurface or Surface (sea) or Air units would care about high values, ect...
Annother VERY important thing is:
CAN I WALK/FLY/HOVER/FLOAT THERE?
Will this factory/building/whatever be blocked if I build it at location X?
(that is to say on a metal map, the AI builds a factory on a high place, as you said and then discovers that its land units can't get off the mountain/high area)
The AI BEFORE building any factory should check to see if the units made there can exit from it properly.
Ditto for unit groups. They must check if they CAN GET to their selected target before marching.
The threat map would still apply under water obviously and due to what i said above it would mean a 3d threat map so air threats and underwater threats could be applied. I think the AI should determine whether a target location is underwater or not.
If it is underwater it should narrow the unit choice down to amphibious units ships subs and any aircraft that can see/fire at underwater objects.
This could be done by checking if the Z co-ordinates are bigger or smaller than the water levels. Then a check would be made to see if it's possible to make a path for units to follow that would let them reach the target, this would be to stop things such as, AI builds a huge naval fleet and sends it towards a small puddle inland to destroy a tidal generator even though it can never reach it. Next the type of units expected underwater or known to be at that location are taken into account and the unit types most effective at destroying them and are able to attack in that environment are selected and built so that the overall attack force is at least the same size as the opponent in terms of the expected and needed values of threat levels for the units in the attacking force.
Anyways, I thought I might as well try to explain how I think my ideas would work with SSAI and how they could be put in. The result of which I expect would be an AI that adapted to your actions and tactics and attempted to use these adaptations against you, by using basic learning to discover how to beat you.
AI map overlays
So we have the terrain map and the Metal map, and if this energy web feature is to be considered that can be the 3rd, on top of that I add the Strategic and Threat map.
Strategic map being an overlay of how valuable that part of the map is, thus flat land with lots of metal that├óÔé¼Ôäós high up would have a high value, as would the base the AI has built and any places that the other AI├óÔé¼Ôäós or humans tend to use to send troops to attack or defend.
The Threat map being an overlay changing in value depending on the enemy unit. A krogoth will make the overlay in its area rise considerably more than a peewee or any other unit for example. Where the krogoth steps the level will rise by a small amount and will fade off with time. The AI will attack units based on where they are on the overlay, a unit in a high level area is targeted first and a unit in a low level area second. When AI units are inactive, they will attempt to group and attack areas of high level threat. For example a group of newly built planes will group together and head off to a high level area looking for targets, a nuclear silo will bombard very high level areas blindly in hopes of hitting something. Such a very high level area would be a known rallying point of units from factories or a base that keeps being rebuilt or repaired/defended. The buildings and moving units would as such create high levels of threat.
The overlays only cover what the AI has explored so there is no need for omniscience, and can only update the overlay based on what it is supposed to see and not what is actually there, therefore no all seeing eye that cheats.
Because spring is a 3d engine and there are X, Y and Z co-ordinates, the height must be taken into account. To do so however could create lag, so I suggest the overlays are composed of single pixels/zones that take up the equivalent size of a metal storage building, with values for units as well.
Initial Game Play for AI
Set up initial overlays
Build factories and initial resources (definable by modder)
Build cheap units with the biggest los to explore
Exploring units follow any enemies sighted
Exploring units move towards areas of high strategic value and then move outwards
Defences are built over strategic positions, with higher density in areas of threat.
Construction of buildings
Buildings are to be split into two categories:
Those that produce power or neither repair attack or build units, and those that build units attack or repair such as factories and air repair pad and other defences.
Defences factories and repair buildings are to be built in areas of high level areas of the strategic overlay and areas of high threat within a radius of another building
Resources are to be placed on strategic ground with low threat levels preferably near levels of high metallic resources.
Buildings of the first type are to maintain a common distance from each over which in itself will lend itself towards a grid layout within a space that is easy to pass loose formations of units through quickly with little trouble. I would say this distance should be about the same as that required to move 1.5 sumos through a gap
Buildings of the second type take a distance equivalent to its width and no more.
Construction Units
1 third of all construction units are to be randomly set to guard a factory.
When energy is being overproduced, inactive construction units are to repair nearby units automatically
1 third of all construction units is also to go towards resourcing operations.
Every Factory that can produce a construction unit must produce at least 1.
Assessment of Threat level in an area and for a unit/building
In assessing the threat level of a unit, the:
Overall health
Maximum health
Hit Point modifier
Number of Weapons
Overall Damage caused by all weapons fired at a target at once
Mean rate of weapons fire
Mean Range of Weapons fire
Strategic Value of its position
Metal and Energy produced
When all these values are processed a final value is given which is that unit├óÔé¼Ôäós threat value
The amount by which a unit raises the threat level of its surroundings is 5% of it├óÔé¼Ôäós over all threat value. When an area of high threat is devoid of units it starts to decline to neutral ground with a half-life of ten minutes.
Assessment of strategic value for a unit/building
The strategic value of a unit or building is based on:
It├óÔé¼Ôäós cost to build
Its hit points
How much of a resource it produces
The value of the ground it stands on
Assessment of strategic value for an area
A strategic area is flat, high up, and has lots of metal resources, the ideal place to build an attack base or resourcing operation. Therefore in considering the strategic value of an area, you must take into consideration:
Terrain elevation
Terrain flatness
Metal Concentration
Once processed the strategic values of any building is added to gain an overall strategic value for a specific point.
Updating the overlays
This is done every 2 seconds, during which the position of each unit is noted and minor unit behaviours such as construction units repairing when surplus energy is present are processed during this period as well.
RADAR, SONAR and jammers
Radar and sonar are to be positioned to give cover of both high level areas of the strategic and threat overlay, with strategic areas taking precedence. Radar and sonar are to be built nearby existing buildings. Jammers are to be used on strategic areas unless part of an attack fleet.
Summary of basic model
This should give an AI that builds an orderly base in a strategic position, with effective handling of construction and support for defensive and offensive strikes, and the effective acquisition of resources.
Note: I have deliberately left out defence and attack as well as selecting what units to attack with and what needs to be built etc
Attacking and defending: Adaptive AI
Construction of new units
When a new unit is available to be built whether it be by a new factory or construction unit, it is to be built several times to be field tested. This would apply to initial start-up with the first factories being built. These units are then to attack the enemy. The AI is to make note of the unit types encountered and what types of units where most effective at destroying it. Also the overall ratio of how many of this unit type are to be expected is noted. This is used to influence build queues. So if your enemy produces unit type A and the AI finds unit type B kills A off easily then the AI will continuously increase the percentage of unit type B in its attack waves until unit type A isn├óÔé¼Ôäót built anymore. If a unit is ineffective at destroying the enemy or is too easily destroyed then it will not be built as often. As a unit type scores more kills the strategic value of that unit type is increased, and the value of a unit├óÔé¼Ôäós type is added to the units existing strategic value. Likewise if you built mavericks to destroy the AI and they where effective then the threat level of that unit type would rise and as a result so would those of the mavericks attacking. When deciding what takes precedence in a build queue the threat value of the unit type trying to counter is taken into account
For example more maverick counterparts would be built than peewee counterparts. The same would be true for buildings; the AI would note what unit type is the most effective against that defence or building and build accordingly.
Variety of attack
Attacks must consist of more than one component, of which there are Ground Sea and air.
Mines
Mines are to be laid in areas of low strategic importance but of high threat level. Mines are also subject to the rules of build queues and unit types mentioned above
Default Attack points
The AI is to send units to attack areas of high strategic value with low threat targets taking precedence with a 10% chance of it being a very high level threat to give a sense of randomness.
The energy web should also be taken into account but there isn├óÔé¼Ôäót enough information in my opinion to decide upon how it will affect it.
Use of overlay to make seemingly intelligent tactical moves
The AI is to go about devaluing strategic areas in the midst of an enemy base, the effects of witch will appear deliberate and possibly intelligent to the onlooker.
The AI should also manipulate the threat overlay to its advantage by using it as a guide to distract the enemy and draw it away from strategic ground.
Custom Tactics
A modder could program in custom tactics using vague rules and directions and unit types, and each tactic would be rated in the same way as unit types on its effectiveness against the enemy.