NTAI X discussion
Moderators: hoijui, Moderators
NTAI X discussion
NTAI & X
This just happens to be one of those I type offline, so any spelling complaints are to be blamed on FLWriter.
After doing extensive research, I found a lot of information based around a game called swarmz written in game maker where 3 swarms battled it out in a simple game where each swarm tried to kill off the other swarms and survive to win. The creator so swarms commented on using the system as a brain like system where each action was represented by a swarm.
Having done more research into this sort of thing, I combined it with a set of thought processes I had going on that where meant to change the very nature of NTAI.
Currently all AI's in this community are global structures that assign units commands based on the global situation, essentially simple macro-management. They all work on global structures, agents, that make absolute decisions, do number crunching and data pushing on statistics given by the engine every frame or on every event. Their decisions are based on the whole situation, and they don't tailor the decisions to the user. There is no consequential behaviour save minor unexpected surprises (JCAI has a set of routines in its construction code so that 2 units will help each other build something, but NTAI has this too, yet I haven't coded any of it, it's simply a pleasant consequences of how the engine deals with commands). Units dont learn, only an approximation of statistics that determine what should be built.
So, my idea was to take this whole situation, the convention of the spring AI developer, and turn it upside down literally. I decided to take away the Global high level orientated structure and put the unit first, and not the great director. Afterrall the director holds a dictatorship in the conventional AI, as a king or queen used to, yet today it is seen that a government or ruler serves their country and not the other way round. Put the unit in charge of their future actions, and let the directors not be commanders, but influencers, advisors, helpers, providers, not controllers.
Units thus would have their set of every possible action as a swarm, each action being scored and the score determining the size and power of a swarm. The swarm that won represented the action that was going to be taken.
So what needs to be done to let the units revolt against their evil agent masters, How will they overthrow the functor and chaser classes and gain the freedom to build and attack whatever they want? First of all, in the crossover from Dictatorship to democratic AI system, we need to give the users the ability to disobey. Implement a unit class, give it an execute(command* c) function and let that function be the gateway. Give the unit the basic swarming brain design and give the command action a huge multiplier till more actions can be added.
Ahem,.. how do we create consequential behaviour then? Surely under this system the only things affecting 2 units in the same position are their abilities? So I it through and came upon a simple solution. Units need a personality. It needs to be based on the circumstances of the area they where built in and what the AI was doing at the time of creation, as well as their attributes. For example fast moving units have less patience, and are more excitable than a slow moving behemoth, while a fark built on the edge of the AI's base is not going to be scared of building defences or radar towers nearer the enemy base on solo mission, but a con kbot built in the middle of a heavily guarded base would be better working in a large group of units with similair abilities, keeping safe.
I then thought that units need to change to suite the situation. So i thought that each decision that can be represented by a swarm is weighted by a units personality. If thats warm wins then it influences the units personality. For example a fark built in the middle of a base in a large group is going to get more confident if it reclaims an enemy unit.
So units have a personality that effects their actions, which in itself creates a whole set of unit dynamics and consequential behaviour such as weak defenceless units wont wander off by themselves near the enemy.
So units can then change their personalities based on events and their actions. Events are given to all units with a basic personality attatched to them which is then applied to all units, and how much their attitudes change depends on the existing personality.
What about the problem of an incoherent mass of units? Firstly I propose a map grid, with the map split into 128x128 size squares. These squares will have their own personality structures, represented by what events took place on them and the units that passed by. For example a choke point will show as a region of strong foreboding. Thus units that had a low confidence attribute would never consider going there and the swarms representing those options would be small. This map would also have influences. For example a unit decides it would be best to attack a point or a player, this view is imprinted on the grid square and fades, during which it can affect units with similair ideas, as a re-inforcing factor, or as a changer of their attributes. A units main emotion at the time is also imprinted, this is their current decided action and their personality attribute represented by that action. This taints the attributes of other units too.
So we have a grid map that helps influence unit behaviour and lets units influence eachother. This map would be saved to file, and if a pre-existing one is present then a composite map is created, an amalgamation of an AI's experience on that map. When a game is started the composite map is loaded and is updated with the information amassed over a game.
Aswell as this a unit has an attitude towards a player, a map, a tactic, and each building. Initially only a player and a unit type will have an associated attitude. Then an associative system where pairs of items are put together. For example a player and a tactic definition, a groups of map vectors and a personality attribute, a unit type and a tactic, etc. This may lead on to further projects other than skirmish AI by adding more associative logic, associable objects and basic inference abilities.
In this situation the globalised agents that used to exist still exist but their role is the equivilant of a government advisory board, or a charity, or a regulator, not a dictator or a strict regime.
But these agents have been running the game for a while now, and they've been successful at making a working AI, and they have advantages, for example why should each and every unit calculate the same data when a single object can do it. Thus as well as map grid influencers, there will be global influences, mostly given by agents. These agents will act as co-ordinaters and influencers with global influencers that can influence a unit and maybe make that unit agree then issue out localized influences that re-inforce the messages..
So gabba posted his research and I started looking at voronoi diagrams and how it would affect such an AI as this. By adding more spatial awareness, the AI could overload with information processing. My thought is to generate an initial voronoi diagram and from that create 2, one that augments the map grid, by overlaying on top and having the vertexes and corridoors inbetween given attributes like the map grids, then from that zones are generated by generating a third voronoi diagram using the vertexes of the second as the points to generate the first. This would create a zone system, which itself would have attributes, but would give the AI a much better idea of what territory it had conquered, and could even be adapted for the player, creating the equivilant of borders and conquered are representations as seen in xxx(forgotten name of game).
Thus the AI could earmark a set of these zones as targets that it needs to conquer, or a corridoor in the second diagram as a good point to take, or to create barriers, such as walls of DT to protect them by building them across a corridoor or around a zone in the the 3rd voronoi diagram, or along the border.
Further more this could be enhanced by making scouting position a list of interesting places for a unit to consider visiting. These would be the detected mex hotspots, the vertexes on voronoi diagram represent large open spaces, the ajoining lines represent coriddors of mobility and paths between spaces. Starting positions could also be read directly from the map file and checked by the AI.
The vertexes being open spaces would also allow for much better generic building placement, by allowing buildings simply to be placed around these vertexes, otherwise the existing algorithms would mean that paths and coridoors would end up blocked or filled with defences that couldn't be used, and any number of congestion problems.
This also adds the better attack co-ordination by showing multiple paths to the enemy, and allowing extra weights to be added by calculating trafficability, and coverage etc as shown in gabbas research, which when combined with the map grid I discussed above would lead to a bigger improvement in how an AI uses its experience.
On a side note:
Anti AI tactics for other AI's
Versus JCAI
Build lots and lots of cheap units. JCAI doesnt account for lots and lots and lots of weak units.
versus AAI
Mess with its learning, send out lots and lots of very cheap and inneffective units of a certain type so that AAI is encouraged to build a certain type of unit. Then send out a good task force and the lack of a decent mixture on AAI's behalf would be its downfall.
OTAI
Get the player number and allyteam of OTAI then peek at its stored information in the AI buffers, change it if you want to play dirty tactics, or use it to detect OTAI then make judgements about what its doing and how to defend.
NTAI & ZcAIn
build lots of unreclaimable features on mex spots and places you dont want it to build. This should mess up the interfaces ClosestBuildSite enough. If not place mines. A minefield of weak mines should be enough to stop NTAI effectively attacking you if its replensihed, and it should halt NTAI's base creep effectively if huge range low damage mines are placed in strategic positions.
This just happens to be one of those I type offline, so any spelling complaints are to be blamed on FLWriter.
After doing extensive research, I found a lot of information based around a game called swarmz written in game maker where 3 swarms battled it out in a simple game where each swarm tried to kill off the other swarms and survive to win. The creator so swarms commented on using the system as a brain like system where each action was represented by a swarm.
Having done more research into this sort of thing, I combined it with a set of thought processes I had going on that where meant to change the very nature of NTAI.
Currently all AI's in this community are global structures that assign units commands based on the global situation, essentially simple macro-management. They all work on global structures, agents, that make absolute decisions, do number crunching and data pushing on statistics given by the engine every frame or on every event. Their decisions are based on the whole situation, and they don't tailor the decisions to the user. There is no consequential behaviour save minor unexpected surprises (JCAI has a set of routines in its construction code so that 2 units will help each other build something, but NTAI has this too, yet I haven't coded any of it, it's simply a pleasant consequences of how the engine deals with commands). Units dont learn, only an approximation of statistics that determine what should be built.
So, my idea was to take this whole situation, the convention of the spring AI developer, and turn it upside down literally. I decided to take away the Global high level orientated structure and put the unit first, and not the great director. Afterrall the director holds a dictatorship in the conventional AI, as a king or queen used to, yet today it is seen that a government or ruler serves their country and not the other way round. Put the unit in charge of their future actions, and let the directors not be commanders, but influencers, advisors, helpers, providers, not controllers.
Units thus would have their set of every possible action as a swarm, each action being scored and the score determining the size and power of a swarm. The swarm that won represented the action that was going to be taken.
So what needs to be done to let the units revolt against their evil agent masters, How will they overthrow the functor and chaser classes and gain the freedom to build and attack whatever they want? First of all, in the crossover from Dictatorship to democratic AI system, we need to give the users the ability to disobey. Implement a unit class, give it an execute(command* c) function and let that function be the gateway. Give the unit the basic swarming brain design and give the command action a huge multiplier till more actions can be added.
Ahem,.. how do we create consequential behaviour then? Surely under this system the only things affecting 2 units in the same position are their abilities? So I it through and came upon a simple solution. Units need a personality. It needs to be based on the circumstances of the area they where built in and what the AI was doing at the time of creation, as well as their attributes. For example fast moving units have less patience, and are more excitable than a slow moving behemoth, while a fark built on the edge of the AI's base is not going to be scared of building defences or radar towers nearer the enemy base on solo mission, but a con kbot built in the middle of a heavily guarded base would be better working in a large group of units with similair abilities, keeping safe.
I then thought that units need to change to suite the situation. So i thought that each decision that can be represented by a swarm is weighted by a units personality. If thats warm wins then it influences the units personality. For example a fark built in the middle of a base in a large group is going to get more confident if it reclaims an enemy unit.
So units have a personality that effects their actions, which in itself creates a whole set of unit dynamics and consequential behaviour such as weak defenceless units wont wander off by themselves near the enemy.
So units can then change their personalities based on events and their actions. Events are given to all units with a basic personality attatched to them which is then applied to all units, and how much their attitudes change depends on the existing personality.
What about the problem of an incoherent mass of units? Firstly I propose a map grid, with the map split into 128x128 size squares. These squares will have their own personality structures, represented by what events took place on them and the units that passed by. For example a choke point will show as a region of strong foreboding. Thus units that had a low confidence attribute would never consider going there and the swarms representing those options would be small. This map would also have influences. For example a unit decides it would be best to attack a point or a player, this view is imprinted on the grid square and fades, during which it can affect units with similair ideas, as a re-inforcing factor, or as a changer of their attributes. A units main emotion at the time is also imprinted, this is their current decided action and their personality attribute represented by that action. This taints the attributes of other units too.
So we have a grid map that helps influence unit behaviour and lets units influence eachother. This map would be saved to file, and if a pre-existing one is present then a composite map is created, an amalgamation of an AI's experience on that map. When a game is started the composite map is loaded and is updated with the information amassed over a game.
Aswell as this a unit has an attitude towards a player, a map, a tactic, and each building. Initially only a player and a unit type will have an associated attitude. Then an associative system where pairs of items are put together. For example a player and a tactic definition, a groups of map vectors and a personality attribute, a unit type and a tactic, etc. This may lead on to further projects other than skirmish AI by adding more associative logic, associable objects and basic inference abilities.
In this situation the globalised agents that used to exist still exist but their role is the equivilant of a government advisory board, or a charity, or a regulator, not a dictator or a strict regime.
But these agents have been running the game for a while now, and they've been successful at making a working AI, and they have advantages, for example why should each and every unit calculate the same data when a single object can do it. Thus as well as map grid influencers, there will be global influences, mostly given by agents. These agents will act as co-ordinaters and influencers with global influencers that can influence a unit and maybe make that unit agree then issue out localized influences that re-inforce the messages..
So gabba posted his research and I started looking at voronoi diagrams and how it would affect such an AI as this. By adding more spatial awareness, the AI could overload with information processing. My thought is to generate an initial voronoi diagram and from that create 2, one that augments the map grid, by overlaying on top and having the vertexes and corridoors inbetween given attributes like the map grids, then from that zones are generated by generating a third voronoi diagram using the vertexes of the second as the points to generate the first. This would create a zone system, which itself would have attributes, but would give the AI a much better idea of what territory it had conquered, and could even be adapted for the player, creating the equivilant of borders and conquered are representations as seen in xxx(forgotten name of game).
Thus the AI could earmark a set of these zones as targets that it needs to conquer, or a corridoor in the second diagram as a good point to take, or to create barriers, such as walls of DT to protect them by building them across a corridoor or around a zone in the the 3rd voronoi diagram, or along the border.
Further more this could be enhanced by making scouting position a list of interesting places for a unit to consider visiting. These would be the detected mex hotspots, the vertexes on voronoi diagram represent large open spaces, the ajoining lines represent coriddors of mobility and paths between spaces. Starting positions could also be read directly from the map file and checked by the AI.
The vertexes being open spaces would also allow for much better generic building placement, by allowing buildings simply to be placed around these vertexes, otherwise the existing algorithms would mean that paths and coridoors would end up blocked or filled with defences that couldn't be used, and any number of congestion problems.
This also adds the better attack co-ordination by showing multiple paths to the enemy, and allowing extra weights to be added by calculating trafficability, and coverage etc as shown in gabbas research, which when combined with the map grid I discussed above would lead to a bigger improvement in how an AI uses its experience.
On a side note:
Anti AI tactics for other AI's
Versus JCAI
Build lots and lots of cheap units. JCAI doesnt account for lots and lots and lots of weak units.
versus AAI
Mess with its learning, send out lots and lots of very cheap and inneffective units of a certain type so that AAI is encouraged to build a certain type of unit. Then send out a good task force and the lack of a decent mixture on AAI's behalf would be its downfall.
OTAI
Get the player number and allyteam of OTAI then peek at its stored information in the AI buffers, change it if you want to play dirty tactics, or use it to detect OTAI then make judgements about what its doing and how to defend.
NTAI & ZcAIn
build lots of unreclaimable features on mex spots and places you dont want it to build. This should mess up the interfaces ClosestBuildSite enough. If not place mines. A minefield of weak mines should be enough to stop NTAI effectively attacking you if its replensihed, and it should halt NTAI's base creep effectively if huge range low damage mines are placed in strategic positions.
- Michilus_nimbus
- Posts: 634
- Joined: 19 Nov 2004, 20:38
Thanks for mentioning OTAI!
The whole buffer was so that allied OTAIs don't build mexxes on the same spot. Messing with that would really screw things up!
I use a semi-democratic AI myself. Most unit behavior is done at in the UnitIdle Function, with builders looking at the weights of possible available units and adjusting them to the needs of the moment.
For instance, I keep a DefCon float variable that tells the over all "defensibility" of the base, with less < 0 meaning low and > 0 meaning good. Putting down defenses increases it and adding non-defense buildings increases it. This is added to a defense map. Putting down buildings adds or subtracts the amout of defensive need in that area, based on the buildings power rating. For example, a fusion plant would demand more or better defense buildings near it than a solar panel would.
It looks like your system could use a number of such value/map pairings and have the units balance them. Thus, a construction kbot on the edge of the base might realize that it is in a low-defense zone and add a LLT to compensate or a number of Peewees could be summoned to guard the area.
Also, you can add these values to the pathfinding system to have units prefer traveling in areas of low or high enemy activity, or in highly protected areas.
The whole buffer was so that allied OTAIs don't build mexxes on the same spot. Messing with that would really screw things up!
I use a semi-democratic AI myself. Most unit behavior is done at in the UnitIdle Function, with builders looking at the weights of possible available units and adjusting them to the needs of the moment.
For instance, I keep a DefCon float variable that tells the over all "defensibility" of the base, with less < 0 meaning low and > 0 meaning good. Putting down defenses increases it and adding non-defense buildings increases it. This is added to a defense map. Putting down buildings adds or subtracts the amout of defensive need in that area, based on the buildings power rating. For example, a fusion plant would demand more or better defense buildings near it than a solar panel would.
It looks like your system could use a number of such value/map pairings and have the units balance them. Thus, a construction kbot on the edge of the base might realize that it is in a low-defense zone and add a LLT to compensate or a number of Peewees could be summoned to guard the area.
Also, you can add these values to the pathfinding system to have units prefer traveling in areas of low or high enemy activity, or in highly protected areas.
Well a semi-democratic system is available in all AI's to some extent. Once i get started with mine most things will be handled by priorities, much alike OTAIs but a lot more variables will be put into account.
Alantai, if you manage to make a 100% diplomatic AI as you say that actually provides a challenge to the player (eg not vulnerable to a nuking of a chokepoint causing all units to cower in base for extended periods of time only to be nuked again once they all come out in a big group), then Ill kiss your feet too.
I think a central driving force must be present, and although its perfectly possible to obtain it from order through chaos (what you plan) it will be very hard to get it optimal.
Good luck!
Alantai, if you manage to make a 100% diplomatic AI as you say that actually provides a challenge to the player (eg not vulnerable to a nuking of a chokepoint causing all units to cower in base for extended periods of time only to be nuked again once they all come out in a big group), then Ill kiss your feet too.
I think a central driving force must be present, and although its perfectly possible to obtain it from order through chaos (what you plan) it will be very hard to get it optimal.
Good luck!
Sounds brilliant. If you actually get this working I will be very impressed. Will you be working on this along side NTAI, instead of NTAI, or incorporating it into NTAI? Whatever you do im sure it will be impressive.
However, I saw a few minor issues with that. I might be wrong with all of my points, as I dont actually know how your going to do this exactly, but...
With each and every unit having an individual personality, I can see the computers memory dwindling away quite rapidly. And as quite a few computers are already being pushed memory and CPU wise, this AI might only be avaliable to high-end computers.
Loading and saving the section map thing for the units personality could be an issue after a few games. Say you keep on beating the AI continuoulsy, then the AI will become scared of the whole map, and will never want to venture forth. So if you keep killing it, you will make a porcing AI. If you keep losing to the AI, the AI will become so confident, that it will think everywhere is a safe zone, and all its units will be scared little sissy's Nothing will want to attack. Ofcourse, these are very extreem cases, so they mihgt not happen to often, but its atleast something to think about.
Hope you get this working soon, as it sounds really promosing!
However, I saw a few minor issues with that. I might be wrong with all of my points, as I dont actually know how your going to do this exactly, but...
With each and every unit having an individual personality, I can see the computers memory dwindling away quite rapidly. And as quite a few computers are already being pushed memory and CPU wise, this AI might only be avaliable to high-end computers.
Loading and saving the section map thing for the units personality could be an issue after a few games. Say you keep on beating the AI continuoulsy, then the AI will become scared of the whole map, and will never want to venture forth. So if you keep killing it, you will make a porcing AI. If you keep losing to the AI, the AI will become so confident, that it will think everywhere is a safe zone, and all its units will be scared little sissy's Nothing will want to attack. Ofcourse, these are very extreem cases, so they mihgt not happen to often, but its atleast something to think about.
Hope you get this working soon, as it sounds really promosing!
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
I always dreamed of having a unit based AI system that makes units think individually and fight individually, but still respoding to direct orders, perhaps some units decide to roam on their own (if said to roam) looking for something to kill, others will be cowards and sometimes hessitate on carrying out their orders and retreat when damaged, some other units might be heros and fight till the death.
This AI sounds promising...can't wait! To Kill It
This AI sounds promising...can't wait! To Kill It

OK.
First off this isnt a 100% communist AI. Global structures will still be needed, for co-ordination. They'll still give otu commands, onyl the unti can disobey or choose a varied approach based on its situation.
To combat hordes of untis acting differently and memory problems I think I shall expand a little more.
The algorithms you speak fo to determine the swarming brain already exist. I have here several different versions fo swarmz and other ALife programs from the gamemaker community showing this. The nature of how the swarms behave has also bene rooted in GMboids, the flocking birds simulation that has been inexistence since the 1980's.
In this AI groups are likely to form, as untis are guidd to untis of similair type and thus affect eachother and form a mroe coherent group. Here I think limiting the size of the swarms through a multiplier would help cpu time, and tryign to condense the nubmer of attributes in a personality would help too.
Also a possible addition should a computer eb fats enough once the rest is implemented is that the units chosen action then be given into a hive mind where the situation replays, using only the amalgamated swarms left over from the initial battles played out for each unit, giving a true hive mind. This may effect consequential behaviour though.
I also think there could eb promise in trainign neural nets to do some mroe of the work. While intensive training would be cpu itnensive, once the weights and structure is sorted I can incorporate and have a method fo sorting out thgins that would be faster than a lengthy algorithm. Albeit it may have an error margin, and would take a long time to train for the correct parameters.
The aim here was to pose a very big challenge by outsmarting other AI projects, and giving an AI that micromanaged. This was aimed for 0.4 & 0.5 as the final solution to crush all other AI projects and propell NTAI trillions of lightyears ahead of everythign else, so I could rest and get on with my life instead of suffering from this paranoia I get so easily.
So yes this is the future of NTAI, not a new AI project. It is codeable, certainyl possible on high end systems, 80% likely on normal and below average systems, definately not on a system that can only just run spring.
Also, there will only be one game map stored in memory, and rather than deal with specific values, I think it would be better to deal with how big a value is relative to another, lets say the average value on the map for that attribute?
hhmm veylon, I like that, I had looked through OTAI but not in any real detail. I see that most people have glossed over your AI, maybe ebcause its latest release isnt compatible with the curent AI itnerface version, but I'll recompile and release it if you wih so or havent the time yourself ^_^
And yah triaxx, I was thinking more of using it to place defences of similair type, aswell as tying ti into the heightmap adn LOS map to generate radar tower positions. The problem with minefields is what sort of mines should the AI build and where? I think it'd be a matter of dealing with terrain analysis to see the area of the zones alongside a corridoor.
Also I see that so far people think ti would be a good idea to create new build algorithms. I have thought about ti and come up with a novel quickfix that gets me what i need. ClosestBuildSite and CanBuildAT both take const UnitDef* parameters. What fi we created a UnitDef ourselves isntead of getting ti fromt he engine, by makign ti identical to the one from the engine but multiplying the size of the buildigns footprint by a factor of 1.5, which would allow the AI to sue the itnerface to place buildings while getting good clearance of obstacles without major coding efforts. Better yet fix the algorithm for all maps, then it'd be as trivial as adding *1.5 in the right place.
First off this isnt a 100% communist AI. Global structures will still be needed, for co-ordination. They'll still give otu commands, onyl the unti can disobey or choose a varied approach based on its situation.
To combat hordes of untis acting differently and memory problems I think I shall expand a little more.
The algorithms you speak fo to determine the swarming brain already exist. I have here several different versions fo swarmz and other ALife programs from the gamemaker community showing this. The nature of how the swarms behave has also bene rooted in GMboids, the flocking birds simulation that has been inexistence since the 1980's.
In this AI groups are likely to form, as untis are guidd to untis of similair type and thus affect eachother and form a mroe coherent group. Here I think limiting the size of the swarms through a multiplier would help cpu time, and tryign to condense the nubmer of attributes in a personality would help too.
Also a possible addition should a computer eb fats enough once the rest is implemented is that the units chosen action then be given into a hive mind where the situation replays, using only the amalgamated swarms left over from the initial battles played out for each unit, giving a true hive mind. This may effect consequential behaviour though.
I also think there could eb promise in trainign neural nets to do some mroe of the work. While intensive training would be cpu itnensive, once the weights and structure is sorted I can incorporate and have a method fo sorting out thgins that would be faster than a lengthy algorithm. Albeit it may have an error margin, and would take a long time to train for the correct parameters.
The aim here was to pose a very big challenge by outsmarting other AI projects, and giving an AI that micromanaged. This was aimed for 0.4 & 0.5 as the final solution to crush all other AI projects and propell NTAI trillions of lightyears ahead of everythign else, so I could rest and get on with my life instead of suffering from this paranoia I get so easily.
So yes this is the future of NTAI, not a new AI project. It is codeable, certainyl possible on high end systems, 80% likely on normal and below average systems, definately not on a system that can only just run spring.
Also, there will only be one game map stored in memory, and rather than deal with specific values, I think it would be better to deal with how big a value is relative to another, lets say the average value on the map for that attribute?
hhmm veylon, I like that, I had looked through OTAI but not in any real detail. I see that most people have glossed over your AI, maybe ebcause its latest release isnt compatible with the curent AI itnerface version, but I'll recompile and release it if you wih so or havent the time yourself ^_^
And yah triaxx, I was thinking more of using it to place defences of similair type, aswell as tying ti into the heightmap adn LOS map to generate radar tower positions. The problem with minefields is what sort of mines should the AI build and where? I think it'd be a matter of dealing with terrain analysis to see the area of the zones alongside a corridoor.
Also I see that so far people think ti would be a good idea to create new build algorithms. I have thought about ti and come up with a novel quickfix that gets me what i need. ClosestBuildSite and CanBuildAT both take const UnitDef* parameters. What fi we created a UnitDef ourselves isntead of getting ti fromt he engine, by makign ti identical to the one from the engine but multiplying the size of the buildigns footprint by a factor of 1.5, which would allow the AI to sue the itnerface to place buildings while getting good clearance of obstacles without major coding efforts. Better yet fix the algorithm for all maps, then it'd be as trivial as adding *1.5 in the right place.
I kinda like the idea as well, a while ago I thought about how ants work suprisingly simple and still accomplish a lot. Right now I'm really doing "overmanagement" with JCAI. Trying to coordinate everything in a "top-down" way can be very hard.
So if you can give them simple rules that combine to make complex behavior, you basically have a better result with less coding. My intension was that I should make a rule-based system to be able to code all the little rules, but later on I just replaced that with the new complete scripting idea.
These rules could be similar to your personalities, but do you really want them to have personalities, meaning they can be scared and run away? I think ants work better than humans in many cases
I also stumbled on an example for termites building a mound:
Which will make them collect chips and put them together with a couple of extremely simple rules.
So "bottom-up" approach if I could call it that, sounds really cool so good luck trying it out.
So if you can give them simple rules that combine to make complex behavior, you basically have a better result with less coding. My intension was that I should make a rule-based system to be able to code all the little rules, but later on I just replaced that with the new complete scripting idea.
These rules could be similar to your personalities, but do you really want them to have personalities, meaning they can be scared and run away? I think ants work better than humans in many cases

I also stumbled on an example for termites building a mound:
Code: Select all
Whilst wandering randomly
If you find a chip
then pick it up
unless you're already carrying a chip
in which case drop it
So "bottom-up" approach if I could call it that, sounds really cool so good luck trying it out.
Personalities arent rules, they're attributes/traits, they affect the potency or score fo an action but they dont create the action, and they can be changed too.
What if your group suddenly finds itself confronted by surprise by a group 4 times larger than itself with superior tech level. Of course they're going to be scared of this. And thus they're going to run away and regroup, untill the group is bigger than the enemies at which point they're confident ebcause of their nubmers, they attack the enemy and destroy them and keep their new found confidence, and carry on. At the same time the AI knows what killed that sort of attack group and how to deal with it in the future.
Personalities give basic instincts to a unit that can ensure its survival.
I see the potency of the extremes forming however. So I think that a global structure should be at work monitoring untis that reach extremes too quickly, 'unstable' personalities as they where, and thus attempts to cure them of the disease making their personalities les shyperactive by providing additional cues to balance them out.
What if your group suddenly finds itself confronted by surprise by a group 4 times larger than itself with superior tech level. Of course they're going to be scared of this. And thus they're going to run away and regroup, untill the group is bigger than the enemies at which point they're confident ebcause of their nubmers, they attack the enemy and destroy them and keep their new found confidence, and carry on. At the same time the AI knows what killed that sort of attack group and how to deal with it in the future.
Personalities give basic instincts to a unit that can ensure its survival.
I see the potency of the extremes forming however. So I think that a global structure should be at work monitoring untis that reach extremes too quickly, 'unstable' personalities as they where, and thus attempts to cure them of the disease making their personalities les shyperactive by providing additional cues to balance them out.
Because then that unit hasnt got a controlling personality, and it needs to be regenerated, resulting in a very good chance the same personality will destabilise in the same way. Besides this sort of behaviour would be more advantageous cotnrolled than eradicated. It'd encourage unpredictability and short bursts of emotion that would be put down by the global structures.
It could even be encouraged under an alternative AI system for civilians, maybe even enhanced to be even mroe potent, creating such consequential behaviours as hysteria, paranoia, panic, acute anxiety and fear.
It could even be encouraged under an alternative AI system for civilians, maybe even enhanced to be even mroe potent, creating such consequential behaviours as hysteria, paranoia, panic, acute anxiety and fear.
Swarms are usually a bunch of agents where each swarm is an object instance. By default they have a basic inherited object with no data, and then data is added as they learn. Once the data meets certain conditions it would update an in memory table somewhere that would be read by another agent i will call mailman. This mailman sends out messages to objects updating their properties or values via methods The table would also hold the in memory and in game locations. If you wanted quadrant based swarms that would work.
The main advantage of swarms that I see is getting a bunch of independent units moving in a common direction to avoid traffic jams. I don't see any other practical application for them. As for independent bases, the real question is when to build them? Starcraft and WC3 make this a crucial decision, and it is more important than a single agent.
As for independent agents without swarming, some things benefit from independence (scouting) but others benefit from cooperation (finishing a single resource building early).
When I was thinking how an insect hive race should work I was thinking of little squads of bees that could be upgraded to larger and larger swarms by merging them together. The advantage, both in CPU and user management, is that they would pack in denser and be a single unit.
As for how to beat any AI... dragon's teeth. This is even more effective when the player or AI would know how to reclaim before building, or reclaim to clear a path then attack.
The main advantage of swarms that I see is getting a bunch of independent units moving in a common direction to avoid traffic jams. I don't see any other practical application for them. As for independent bases, the real question is when to build them? Starcraft and WC3 make this a crucial decision, and it is more important than a single agent.
As for independent agents without swarming, some things benefit from independence (scouting) but others benefit from cooperation (finishing a single resource building early).
When I was thinking how an insect hive race should work I was thinking of little squads of bees that could be upgraded to larger and larger swarms by merging them together. The advantage, both in CPU and user management, is that they would pack in denser and be a single unit.
As for how to beat any AI... dragon's teeth. This is even more effective when the player or AI would know how to reclaim before building, or reclaim to clear a path then attack.
I would also like to refer back to my previous post about formations. Right now we have the Persian style of more troops = more better. The Persians had no formations, no structure. Each regional lord was in charge of equipping his troops and bringing them to the battlefield. Alexander the Great brought troops with standardized equipment and formations. They defeated a force 15 times their size.
I probably typify independent agents as Persian, and prefer the notion of tactical retreats, especially when it is tactically advantageous. Hey look I am faster! Hey look I can hit and run at the same time! Hey look I just beat 3 units by myself and they were stronger! (Alexander the Great did the same thing with a river)
I probably typify independent agents as Persian, and prefer the notion of tactical retreats, especially when it is tactically advantageous. Hey look I am faster! Hey look I can hit and run at the same time! Hey look I just beat 3 units by myself and they were stronger! (Alexander the Great did the same thing with a river)
This..well, I'm not sure a scared AI is going to be an effective one. Yes, it would be a step forward in AI in general, but as far as making an effective in-game opponent, having the units run away might not be the best thing. Regroup, certainly, flee..not so much.Alantai Firestar wrote: Of course they're going to be scared of this. And thus they're going to run away and regroup, until the group is bigger than the enemy's at which point they're confident ebcause of their numbers.
This part I like. Learning AI ftw.At the same time the AI knows what killed that sort of attack group and how to deal with it in the future.
Again, this is a step forward as far as AI goes, but a rather bad thing for a TA player to be thinking. Units are expendable. A non-cheating AI that tries to keep each and every unit alive will eventually fall into a porcing AI, which would be rather easy to beat.Personalities give basic instincts to a unit that can ensure its survival.
Great ideas, just be sure to think about how they might play into creating a challenging opponent for Spring.
AF: I disagree that it shouldn't be controlled, but on reconsideration, it should be removed from that formation, and placed into a formation with like-minded units. This would create unpredictable Delta Force style strike groups, or Berserkers if you'd rather. Don't destroy that uniqueness just for the sake of numbers, mold them into a fighting force that can deal with problems such as Krogoths, groups of tanks, and that kind of thing. Stuff normal groups would be too scared to fight against. Sort of like the marines.
Daraknor:I wonder if he's thinking more of soldier ants. A few soldier ants aren't terrifically impressive, but if you have several million, it's an all but unstoppable fighting force. Same principle, but it's more of a scorched earth policy.
The only difference between fleeing, and retreating, is how far, and how fast. Flight also tends to be less ordered. A retreat typically involves leaving a rear guard, some one to slow the enemy advance.
Nemo: There is a difference between porcing, and proper defense. Porcing doesn't work, if you have to support a massive force of military units, and it simply won't allow for a small base. Construction units must move out from that base, and to keep them from being destroyed the swarm must move out to keep the perimeter safe. To maintain that many units to keep the perimeter safe, the cons have to expand to new resources, and so the swarm must extend the safe perimeter.
It's actually an effective reversal of the Metal Maker failsafe issue from OTA. The failsafe to build more metal makers was tripped by a lack of energy, which was causing the mexxes to shut down. The program read this as a loss of metal income, and not the correct loss of energy income. Thus it built the high energy using Metal Makers. As fail-safe, it was a perfect idea. Unfortunately it was implemented terribly.
Daraknor:I wonder if he's thinking more of soldier ants. A few soldier ants aren't terrifically impressive, but if you have several million, it's an all but unstoppable fighting force. Same principle, but it's more of a scorched earth policy.
The only difference between fleeing, and retreating, is how far, and how fast. Flight also tends to be less ordered. A retreat typically involves leaving a rear guard, some one to slow the enemy advance.
Nemo: There is a difference between porcing, and proper defense. Porcing doesn't work, if you have to support a massive force of military units, and it simply won't allow for a small base. Construction units must move out from that base, and to keep them from being destroyed the swarm must move out to keep the perimeter safe. To maintain that many units to keep the perimeter safe, the cons have to expand to new resources, and so the swarm must extend the safe perimeter.
It's actually an effective reversal of the Metal Maker failsafe issue from OTA. The failsafe to build more metal makers was tripped by a lack of energy, which was causing the mexxes to shut down. The program read this as a loss of metal income, and not the correct loss of energy income. Thus it built the high energy using Metal Makers. As fail-safe, it was a perfect idea. Unfortunately it was implemented terribly.
Daraknor falls into the category of players with base mentality.
I found in OTA my play improoved once I stopepd thinking of thigns as abses. The map is my base, and my buildings will filter down everywhere, there is no enemy base, just an infestation that needs eradicating.
And yes it would eb godo for untis to flee and be scared if a bigger enemy is there.
Lots of untis together are going to treat themselves as if theya re expendable, than if they're a small task force.
Take WW2 and soviet russia for example. Nazi germany wants to rpeserve their own forces while destroying soviet forces.
Soviet forces number in the millions and charge ahead, each person is expendable to a huge degree.
Here the big distinction is numbers, how conservatively you are going to play.
I've already stated that units will form groups, with other units of similair ability and personality.
And darkanor, I am aware of the formation problem. At the moment it isnt a persian strategy thing. One could beat a group of units twice as big as yours under OTA by micromanaging without formations or strategy, just by making sure all the units where firing at the same target at the same time, concentrating firepower. Other benefits would be taken from the voronoi research and its use as shown in gabbas research, which says that a way of quantizing tactics is neede, and no doubt the AI will be forced to use them.
At the moment I'm doing heavy research into different neural networks and genetic algorithms.
And Yah, uniqueness must be encouraged but not to the extent of insanity.
I found in OTA my play improoved once I stopepd thinking of thigns as abses. The map is my base, and my buildings will filter down everywhere, there is no enemy base, just an infestation that needs eradicating.
And yes it would eb godo for untis to flee and be scared if a bigger enemy is there.
Lots of untis together are going to treat themselves as if theya re expendable, than if they're a small task force.
Take WW2 and soviet russia for example. Nazi germany wants to rpeserve their own forces while destroying soviet forces.
Soviet forces number in the millions and charge ahead, each person is expendable to a huge degree.
Here the big distinction is numbers, how conservatively you are going to play.
I've already stated that units will form groups, with other units of similair ability and personality.
And darkanor, I am aware of the formation problem. At the moment it isnt a persian strategy thing. One could beat a group of units twice as big as yours under OTA by micromanaging without formations or strategy, just by making sure all the units where firing at the same target at the same time, concentrating firepower. Other benefits would be taken from the voronoi research and its use as shown in gabbas research, which says that a way of quantizing tactics is neede, and no doubt the AI will be forced to use them.
At the moment I'm doing heavy research into different neural networks and genetic algorithms.
And Yah, uniqueness must be encouraged but not to the extent of insanity.