fa icon indicating copy to clipboard operation
fa copied to clipboard

AI Return a table of positions for potential transport drop points.

Open relent0r opened this issue 3 years ago • 2 comments

Describe the query

This request is for being able to get a group of potential positions for an AI to be able to more intelligently select a drop zone.

The idea is that the AI should make a query to a position on the map. The navmesh should query the imap threat (at a number of specified rings) at the position. It should aim to return positions that would be closest to a certain angle depending on AI and enemy start positions to avoid the AI sending transports over a base to get to a position it thinks is safe. The positions returned should also aim to be at least a minimum threat distance away (t3 sam range by default?) from the closest imap threatType position should there be any at the drop location.

Obviously this is a wish list but I think it would provide some options to fix a major flaw in the AI's transport usage.

---@param layer String
---@param origin Vector
---@param destination Vector
---@param threatType String
---@param threatRings Integer
---@param minimumThreatDistance Integer
---@param numPointsToReturn Integer
---@return table
function GetSafePositionsAroundLocation(layer, origin, destination, threatType, threatRings, minimumThreatDistance, numPointsToReturn)

    local threatTable = GetThreatsAroundPosition(destination, threatRings, true, threatType )
    NavMesh and mathmatical magic to select positions that are safe relative to the angle between the AI and the drop position.

end

Visualize the query

Have attached a visual representation on where the query might return positions.

DropZones

relent0r avatar Nov 10 '22 07:11 relent0r

Would you do any further post processing of the list of options, as part of the AI code?

Garanas avatar Nov 10 '22 09:11 Garanas

Would you do any further post processing of the list of options, as part of the AI code?

Yea there are other things I would do. But they would often depend on other intel data being available so I'd keep it separate. Assault transport drops are not a high success rate thing on the small maps for AI in general due to fighters/mobile aa not being visible at the time of drop point checking but they do provide an element of fun so I'm wanting to try and make them more reliable.

These are things I would do/want to do with the resulting positions table.

  • Do more specific threat checking, so that things like defenses and their ranges can be taken into account.
  • Validate pathing/terrain height from the selected positions
  • Set a bias to positions based on angle or strike position value. e.g a raiding party might want a position that is at a 90 degree + angle to the enemy base so they can attack from the side or a position that is close to a valuable target. Where as another platoon type might just want a frontal approach.

relent0r avatar Nov 10 '22 18:11 relent0r