AI - Threat metrics request for unit production
- Dominant language
- Lua
- Stars
- 264
- Forks
- 260
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 21
Description
**Describe the feature**
This is a little tricky to describe but I'll try make it sensical.
Currently there is no method for the default AI to be able to determine factory production requirements except economy metrics. What I would like is to have an over time metric that leverages the IMAP grid to determine enemy threat over time using maximums and combining this with the presence grid to assist in determining values and the knowledge of intel presence.
Ideally it would take Land, Air, Naval threat types since they are the main 3 types of threat that can drive factory production.
The concept would work something like this.
The AI performs a GetThreatAroundPosition of the map every x seconds (its cheap). It will log the threat found and run an over time value to say a 5 minute period. It can be as simple as taking the max value over that 5 minute period.
It will then use the presence grid to modify the values so that enemy threat on 'Hostile' grids can be devalued and enemy units on allied grids can be 'OverValued'. It could also determine threat on areas that can be path'd to and manipulate values based on that, though given amphib capabilities of units this likely won't give the expected results.
For grids that have not been scouted, have no intel. A value can be set based on distance to the AI.
To make this work it will also require the AI to understand its own current threat values. This gets trickier because it needs to understand its team mates threat values as well for team games, unless it divided the enemy threat values by the number of players.
The result is that an AI can determine if it has enough threat to counter the enemy, this will allow it to redirect economy into other things when the enemy decides to turtle or going into an eco phase. Compared to now where it will just continue to produce large numbers of units which will potentially put the AI way behind a human equivalent.
Contributor guide
Assessment
This issue has not been assessed yet.