Monday, April 16, 2012

Best Marker placement for Sorian and Duncan AI?

Hi Guys,



I've made quite a few maps now and have read all the info I can find on the markers, however it seems really hard to find information on how the AI uses some of the new FA markers and what the best practice is. Also I read the stickied thread about how the new AI works which gives me a brief idea, but I'm not sure if Sorian/Duncan AI changes this behavior?



Anyhow I thought I would ask you guys directly and then maybe write up a better document on how it all works (if someone has done this already please let me know!)



Really appreciate any time you can spend on helping out with these, i know there are quite a few queries!



So to the queries:



Defensive, Combat and Rally Points

1. From my understanding the AI will build defences as a defensive marker, facing the NEAREST Combat Marker, is this correct? Also does it matter how close the combat marker is, if there is only one combat marker on the other side of the map, will all defences be built facing that point?



2. Is there any limit to the number of defensive markers that should be placed, is it better to place them closer together or a few scattered across the map?



3. Are combat markers used ONLY as points of interest that the AI will scout, or do they do something more?



4. Is it better to place more combat markers, or just a few (e.g one combat marker at each players main base)



5. Are rally points only useful right near an AI base, and do they need to be really close to the base?



6. Is it best to place one rally point near each AI base or a couple, should they also be used near defensive positions and expansion bases?



7. I have noticed even if I have a rally point close to an AI base, and they may use it, they still seem to have heaps of units 'stuck' all around their factories, how do you avoid this?



Expansion Markers

8. From what I have read the AI will use the Small and Large expansion base markers only once that area is secure. Exactly what sort of things do they build at these markers? I think the small base usually has a few defences and a couple of factories, is the large expansion marker basically the same as their main base?



9. Mass points seem fairly straight forward, does the AI prefer them closer together? Also does there need to be plenty of mass points near expansion markers?





Pathing Nodes



10. From my understanding, the AI will find the closest pathing node and move there, then they will follow your paths to their destination - is this correct?



11. Lets say you have a square made up of nodes, all connect except for the top two (so its like an open box). If the AI starts at the top left node and wants to get to the top right node, will it follow the path from top left, to bottom left, to bottom right to top right - OR will it ignore the path you have put and travel without any guidance straight to the top right node because it is closer?



|___|



12. Is it better to have more nodes or less? Does the AI check for nodes close to it whilst it is travelling on a path, or does it pick the path when it starts moving and stick to it?



13. I had a map with shear cliffs and an land path going around the cliff, yet the land AI still tried to drive up the wall for the entire map - why is this? Some of them seemed to completely ignore the paths



14. Can you do groups of paths or should all paths be joined? In other words if you have ground level paths and a cliff level paths that are not joined, will that work?



Drop Point Markers



15. Is it better to have less or more drop points? Are they used ONLY for combat or should you place them on a cliff if there are mass extractors up there (or will the AI figure out they need to drop an engineer up there by themselves)



16. Does the AI get confused if there are too many drop points, how does it choose?



17. When going to a drop point, does the dropship use the AIR pathing nodes?





Other

Lastly... I was wondering if it is possible to come up with custom markers, so rather than just a defensive marker, can we rename markers to make AIR DEFENCES, and then the custom sorian/duncan AI use these? I think if we had more specific markers we could design maps where the AI could be much tougher and build stronger bases.|||I will try to answer to the best of my knowledge.



1. Defensive markers are used to tell the AI where a good spot to put a defensive base is. How the facing direction is decided is not contained i the lua code so I can't confirm the theory.



In addition, The SAI will look at these markers when deciding where to place bases for ACU sniping and T3 arty bases when the enemy is too far away from the main base.



2. To my knowledge, there is no limit. The more you place the more the AI will look at when deciding where to place a new base. If you have an extraordinary number of markers it could, theoretically, cause lag. Place them near choke points and places where you think defenses should be placed.



3. I don't think Combat Markers are even used by the default AI anymore. The SAI uses them if it has no other places of interest to scout.



4. As I said in 3, I don't think the default AI uses them anymore. Instead, as the AI scouts it adds places of interest to a table to keep tabs on where the enemy has set up shop. Still place them because they help the SAI when there are no points of interest set up yet.



5. The AI will look for Rally points up to 75 Map Units (3/4 the firing distance of a fatboy) away from each factory. So, keep them close, but not too close. Place them in an area that looks good for grouping units and building Land T4s.



6. One per base is enough. you can place them near expansion bases (not really needed for defensive points) if you like. It might even be a good idea. If there is no marker the AI will just pick a spot for each factory.



7. No clue.



8. Small and Large Expansion areas are used for small and large expansions. Basically, new bases. What they build will depend on the AI.



9. Balance the mass as you would for a player. They will find it.



10. The AI will choose the path based on the distance and the threat the path poses. They first find the closest node and loop through all of the adjacent nodes testing the viability of each one. they continue on until they get to the closest node to their destination.



11. Depends. Most platoons will follow your path. Notable exceptions being; the platoons that just find the nearest target and go straight for it and T4s.



12. This depends. The default AI chooses a path and sticks to it. The SAI will re-evaluate its path after encountering resistance. More avenues for the AI is definitely better, but too many may cause lag. Just find a happy balance.



13. See 11.



14. In theory, it should. As the AI loops through path nodes it is looking at the AdjacentNodes table to find the next node. So, if you keep the paths separate it should work.



15. Transport Markers are used for everything by the default AI, combat units and engineers. For the SAI and Duncane's AI Drop points are only used if a suitable position cannot be found.



16. The AI chooses a drop point base on how close it is to the destination.



17. Yes.



I believe custom markers is a definite possibility.



Hope this helps ;)|||Thanks very much Sorian, that is great info and should help.





If we introduced custom markers do you think you would adjust your AI to use them?



My line of thinking is that if we can use more specific markers such as 'good placed to build air defence and sheilds', 'good places to build ground defence', 'good places to build sheilded anti nukes', 'good places to build defences against experimentals' etc.



This *could* mean if they are available they can use them and your code wouldn't have to do as much work finding suitable spots, or worst case they just end up with better defences.



Currently most AI's don't build strong points to defend bases and incoming attacks, one thing the AI really can't stop is when we gain air superiority and send a czar in, even if it dies we can normally crash it into their base. If we were able to specify good places to build lots of air defence we could stop this from happening.



I generally use Hazards Marker Editor, so maybe we could get him to include 'custom markers' and decide on what is needed to improve things.







p.s. I guess I am also thinking along the lines of, make the AI a bit dumber and make maps smarter so the AI doesn't have to "think" as much to improve performance. Not sure how feasible this is.

No comments:

Post a Comment