Discussing AI questions, improvements ...

Discussing the game, editor (Suite) and the related tools.
Post Reply
Jaro
Second Lieutenant
Second Lieutenant
Posts: 20
Joined: 2019-09-23 07:23, Monday

Discussing AI questions, improvements ...

Post by Jaro »

Hi Luis :howdy
I wonder if it a space to discus AI improvements...
I'm developing, together with Sympatyk, a campaign using AI 3.0 and observed a problem.

I don't want to discuss major changes but small glitches/errors.
When AI is in scope it is hard to say something is an error or decide if some behavior is a feature or potential glitch.

An example of a glitch, in my opinion, is when two fighters fly to the same VH and don't attack a ground unit even configured as Aggressive and Fearless.
They don't attack, probably because they are in range of an enemy AA unit.
But why then both of them flaw to the same place?
One can be explained - to make a rekonesanse (AA unit is known but the fighter is set to fearless).
Why te second one goes there as well? No more need for recon, no attack... Why didn't fly to any other VH?

Ok. It was an example. If you have a time and would like to work on such things we can discuss such cases to find a solution and then make some tests.
If no just let me know. I know its hard to find a free time nowadays.
Do we have a separate thread for such discussions?

Or maybe I'm wrong using AI 3.0?
What are the difference between AIs?
Which one would you recommend assuming I want to use all of the Suite AI options?

BR Jaro
User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 806
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Discussing AI questions, improvements ...

Post by LuisGuzman »

:howdy
I moved your post to this new topic to allow discussing AI questions.

Do remember that it is a must for me to have files to test any AI behavior reported: the active .cfg file and a saved file.

Edited:
It is very important to enable the AI log to allow me to analyze all positions checked by AI and the weight assigned to each one.
Also, a .xlog file including the player's turn actions also help me to debug, as I can replay faster to the point AI start knowing what happened before AI start analyzing

Be aware that my time is rather limited and since the code become frozen I've not even opened any of the AI source code files, so most routines will need much more time to review than usual.

Anyway, I'll try to do my best :yes
  Visit my website to get my latest tools.
Jaro
Second Lieutenant
Second Lieutenant
Posts: 20
Joined: 2019-09-23 07:23, Monday

Re: Discussing AI questions, improvements ...

Post by Jaro »

If it a space to discuss then I"ll attach some soon.
none
Second Lieutenant
Second Lieutenant
Posts: 265
Joined: 2021-02-03 16:51, Wednesday

Re: Discussing AI questions, improvements ...

Post by none »

Jaro wrote: 2025-10-16 17:27, Thursday don't attack a ground unit even configured as Aggressive and Fearless.
That is a bug I've seen sometimes too (AI 3.0 too).
"Fearless" is supposed to mean "attack no matter what", AFAIK it's made for kamikaze units. Yet I've seen "fearless" units sometimes (not always) just hesitate when facing overwhelming odds. I've never managed to understand what triggers it.
Most of the time "fearless" works more or less as expected, I use it often to make weaker enemies try to swamp the player (lots of weak attacks will eventually kill or at least severely damage any much stronger unit).

As for the "why do they fly there" issue, it's probably just the (annoying) habit of the AI to move its units adjacent to your units and then - do nothing, because it will be destroyed if it attacks. It's not logical (definitely not what a human would do), but in the game it can have an utility, when at some point there is a wall of enemy tanks rubbing noses with your own tanks, and any attack on your part will end in disaster due to massive enemy support fire... You get a Mikado-like situation, where you need to find how you will try to unravel this tangle without triggering a deadly enemy support fire cataclysm... Not realistic, but still challenging.

Anyway. My point is that the main problem here is why "fearless" units sometimes don't attack. :dunno

The AI sends two units because, well, the first didn't do anything, so it sends another, and so on. If it had 5 planes in the vicinity, it would had sent 5 planes...

Jaro wrote: 2025-10-16 17:27, Thursday What are the difference between AIs?
Only Luis knows, but IIRC it's the same as 2.0 with some improvements (don't recall specifics).
I've been using AI 3.0 from the beginning because it seemed to handle ship combat better, and overall seemed more aggressive, less VP-centric.
sympatyk
Major
Major
Posts: 819
Joined: 2019-10-03 17:05, Thursday

Re: Discussing AI questions, improvements ...

Post by sympatyk »

:howdy
To conduct the test, we will use a ready-made scenario (--> in four versions)
http://www.opengeneral.pl/sympatyk/B08_test_scen.zip
from Gustlik's e-file
https://opengeneral.pl/files/GusOGEfile_7.6.6.zip

Test --> checking the behavior of two MIG 25 aircraft for AI 3.0

Image

Since MiGs are not designed to attack ground targets, we are interested in their behavior towards enemy aircraft.
To do this, we place a Soviet flag nearby to make enemy aircraft visible.

Image

Both MIGs are set to aggressive behavior for all tests. When the letter f appears at the end of the scenario name, it means that in addition to the aggressive behavior, they have Fearless added.

Image

The enemy aircraft are Phantom and Tornado.

Image

Image

Now we change the scenario so that only the more powerful aircraft is visible.

Image

Repeat the test --> aggressive setting for the MIGs and then aggressive setting + Fearless.

The recorded video shows parts of these four scenarios (attached in B08_test_scen.zip)

https://drive.google.com/file/d/14TqbXn ... sp=sharing

Question
Why don't the MiGs attack stronger enemies when they're on the Fearless setting, even though they're the only target they can see?
Why do they fly towards the VH?
Why, without the Fearless setting, do they hide under anti-aircraft cover?

Why, regardless of the setting, do they only attack weaker units?

If you change the AI ​​from 3.0 to 0 Deflaud (in scenarios with the letter f at the end) you'll see true courage.

https://drive.google.com/file/d/1YSFH2q ... sp=sharing
User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 3332
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Discussing AI questions, improvements ...

Post by randowe »

sympatyk wrote: 2025-10-18 19:20, Saturday Why do they fly towards the VH?
Aggressive stance in the game simply means that a unit will move towards the nearest enemy VH. Defensive means that it will move towards the nearest friendly VH. Aggressive/defensive stance has nothing to do with a unit acting more aggressive or less aggressive.
(There are some factors that limit the movement of AI units towards the VHs or movement in general, like entrenchment or movement method of the unit. For example from my observation, tracked units are more willing to actually move than wheeled units.)
Slava Ukraini! Image
sympatyk
Major
Major
Posts: 819
Joined: 2019-10-03 17:05, Thursday

Re: Discussing AI questions, improvements ...

Post by sympatyk »

:howdy
Something doesn't add up...
They flew to the VH (2 MiGs) only when it had the aggressive setting + Fearless, and the visible target was stronger than them. However, only with the aggressive setting - both MiGs hid under their own air defenses.
In other cases, they attacked the weaker target, despite the aggressive setting.
I repeated the tests many times.
none
Second Lieutenant
Second Lieutenant
Posts: 265
Joined: 2021-02-03 16:51, Wednesday

Re: Discussing AI questions, improvements ...

Post by none »

sympatyk wrote: 2025-10-18 20:01, Saturday However, only with the aggressive setting - both MiGs hid under their own air defenses.
As randowe said above, "aggressive" does not mean "aggressive", and has nothing to do with attacking or not. :shock :lol
The name is misleading, I was confused too in the beginning, till one day Luis explained it to me...

I short, "Aggressive/Defensive" has only to do with the unit hunting enemy Victory Hexes or defending its own. It has nothing to do with being actually aggressive or prudent. :doh

There is actually no setting for that in OG, the only setting which has something to do with attacking is the "Fearless" one, which actually means "kamikaze" (without it suicide units would never dare attack).
To get back to the issue at hand, the plane should attack enemy planes no matter what when "Fearless", and stay out of trouble when not (if the enemy units are too strong).


There are two issues (or rather shortcomings) with the OG AI as it is (AI 3.0 being apparently a little better at that than AI 2.0):
  1. There is currently no way to set if a unit should be attacking or on the contrary avoid combat at all cost. As a result I see often non-combatant units (with 0 attack) like support units rush towards the enemy and - do nothing, since they have 0 attack rating... This is silly...
  2. The AI only knows Victory Hexes. There is no way to tell it to just hunt enemy units, which makes naval battles very difficult (there are no VHs in open sea...). AI 3.0 is apparently a little better at that than AI 2.0, that's why I use it. Still, while the European theater was indeed almost exclusively land battles, OG is at a loss to simulate the Pacific theater, where half of the time the goal was to sink specific vessels (carriers), and there were no VHs to be fought about. You can not tell the AI to attack a specific unit, you can only hope it will be included in the general list of "enemy units to be killed". So, a "Sink the Bismark" scenario is impossible, the best you can hope for is "Destroy the Bismark task force".
As I said, AI 3.0 is (apparently) a little better at that than AI 2.0, more nuanced, less VH-obsessed. At least my scenarios are playable under AI 3.0, while under AI 2.0 the AI tended to do really surprising and stupid things. :dunno
Jaro
Second Lieutenant
Second Lieutenant
Posts: 20
Joined: 2019-09-23 07:23, Monday

Re: Discussing AI questions, improvements ...

Post by Jaro »

AI 3.0 - Efile GUS
Recon by helicopter.
Helicopter has a phase movement 13 and visibility = 5 plus recon attachment. Visibility good.
It moves only 2 hexes. A ground recon at the same time moves 2 times by 3 hexes each instead.
I would expect that hello will move 3,4 or 5 hexes and repeat it 2-3 times.

Code: Select all

...Pulse: 1/1  Movimg max 2

*** Recon ***
### U:139 (41, 7) Bomb. taktyczny (Mi-1) Str:10/10  Rng:1 Ent:0 Hld:0 Stance:1 Mov:13/13(T:0) Def:0 Fear:y Fuel:86/86 AmmoX2:0/0
  * Pos to move[147]  MinValPos[2]  MinValAtk[0] MaxOwnCas[2] 
--- Closer enemy: (38,4) Dist=5	 *  Closer VHE: (13,21) Dist=28
	OH set by engine at (13,21) Dist=28 ... [148] moves to scan
# Weather is 0 ( Good ) 
Different behavior of a fighter between subsequent plays of the same scenario
A fighter sometimes flees to TB to protect it and sometimes to VH (more frequently). This is a first rund of the scenario.
Strange.

Code: Select all

*** Moving U:23 to (41,21) Best V.Tot=109
or
*** Moving U:23 to (15,22) Best V.Tot=101

The scenario which can be run as standalone - name "Fulda" - https://drive.google.com/file/d/1PSsaDe ... sp=sharing
A log file
* for the one case: https://drive.google.com/file/d/1-IbLvO ... sp=sharing
* for the second case: https://drive.google.com/file/d/1t-ssIh ... sp=sharing
User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 806
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Discussing AI questions, improvements ...

Post by LuisGuzman »

I am working to analyze these issues, but debugging (even checking) air units used by the AI is very time-consuming as it can scan more than 3000 positions and evaluate many combats for a single plane in a turn, so be patient please.

As you know, the AI ponders all possible locations to move and all possible targets to attack, assigning a value made up of bonus/malus for different situations/conditions and decide to move/attack to the position with the higher net bonus.

Regarding stance (aggressive/defensive), as None posted, has nothing to do with fighting more or less (same than it was in pg2), and it is only used by AI on assigning turn objectives to the unit.

And basically 'fearless' only reduce the 'malus' assigned to the unit for taking own losses, and thus the units tends to fight more often, but if the expected loses are important, they yet penalize (adds a 'malus') when pondering positions to move and targets to attack. In addition, other factors can force the AI to restrict to attack an enemy regardless of the 'fearless' assignment.

I'll try to gather the most important factors (bonus/malus assigned) that the AI ponders for different units types and sub-phases to allow designer to understand better how to use stance, fearless and kamikaze, and then we could analyze if fearless/kamikaze are worth to modify.
:howdy
  Visit my website to get my latest tools.
User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 806
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Discussing AI questions, improvements ...

Post by LuisGuzman »

Jaro wrote: 2025-10-20 18:21, Monday AI 3.0 - Efile GUS
Recon by helicopter.
Helicopter has a phase movement 13 and visibility = 5 plus recon attachment. Visibility good.
It moves only 2 hexes. A ground recon at the same time moves 2 times by 3 hexes each instead.
I would expect that hello will move 3,4 or 5 hexes and repeat it 2-3 times.

Code: Select all

...Pulse: 1/1  Movimg max 2

*** Recon ***
### U:139 (41, 7) Bomb. taktyczny (Mi-1) Str:10/10  Rng:1 Ent:0 Hld:0 Stance:1 Mov:13/13(T:0) Def:0 Fear:y Fuel:86/86 AmmoX2:0/0
  * Pos to move[147]  MinValPos[2]  MinValAtk[0] MaxOwnCas[2] 
--- Closer enemy: (38,4) Dist=5	 *  Closer VHE: (13,21) Dist=28
	OH set by engine at (13,21) Dist=28 ... [148] moves to scan
# Weather is 0 ( Good ) 
That unit spot is 3, not 5, because AI recon phase do not consider attachments. (surely it should ?)
Then:
#1- movement 13,means it can use for recon 13 * 50% = (13+1)/7 movement points (mp)
#2 -mp to move each pulse is max(2, units spot-1) = 2
#3 -Pulses allowed are (13 / 7) = only 1 pulse (integer division here)

If attachments were used for recon sub-phase, then the unit could use 4 mp per pulse (but yet only 1 pulse)
And if pulses allowed were: (50% * total mp) / (mp per pulse) then unit could use 2 pulses (7+1)/4

But not sure how can affect other campaigns using current algorithm :huh
  Visit my website to get my latest tools.
User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 3332
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Discussing AI questions, improvements ...

Post by randowe »

All changes that will be made will only affect AI 3.0, right? So campaigns using AI 2.0 will be unaffected by any changes?
Slava Ukraini! Image
Jaro
Second Lieutenant
Second Lieutenant
Posts: 20
Joined: 2019-09-23 07:23, Monday

Re: Discussing AI questions, improvements ...

Post by Jaro »

LuisGuzman wrote: 2025-10-22 19:20, Wednesday That unit spot is 3, not 5, because AI recon phase do not consider attachments. (surely it should ?)
IMHO it should. It also should consider the FastSpeeds attachment if it doesn't.
LuisGuzman wrote: 2025-10-22 19:20, Wednesday #1- movement 13,means it can use for recon 13 * 50% = (13+1)/7 movement points (mp)
#2 -mp to move each pulse is max(2, units spot-1) = 2
#3 -Pulses allowed are (13 / 7) = only 1 pulse (integer division here)
Don't understand the pulses allowed calculation...
if 7mp is allowed and 2 mp per pulse it could technically move 3 times: 2mp, 2mp and 1 mp. So why do you calculate 13 / 7?
LuisGuzman wrote: 2025-10-22 19:20, Wednesday If attachments were used for recon sub-phase, then the unit could use 4 mp per pulse (but yet only 1 pulse)
And if pulses allowed were: (50% * total mp) / (mp per pulse) then unit could use 2 pulses (7+1)/4
in general looks promising.
The question is if it will move 4mp and then 3 mp (7 is max mp) or move twice 4mp?

What about the remaining mp?
LuisGuzman wrote: 2025-10-22 19:20, Wednesday But not sure how can affect other campaigns using current algorithm :huh
We are talking about AI 3.0 dev (development?). That means it can change in the future and designers should be aware if this.

Does the Recon class use the same algorithm?
What about other classes with a phase movement including leader 24 - Reconnaissance Movement : Phased movement?

Regarding debugging AI planes - maybe I can create an example scenario on a smaller map?
none
Second Lieutenant
Second Lieutenant
Posts: 265
Joined: 2021-02-03 16:51, Wednesday

Re: Discussing AI questions, improvements ...

Post by none »

LuisGuzman wrote: 2025-10-22 17:13, Wednesday we could analyze if fearless/kamikaze are worth to modify.
If you decide to modify it, the best way would be to add another "malus reduction" level, like this:
  • "Standard" (standard behavior, as it is now) = AI is prudent
  • "Daring" (new!) = AI is less prudent than in "Standard", but more than in "Fearless". To make the AI do something even when the player is slightly stronger and its tactics should be to drown the player under its superior numbers. Or for historically particularly aggressive units.
  • "Fearless" (as it is now) = kamikaze setting.
It would have the added benefit that it wouldn't change existing scenarios. :dunno
User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 806
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Discussing AI questions, improvements ...

Post by LuisGuzman »

What about the remaining mp?
50% is used to allow the recon to move later to a safer position when it finishes in a danger position
We are talking about AI 3.0 dev (development?). That means it can change in the future and designers should be aware if this.
That's right, as far as nobody used (or is using) AI 3,0 for any development
Does the Recon class use the same algorithm?
What about other classes with a phase movement including leader 24 - Reconnaissance Movement : Phased movement?
Yes, this is a common to any unit having phased movement for any reason.
But some units are excluded regardless having phased movement:
  • UCLASS_ARTILLERY or UCLASS_AIR_DEFENSE
  • Units mounted on no-movement transport
  • Units set as 'Anchored'
  • only if AI 3.0
    land (not at sea) unit with spot less than 3
    units with strength less than 60%
Regarding debugging AI planes - maybe I can create an example scenario on a smaller map?
That would be great, specially using fewer units for AI.
If you decide to modify it, the best way would be to add another "malus reduction" level, like this:
"Standard" (standard behavior, as it is now) = AI is prudent
"Daring" (new!) = AI is less prudent than in "Standard", but more than in "Fearless". To make the AI do something even when the player is slightly stronger and its tactics should be to drown the player under its superior numbers. Or for historically particularly aggressive units.
"Fearless" (as it is now) = kamikaze setting.
Sorry, but:
* Fearless is not the same that Kamikaze
* Daring seems to be, more or less, the same that current fearless

I'll post the differences later.
  Visit my website to get my latest tools.
none
Second Lieutenant
Second Lieutenant
Posts: 265
Joined: 2021-02-03 16:51, Wednesday

Re: Discussing AI questions, improvements ...

Post by none »

LuisGuzman wrote: 2025-10-23 06:39, Thursday * Fearless is not the same that Kamikaze
Sure, but people use it to help kamikaze units attack against overwhelming odds.
The "Kamikaze" E-File special only dictates that a unit will die after spending all its ammunition/fuel, doesn't it?
LuisGuzman wrote: 2025-10-23 06:39, Thursday * Daring seems to be, more or less, the same that current fearless
:huh My point was to have 3 settings: Default (prudent), Fearless (suicidal), and one setting in-between those extremes to use for very aggressive, but not totally suicidal units.

Now I might indeed have misunderstood how reckless the current "Fearless" setting actually is, and it might indeed correspond to that median "Daring" setting I was talking about.
In this case we would need the really fearless, almost suicidal setting for units which will attack no matter what the outcome might be. It happens rarely, but it does happen...
User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 806
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Discussing AI questions, improvements ...

Post by LuisGuzman »

randowe wrote: 2025-10-22 19:35, Wednesday All changes that will be made will only affect AI 3.0, right? So campaigns using AI 2.0 will be unaffected by any changes?
Actually, I am thinking on gathering all core used by AI 3-0 to a new set of files as AI 3.1
While digging the code to find all instances of 'kamikaze', 'fearless' and moving air units, I realized that it is difficult to be sure that changing anything won't affect current campaigns, because in addition to AI 3.0 new functions, it also relies on small changes in other code used by the rest of AI versions.
Before freezing the code I had in my mind all details, but after this long time with no contact with the AI code (which is somehow complex) it would take me too much time to analyze where/how to change things without affecting old behavior

All the AI versions were done adding conditional changes/additions to the existing code, and now I am sure that it is time to isolate the code for the last AI version, keeping untouched the existing ones. It can take me a bit more time, but it will pay off later.

Thus, I'll release a new version adding what Sympatyk asked (increase allowed proto time frame) and fixing the behavior of recon units, and then I'll start working on the new AI 3.1

:howdy
  Visit my website to get my latest tools.
sympatyk
Major
Major
Posts: 819
Joined: 2019-10-03 17:05, Thursday

Re: Discussing AI questions, improvements ...

Post by sympatyk »

:howdy

It looks very promising.
Thank you, Luis. :notworthy
Dimitris GR
Sergeant Major
Sergeant Major
Posts: 1051
Joined: 2020-12-11 10:03, Friday
Location: Corinth

Re: Discussing AI questions, improvements ...

Post by Dimitris GR »

I don't know if its possible, AI ATY should shoots first, then the inf or tanks attack a target. It will be more realistic and sure more challenging.
Billions for Ukraine, who cares about Palestine? Israeli historian and author Ilan Pappe about genocide.....
sympatyk
Major
Major
Posts: 819
Joined: 2019-10-03 17:05, Thursday

Re: Discussing AI questions, improvements ...

Post by sympatyk »

:howdy
Hi Luis
Let's consider a device like radar, or rather entire radar-based systems – we're talking about the times far after World War II, the present day.
Let's apply this to a modern campaign in OG.
Rain comes and the radars (guidance systems) stop seeing – they get a penalty.
The scenario designer needs the ability to assign a feature to individual units that, regardless of the weather, won't limit the unit's vision (radar, modern reconnaissance and early warning aircraft, fighters, command centers, etc.).
I kindly ask you to take this into consideration.
none
Second Lieutenant
Second Lieutenant
Posts: 265
Joined: 2021-02-03 16:51, Wednesday

Re: Discussing AI questions, improvements ...

Post by none »

sympatyk wrote: 2025-10-27 21:48, Monday radar
I wanted that too, but now the code is frozen and it won't happen. :dunno
(Besides I guess it's a huge task modifying the visibility rules to simulate radar in a realistic way)

In my updated E-File I simulate radar by giving radar-using units a bigger spotting range and the "All Weather" special. It is far from perfect, has some minor silly side effects, but apart from that it works rather well.

What bothers me most is that radar (and primitive WWII ones even more!) only tells you "there is something in this direction and that distance", not exactly what it is, how strong it is and what it is doing.
Simulating a realistic radar would require having two spotting ranges: The classic one as it is now, and the "radar" spotting range, in which you only see generic blips, with an error level (like, 10% chance to have 1-2 "phantom" blips appear, 2% chance an existing unit doesn't show up that turn. That error level should be modifiable in equip.cfg, because it would be quite different for WWII and for modern kit). Of course then you'll need to simulate radar jammers (locally increasing the error level), this rabbit hole is very deep... :lol

But we're going OT, this thread is about AI...
Jaro
Second Lieutenant
Second Lieutenant
Posts: 20
Joined: 2019-09-23 07:23, Monday

Re: Discussing AI questions, improvements ...

Post by Jaro »

LuisGuzman wrote: 2025-10-26 12:17, Sunday ... and fixing the behavior of recon units ...
Please don't forget leaders - they can also increase visibility or movement range.

I also thought about a real visibility, dependent on a weather condition, instead of the unit visibility (not sure if it is a part of the current logic).
User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 806
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Discussing AI questions, improvements ...

Post by LuisGuzman »

Dimitris GR wrote: 2025-10-26 14:09, Sunday I don't know if its possible, AI ATY should shoots first, then the inf or tanks attack a target. It will be more realistic and sure more challenging.
But it is done that way already :huh

Current sequence for AI is:
  • AI_ScanRecons();
    // use recons and units with recon leader to spot as much as possible
  • AI_ScanHQ();
    // check if AI has units at HQ needing to deploy
  • AI_ScanInitialFire();
    // scan ATY, AT, FORT, AA(AD+FLAK) to attack before moving
  • AI_ScanAirEscort();
    // setup Air Escort available
  • AI_ScanMovingUnits();
    // moving units not embarked
  • AI_ScanAirEscort();
    // setup Air Escort available for next phase after moving units
  • AI_ScanAirEmbarked();
    // moving units air embarked (not paratroopers)
  • AI_ScanPurchase();
    // Purchase phase
  • AI_ScanDangerIH();
    // check IH in danger to
  • AI_ScanAirEscort();
    // setup Air Escort available for next phase
  • AI_ScanParaEmbarked();
    // scan moving paratroopers
  • AI_ScanRemainingUnits();
    // second units' movement phase
  Visit my website to get my latest tools.
sympatyk
Major
Major
Posts: 819
Joined: 2019-10-03 17:05, Thursday

Re: Discussing AI questions, improvements ...

Post by sympatyk »

none wrote: 2025-10-28 07:20, Tuesday
sympatyk wrote: 2025-10-27 21:48, Monday radar
I wanted that too, but now the code is frozen and it won't happen. :dunno
(Besides I guess it's a huge task modifying the visibility rules to simulate radar in a realistic way)

In my updated E-File I simulate radar by giving radar-using units a bigger spotting range and the "All Weather" special. It is far from perfect, has some minor silly side effects, but apart from that it works rather well.

What bothers me most is that radar (and primitive WWII ones even more!) only tells you "there is something in this direction and that distance", not exactly what it is, how strong it is and what it is doing.
Simulating a realistic radar would require having two spotting ranges: The classic one as it is now, and the "radar" spotting range, in which you only see generic blips, with an error level (like, 10% chance to have 1-2 "phantom" blips appear, 2% chance an existing unit doesn't show up that turn. That error level should be modifiable in equip.cfg, because it would be quite different for WWII and for modern kit). Of course then you'll need to simulate radar jammers (locally increasing the error level), this rabbit hole is very deep... :lol

But we're going OT, this thread is about AI...
I probably misspelled it (not what I meant).

The word "radar" is just an example -- for map vision.
In the game, you can use the additional trait W - "Weather without affecting combat value."
I'm just asking for an additional trait marked, for example, w (lowercase) - "Weather without affecting vision value" --> so that units assigned this trait don't lose their vision value when the weather changes --> and nothing more (no special radars).
none
Second Lieutenant
Second Lieutenant
Posts: 265
Joined: 2021-02-03 16:51, Wednesday

Re: Discussing AI questions, improvements ...

Post by none »

:doh :o
Jaro
Second Lieutenant
Second Lieutenant
Posts: 20
Joined: 2019-09-23 07:23, Monday

Re: Discussing AI questions, improvements ...

Post by Jaro »

LuisGuzman wrote: 2025-10-28 08:45, Tuesday
Dimitris GR wrote: 2025-10-26 14:09, Sunday I don't know if its possible, AI ATY should shoots first, then the inf or tanks attack a target. It will be more realistic and sure more challenging.
But it is done that way already :huh
Artillery that can fire after move or with a phase movement moves and fire after infantry, tanks...
User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 806
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Discussing AI questions, improvements ...

Post by LuisGuzman »

Jaro wrote: 2025-10-28 21:16, Tuesday
LuisGuzman wrote: 2025-10-28 08:45, Tuesday
Dimitris GR wrote: 2025-10-26 14:09, Sunday I don't know if its possible, AI ATY should shoots first, then the inf or tanks attack a target. It will be more realistic and sure more challenging.
But it is done that way already :huh
Artillery that can fire after move or with a phase movement moves and fire after infantry, tanks...
Are you sure, these unis should fire before moving, instead of wait for others units having a chance to spot more and perhaps better targets ?
  Visit my website to get my latest tools.
Jaro
Second Lieutenant
Second Lieutenant
Posts: 20
Joined: 2019-09-23 07:23, Monday

Re: Discussing AI questions, improvements ...

Post by Jaro »

Good question. I leave it to be answered by developers more familiar with AI.
When I play the game scouting is done by recon and other dedicated units for this task. Then artylery fires including arty with phased movement.
But I know that AI scouting is not so effective so maybe it can be as it is.
sympatyk
Major
Major
Posts: 819
Joined: 2019-10-03 17:05, Thursday

Re: Discussing AI questions, improvements ...

Post by sympatyk »

:howdy
Al Purchases
The computer usually buys the cheapest, identical units (if it has the money).
Can it be forced to buy different units?
For example, if it bought unit x (and has the funds available), it can no longer buy unit x if other units are available for purchase.

How does Al decide whether to replenish the units to its base level or buy new ones? --> what is the priority?
Post Reply