Author Topic: Some AI improvements in svn - please test is possible  (Read 2212 times)

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Some AI improvements in svn - please test is possible
« on: 29 April 2011, 23:59:16 »
The following AI changes are in svn as we prepare for a 3.5.1 release we would ask all svn able bodied people to test these out:

- AI now selects units to repair which they have another unit that has the ability right now to repair it (this caused the ai to NOT repair important units and waste time ignoring repair altogether at some points in the game). Example: Persian worker got damaged by an enemy attacker, but no unit currently had the ability to heal the worker, so other units (like castle etc) were neglected for a long time (in some cases indefinitely).

- AI enhancements, now units that harvest AND attack will be more wise when choosing to attack, (think persian) since they need to harvest more than they need to attack when their harvester count is very low. (or they run out of resources and cannot build more units)

- AI Units now place higher priority on repairing 'castle' style units when looking for something to repair.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Some AI improvements in svn - please test is possible
« Reply #1 on: 30 April 2011, 06:55:20 »
- AI Units now place higher priority on repairing 'castle' style units when looking for something to repair.
Just out of curiosity, how does the AI decide what building is the "main" building?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Some AI improvements in svn - please test is possible
« Reply #2 on: 30 April 2011, 15:46:52 »
CPU sometimes  fails to repair buildings. In a r2178 test game I played today, a Magic Ultra CPUgot attacked and almost had its main building destroyed. It had only 63 of 8000 HP left, but even ~10 minutes after the building was last attacked, not a single initiate was sent to repair it. New initiates were produced and sent to harvest, or to scout/attack, or mutated to battle mages.

In the same game, an Egyptian Ultra CPU failed to repair its sphinxes. This was after they already lost their only pyramid, but they still had food + workers + some other buildings, though.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Some AI improvements in svn - please test is possible
« Reply #3 on: 1 May 2011, 07:29:07 »
Ok try the latest svn, found some long standing bugs where units that has a cellmap starting with 0 never got repaired by the AI!

Omega, a 'castle' style unit is determined if a) the unit can store at least one resource and b) the unit can build or produce workers

Thanks

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Some AI improvements in svn - please test is possible
« Reply #4 on: 1 May 2011, 22:53:05 »
Omega, a 'castle' style unit is determined if a) the unit can store at least one resource and b) the unit can build or produce workers

... which brings up the question how workers are defined and whether the technodrome is a castle (since it produces units which can harvest gold and stores wood)
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Some AI improvements in svn - please test is possible
« Reply #5 on: 2 May 2011, 02:24:06 »
... which brings up the question how workers are defined
If I recall, it was the occurrence of a harvest skill, though it might be build... It was mentioned a looong time ago.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

sojourner

  • Guest
Re: Some AI improvements in svn - please test is possible
« Reply #6 on: 3 May 2011, 21:25:32 »
my observations:
* AI does seem to repair buildings more often... however, in AI vs AI scenarios what I have seen is, when it is time to repair a castle, it is a sign that the game is almost over...

and though it is not related to the improvements you have specified, looks like once an attack starts, some units become stationary because there is no one else in the range of their sight once they kill their nearest target... So some characters are dozing while the rest die :) It is weird since they can respond to an attack at the opposite end of the map to start a massive attack.
screenshot:
http://ubuntuone.com/p/qc0/

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: Some AI improvements in svn - please test is possible
« Reply #7 on: 4 May 2011, 04:00:31 »
my observations:
* AI does seem to repair buildings more often... however, in AI vs AI scenarios what I have seen is, when it is time to repair a castle, it is a sign that the game is almost over...

and though it is not related to the improvements you have specified, looks like once an attack starts, some units become stationary because there is no one else in the range of their sight once they kill their nearest target... So some characters are dozing while the rest die :) It is weird since they can respond to an attack at the opposite end of the map to start a massive attack.
screenshot:
http://ubuntuone.com/p/qc0/

I've seen this as well. From my observations this seems to happen often after the attacking army sustains major causalities. The attacking army becomes passive and only individuals that can see an enemy will attack not as an army as a  whole. Then an cpu attacks with an army it is usually after they achieve a minimum amount of units, so if deaths cause their population to fall below the minimum, and he no longer sees the enemy, the cpu will stop attacking and call back his units one by one (which is also strange). During this time is when the glitch sojourner mentioned above happens. This is from what i understand from observing cpu battles for a while.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

sojourner

  • Guest
Re: Some AI improvements in svn - please test is possible
« Reply #8 on: 4 May 2011, 16:31:56 »
if deaths cause their population to fall below the minimum, and he no longer sees the enemy, the cpu will stop attacking and call back his units one by one (which is also strange). During this time is when the glitch sojourner mentioned above happens. This is from what i understand from observing cpu battles for a while.

That is definitely one instance where it happens, but even when there are plenty of units available, once an attack commences it appears like the units are not controlled anymore, they attack when something comes close or there is another alarm from a fresh(er) attack.