TAI
Part 2: Task based Agent Mechanics
Well Part 1 seems to have cleared a few things up while creating a few problems, some people don├óÔé¼Ôäót fully understand what I have proposed I Part 1 or think they understand but aren├óÔé¼Ôäót seeing it fully as I intended.
As for the problem of placing buildings and features such as sentinels and dragon teeth that are much smaller than a sector, I have thought this over and come to a novel and simple solution. These shall be dealt with by the Defence agents which will use custom agents that take 2 points and build X type unit in between those 2 points at Y density (I always found that fi I simply wanted to build a wall to block unit path I could put dragon teeth slightly apart to save time) Also I think pre-made defence arrangements was a good idea suggested in the past and I shall use them as tools, therefore the defence agents will request macro buildings or in other words a miscellaneous item of X value and X threat and X priority, which would be the total sum of the components of that formation. Along with all the other stuff that is. This would allow the likes of walls of missile towers or sentinels surrounded by DT├óÔé¼Ôäós.
So it seems I will have to outline what Agents there are and how they communicate.
For ease of use I have made the functions in part 1 obsolete and created interface Agents that supply information between the engine interface and the AI agents. They can act as a proxy storing data and returning it only doing new calculations when the engine interfaces says there├óÔé¼Ôäós a change. Thus allowing pre-processing of data and cache for speed of use, as well as allowing for expansion.
Construction Agent:
Decision making Agent
When someone wants to build something, they tell this agent, which either says yes or no based on a set of judgements in its programming based on available data. If Yes is said then this agent returns a yes and the agent that asked waits for it├óÔé¼Ôäós stuff to be built. The construction decision agent then tells the Build Agent what needs building, where and to what unit group it will belong to. If necessary a new unit group will be created by firing off a command to the group Agent that will return the required GroupID of the new group.
Build Agent:
Organising Agent
This Agent acts on commands received from the Construction Agent. It chooses agents to automate the construction units in building units, as well as relocating construction units from one task to another.
Construction and Repair Agent:
Task Agent.
This agent controls the creation of new air repair pads, and construction units. It sets patrol paths and reclaims features, as well as building geothermal plants. Apart from this its primary job is to monitor construction and resources and speed up construction processes based on this data. How exactly I am not sure at this moment but I will cover this at a later date.
Const.Micro Agent
Slave Agent
This Agent is told it needs to build THIS, THERE, NOW, WITH THAT GROUPID. This agent handles all the units in that group and their movement towards the build site then finding the nearest available location at the build site.
Resource Agent
Service/Task
This Agent will return information on how much is being produced, how much is being used and how much is stored, for both metal and energy.
This Agent is also tasked with the responsibility of issuing build requests for resource buildings/units, and notifying other agents excess resource production.
Factory Agent
Task/Slave
Receives construction queues for factory built units. It is also tasked with advancing technology and pushing forward higher-level factories.
WMD Agent
Task
This agent requests the construction of WMD├óÔé¼Ôäós and controls the use of WMD├óÔé¼Ôäós such as berthas and nukes. It can also receive requests from targets from other agents, in the form of a sector/sub-sector to shell/nuke and Priority. The WMD agent is also responsible for anti missile silos and other anti-WMD units.
Movement Agent
Slave
Is given a GroupID and a target destination. Turning this into an Agent and not coding in this in each and every agent that moves units allows for much greater varieties of movement, such as shelling a hill to allow units to pass through, or combining unit groups to travel in packs to be safer or using transports (thinks of the zwzsg bridge)
Intelligence Agent
Task, Organiser
This agent makes requests to be given or built units to use to explore, and maintain radar/sonar/LOS. Its responsibility thus is to make sure that as much of the map can be seen at any one time, as well as maintaining and expanding radar coverage. This would include jamming, using spy units, peepers, and radar targeting facility projects
Group Agent
Service
Creates, merges, removes and adds to unit groups, given a set of UnitID or GroupID. It also accepts requests for groups, by looking for idle groups that fit the needs of the requesting agent, hence idle units are re-used instead of replaced.
Defence Agent
Task, Organiser
This Agent is responsible for building DT walls and defences.
Attack Agent
Organiser/Decision
This Agent determines where the next attack should be and chooses a suitable tactical Agent to carry out the attack. This is determined using the Threat value for areas and players as well as how close by they are and how often they have attacked recently. This agent thus can be adapted to provide overall attack strategies
Tactical Agents
Slave/Organiser
When an attack is issued, the attack agent spawns a tactical agent of predetermined choice. This tactical agent then requests the required units based on that information and the programming it has. It then proceeds to execute the tactic it was programmed to do at the given location against the given opponent/s. One such tactical agent may be designed to use nukes against AA units (requests to WMD agent then waits for success) then storm in with hawks to clean up. Another Tactical agent may be programmed to use a pincer movement with certain types of unit. Another Agent may be specifically made for a custom unit, hence custom tactics. Tactical Agents could be programmed to spawn more tactical agents allowing them to work in conjunction, or attacking from numerous points with multiple strategies.
Diplomacy Agent
Organiser Decision.
This agent is in control of allies and resource sharing. These agents are thus more inclined to ally with another AI. This agent also controls the use of human FPS players, and co-operative attacks against another player with allies (receiving the message from another AI├óÔé¼Ôäós Diplomacy agent for support, then relaying It to the Attack Agent, which would then decide what would be done.)
So those are the basic agents I propose for TAI. If there are any things I have missed out or agents that serve to similar a purpose and could be merged, feel free to post.
In the light of recent posts, it has turned out that spring already has a Formation AI and a simple construction AI that organises construction units to help with building. Where these could fit into TAI I am not sure though I get the feeling that the construction AI bears a striking resemblance to the Construction + Repair Agent.
I would also like to know how the spring engine references units and groups within the engine.
TAI Part2 :: Task Based Agent Mechanics
Moderator: Moderators
Interesting, if too complex by half, at least build wise. A hive structure is great, but too many queen bees is just going cause confusion. I recommend compressing the structure somewhat.
First, merge the build and construction agents. This allows for commands to be issued as soon as the order is approved, since the decision will have included selecting the unit, or units to be used.
In the same manner, the construction/repair, and construction micro agents can be merged, into one agent, without loss of flexibility.
The resource agent should have control of the building of geothermals as well. This makes for less data shuffling.
The movement agent should be added separately to the Factory Agent as well. That way units can be set to join the appropriate groups, as they move out of the factories.
Everything else looks good.
First, merge the build and construction agents. This allows for commands to be issued as soon as the order is approved, since the decision will have included selecting the unit, or units to be used.
In the same manner, the construction/repair, and construction micro agents can be merged, into one agent, without loss of flexibility.
The resource agent should have control of the building of geothermals as well. This makes for less data shuffling.
The movement agent should be added separately to the Factory Agent as well. That way units can be set to join the appropriate groups, as they move out of the factories.
Everything else looks good.
The reason for the Const.Micro was simply that ti did what ti was told and needed no decision making which repair would involve. Repair would involve setting repair patrols and determining what should eb repaired and what needed repairing more and the construction of repair pads and other assorted repair buildings.
I wanted to keep micromanagement and the simplest fo actualyl dealing with the units themselves seperate formt he rest f the AI so that the rest fo the AI simply told the agent what it wanted and the agent would carry out the task like a slave or servant unquestioning.
Yah I agree now build and construction should be merged.
Resource Agent, I thought I added geothermal? Anyways, geos would coem udner the umbrella of resources anyways. The resource agent would look at the build tree and see which fo the buildable buildings/units would provide the best value for money production for the circumstances.
Also Factory Agents are given Destination GroupID's along with the construction command to which those units will be released to when built. Movement Agents are slave agents that are simply there to innovate and speed up or create more efficient ways fo moving units such as blasting away paths in cliff faces or using transport units
I wanted to keep micromanagement and the simplest fo actualyl dealing with the units themselves seperate formt he rest f the AI so that the rest fo the AI simply told the agent what it wanted and the agent would carry out the task like a slave or servant unquestioning.
Yah I agree now build and construction should be merged.
Resource Agent, I thought I added geothermal? Anyways, geos would coem udner the umbrella of resources anyways. The resource agent would look at the build tree and see which fo the buildable buildings/units would provide the best value for money production for the circumstances.
Also Factory Agents are given Destination GroupID's along with the construction command to which those units will be released to when built. Movement Agents are slave agents that are simply there to innovate and speed up or create more efficient ways fo moving units such as blasting away paths in cliff faces or using transport units