Global AI Interface
Moderators: hoijui, Moderators
-
- Posts: 436
- Joined: 26 Aug 2004, 08:11
Global AI Interface
Here are my ideas for what the global AI interface will expose. Give your input as to what else you think an AI would need to work properly! I'll be compiling your ideas here as well
AI Interface requirements
Metal State ( + amount, - amount, total amount, total capacity)
Energy State ( ditto above )
Callback function for unit created/destroyed
Callback function for enemy enter LOS
Callback function for enemy enter Radar
Callback function for under attack
Terrain information
Radar/anti-radar coverage
Get unit information
Save damage per second being done in battle
Save information about units seen previously, with an unknown current status
"Cheating" functions to let an AI get information a player normally wouldn't have access to
Slow update for efficiency
Communication with Group AI
// these last two will work, i imagine, by calling a group ai to do the work
Send Command to Unit/Building
Get Command for Unit/Building
AI Interface requirements
Metal State ( + amount, - amount, total amount, total capacity)
Energy State ( ditto above )
Callback function for unit created/destroyed
Callback function for enemy enter LOS
Callback function for enemy enter Radar
Callback function for under attack
Terrain information
Radar/anti-radar coverage
Get unit information
Save damage per second being done in battle
Save information about units seen previously, with an unknown current status
"Cheating" functions to let an AI get information a player normally wouldn't have access to
Slow update for efficiency
Communication with Group AI
// these last two will work, i imagine, by calling a group ai to do the work
Send Command to Unit/Building
Get Command for Unit/Building
Last edited by jouninkomiko on 04 May 2005, 15:23, edited 4 times in total.
- [K.B.] Napalm Cobra
- Posts: 1222
- Joined: 16 Aug 2004, 06:15
-
- Posts: 436
- Joined: 26 Aug 2004, 08:11
- [K.B.] Napalm Cobra
- Posts: 1222
- Joined: 16 Aug 2004, 06:15
-
- Posts: 436
- Joined: 26 Aug 2004, 08:11
cobra, i understand it would be cool to have that in the interface, but the point of an interface is generality. This would allow the AI developer to have complete control over what exactly makes one target a higher priority than the other. Someone could write a part of an AI that makes this decision, and then another AI developer can call those routines no prob.
- [K.B.] Napalm Cobra
- Posts: 1222
- Joined: 16 Aug 2004, 06:15
-
- Posts: 436
- Joined: 26 Aug 2004, 08:11
I think...
That's right, jouninkomiko- the interface should be very general so people could implement any kind of AI behavior they want.
Also is it possible to get a function to access marker(which you draw on the map) information, define areas (avoid areas, areas from which most attack)?
Function to add a totaly new command to the GUI, and to display some GUI commands when no units are selected.
Also when building stuff builders shouldn't block anything, like block themselves or build a solar in front of factory's exit.
If GetEnemyUnits() get's all enemy units in the current moment, the AI should be able to store the info on enemy units it spotted. For example your peeper scouted on enemy base and AI "remembered" all the structures and buildings in this area, to adjust strategy. I think it's quite fair and logical. When your units entered that area again, info on this area should be updated.
Also if in helper AI you give your unit a spesific order, the AI shouldn't bother it until order completed, it should only adjust other units to what was ordered to that unit.
Also you should have all kinds of functions to communicate with your ally (share stuff, attack together, share knowledge of enemy info) but this could be done later.
Lastly, I wonder if for a complicated AI there's going to run hundreds of complicated behaviours in the Update() function, will the computer handle it 30 calls a second? Maybe parts of AI not related to fighting and scouting should have more Slow Update() function?
That's all, Great that you're going for it jouninkomiko;)
Also is it possible to get a function to access marker(which you draw on the map) information, define areas (avoid areas, areas from which most attack)?
Function to add a totaly new command to the GUI, and to display some GUI commands when no units are selected.
Also when building stuff builders shouldn't block anything, like block themselves or build a solar in front of factory's exit.
If GetEnemyUnits() get's all enemy units in the current moment, the AI should be able to store the info on enemy units it spotted. For example your peeper scouted on enemy base and AI "remembered" all the structures and buildings in this area, to adjust strategy. I think it's quite fair and logical. When your units entered that area again, info on this area should be updated.
Also if in helper AI you give your unit a spesific order, the AI shouldn't bother it until order completed, it should only adjust other units to what was ordered to that unit.
Also you should have all kinds of functions to communicate with your ally (share stuff, attack together, share knowledge of enemy info) but this could be done later.
Lastly, I wonder if for a complicated AI there's going to run hundreds of complicated behaviours in the Update() function, will the computer handle it 30 calls a second? Maybe parts of AI not related to fighting and scouting should have more Slow Update() function?
That's all, Great that you're going for it jouninkomiko;)
Suggestion for interface
First: Good job JouninKomiko. I´m impressed!
Second:
What about a function in the interface that returns the identifier of the units attacking/getting killed. It would allow an AI programmer to figure out the mix of enemy units being used.
I would like to know whether you want the AI to be able to gain information that a human player what normally not know about? (Which is basically cheating :) If yes, it could be a good idea to have a function in the interface, that lets the AI-programmer see what units are being built by the enemy by returning the build orders, and perhaps the number of certain enemy units (in a certain area ?)
-MrAstrup
Second:
What about a function in the interface that returns the identifier of the units attacking/getting killed. It would allow an AI programmer to figure out the mix of enemy units being used.
I would like to know whether you want the AI to be able to gain information that a human player what normally not know about? (Which is basically cheating :) If yes, it could be a good idea to have a function in the interface, that lets the AI-programmer see what units are being built by the enemy by returning the build orders, and perhaps the number of certain enemy units (in a certain area ?)
-MrAstrup
Last edited by MrAstrup on 03 May 2005, 12:53, edited 1 time in total.
Message no longer relevant!
Message no longer relevant!
Last edited by MrAstrup on 03 May 2005, 12:55, edited 2 times in total.
Call build commands for units
Call build commands for buildings
Call build commands for entire groups
Mex Radii check function
MMex Radii check function, since the two are supposed to operate on different levels of metal.
Communication with other allied AI's, or possibly the player if he is allied. An interesting addition for another topic, is the ability for the AI to taunt, but that's for elsewhere.
Exact position call function
Exact positioning system, notably the Matrices that AF and I propose to implement.
---
On a mostly unrelated note, Joun, do you think you could move the AI topics AF and I have put up to this forum?
Call build commands for buildings
Call build commands for entire groups
Mex Radii check function
MMex Radii check function, since the two are supposed to operate on different levels of metal.
Communication with other allied AI's, or possibly the player if he is allied. An interesting addition for another topic, is the ability for the AI to taunt, but that's for elsewhere.
Exact position call function
Exact positioning system, notably the Matrices that AF and I propose to implement.
---
On a mostly unrelated note, Joun, do you think you could move the AI topics AF and I have put up to this forum?
- [K.B.] Napalm Cobra
- Posts: 1222
- Joined: 16 Aug 2004, 06:15
Perhaps if we just had all the functionality of a "mouse" it would help things by giving them a relatable abstraction layer for beginning developers to use.
What don't you like about it?And why don´t you find another pic for your profile as well? It´s not only bad taste, it´s bad advertising!
MAP information
Suggestion:
Functions in the interface for returning MAP info, like highest spot, narrow passages, so that you know which spots may be of high value when attacking or defending.
Functions for returning metal production and energy production.
The area in which it is being produced is valuable too, so you know where to attack!
Functions for returning the postions of specific buildings/units like nuke silos, anti-nuke silos, Krogoth Gantry, Krogoths, vehicle plants, radar planes etc. - I guess it could almost be functions for returning information on almost any unit types/buldings, their number and position, but that is quite extensive :)
Functions returning map coverage for enemy missiles, lasers, artillery etc.
Extremely important in order to know where to attack with planes for instance.
Functions returning the summarized firepower of enemy units in a certain area, the maximum fire range in an area holding enemy units, the summarized armour of enemy units in an area. All good for determining where to break through or improve defence.
The map areas could be represented by matrixes as suggested earlier.
Let me know if I´m too detailed on my suggestions!
-MrAstrup
Functions in the interface for returning MAP info, like highest spot, narrow passages, so that you know which spots may be of high value when attacking or defending.
Functions for returning metal production and energy production.
The area in which it is being produced is valuable too, so you know where to attack!
Functions for returning the postions of specific buildings/units like nuke silos, anti-nuke silos, Krogoth Gantry, Krogoths, vehicle plants, radar planes etc. - I guess it could almost be functions for returning information on almost any unit types/buldings, their number and position, but that is quite extensive :)
Functions returning map coverage for enemy missiles, lasers, artillery etc.
Extremely important in order to know where to attack with planes for instance.
Functions returning the summarized firepower of enemy units in a certain area, the maximum fire range in an area holding enemy units, the summarized armour of enemy units in an area. All good for determining where to break through or improve defence.
The map areas could be represented by matrixes as suggested earlier.
Let me know if I´m too detailed on my suggestions!
-MrAstrup
Some sort of mechanism for determining damage per second being dealt to enemy / ally in a given area might provide some useful information for falling back or pushing forward.
A way to tell if a path is getting clogged with rubble, so the AI programmer can come up with a response like air transports or clearing the rubble.
Something to think about later, perhaps - an interface to receive waypoints from allied humans, for "coordinated" efforts, or whatnot.
A way to remember where major defeats occurred, so that place might be avoided or struck with different units.
A way for the AI to understand if it is hit by a nuke or LRPC, so responses can be coded.
A way to tell if a path is getting clogged with rubble, so the AI programmer can come up with a response like air transports or clearing the rubble.
Something to think about later, perhaps - an interface to receive waypoints from allied humans, for "coordinated" efforts, or whatnot.
A way to remember where major defeats occurred, so that place might be avoided or struck with different units.
A way for the AI to understand if it is hit by a nuke or LRPC, so responses can be coded.
Few more thoughts
Function to tell if there's a feature on the square and what feature(wreckage, DT, Rocks, trees). If it is water or ground, and how deep water
Mainly I want functions to add GUI elements which can correspond to parameters I'll create for the AI.
Also about group AI communication: groups AI's inside global AI should follow global AI's orders, but might implement it in their own way (global AI orders units in SimpleFormation AI to move and they move in formation) .
Also for helper, there should be a gui command to make this group uncontrollable by global AI, only group AI.
Mainly I want functions to add GUI elements which can correspond to parameters I'll create for the AI.
Also about group AI communication: groups AI's inside global AI should follow global AI's orders, but might implement it in their own way (global AI orders units in SimpleFormation AI to move and they move in formation) .
Also for helper, there should be a gui command to make this group uncontrollable by global AI, only group AI.
-
- Posts: 436
- Joined: 26 Aug 2004, 08:11
well, to be honest i JUST looked at the Group AI and i see what some of you are talking about! i like the notion of distributing commands to group AI's as part of the global AI interface. maybe thinking of the global AI as a conglomeration of group AI's capable of doling out responsibilities, leaving it to the Group AI's to fill in the details.
ie, a group of construction units can receive a command to build or assist something, and the group AI can handle not only the paths to get there, but the actual assist itself.
-- Tsumari: i like the DPS idea! this could help the AI know to either stop throwing its forces to death, or to wait until it has a different distribution/higher number of forces to attack again.
-- Mr Astrup: I'd like to avoid giving the AI access to cheating functionality, but i think im going to include it in the interface, to let certain AI's use that information. Maybe using certain functions flags the AI as cheating, so people can disable cheating AIs?
-- alik83: i really like the idea of having scout knowledge saved! then the AI can treat the base as still being there unless it finds out otherwise and can plan its attacks accordingly
ie, a group of construction units can receive a command to build or assist something, and the group AI can handle not only the paths to get there, but the actual assist itself.
-- Tsumari: i like the DPS idea! this could help the AI know to either stop throwing its forces to death, or to wait until it has a different distribution/higher number of forces to attack again.
-- Mr Astrup: I'd like to avoid giving the AI access to cheating functionality, but i think im going to include it in the interface, to let certain AI's use that information. Maybe using certain functions flags the AI as cheating, so people can disable cheating AIs?
-- alik83: i really like the idea of having scout knowledge saved! then the AI can treat the base as still being there unless it finds out otherwise and can plan its attacks accordingly
If you include these it's essential to flag these functions as cheating, otherwise people will program cheating AI helpers for themselves.jouninkomiko wrote:-- Mr Astrup: I'd like to avoid giving the AI access to cheating functionality, but i think im going to include it in the interface, to let certain AI's use that information. Maybe using certain functions flags the AI as cheating, so people can disable cheating AIs?
Additional suggestions:
- access to the current damage state of an enemy unit (does the player have access to this? I don't remember now) OR better, the ability to calculate how much damage is being dealt to a specific enemy unit, by seeing what hits it - if the AI also has access to the unit definitions, it can then evaluate when the enemy is gonna die
- the ability to perceive that a group is under fire, even if the first projectiles are missing their goal: this is not the same calculating how much damage is being dealt to the group, since you can know this before, and units die fast in TA. Basically, the AI should be able to know how many of which type of enemy projectiles are exploding in a given area within LOS.