Freyr and AI/AIP's -1 reply

Please wait...

rifraf

Avid Gamer, Novice Modder

50 XP

24th July 2003

0 Uploads

180 Posts

0 Threads

#1 6 years ago

I have the upgrade project vanilla ultimate installed and am curious about the AI. You have it set up as easy, pushover and merciless I believe. So the easiest setting uses a2.aggressive, a2.defensive, a2.exploration, and a2.hardaggressive.

The hardest setting uses the same files with "hard" in from of their names. What files does the middle difficulty setting use? Also, do we know what the "modified" choices of these same AIP's in the folder mean and are they used? I don't play on hard but I was changing some of the settings in the easy or standard AIP's and was wondering about this.




Freyr VIP Member

A2Files Staff

46,875 XP

6th February 2005

11 Uploads

4,275 Posts

0 Threads

#2 6 years ago

Pushover, Easy and Merciless are just different titles for Easy, Medium and Hard, respectively. I find that naming the lowest difficulty level "pushover" encourages people to play my medium AI, "easy". Since people can't brag about winning against a AI handicapped to the point of being crippled on a difficulty level called "easy", this encourages people to take on Merciless, which doesn't cheat and plays with the same limitations as the player. That's the only significance of the different names for the AI's.

To the best of my knowledge, the AI uses the same set of AIP's for the lowest two difficulty settings. The differences between the two are definable through the options in RTS_CFG.H

As far as I am aware, the "modified" AIP's are completely unused and redundant.




rifraf

Avid Gamer, Novice Modder

50 XP

24th July 2003

0 Uploads

180 Posts

0 Threads

#3 6 years ago

I figured the titles were scalable with the originals and why I asked was because I was changing some of the values like mining modifier, cost handicap etc..to make them even with me giving the AI no benefits or myself and level the playing field without playing on hard. I wasn't sure if the modified ones I needed to worry about though.

I'm also using your klingon AI as a guide to adjust some of the AI paramaters to be more difficult but not merciless level. :)




Freyr VIP Member

A2Files Staff

46,875 XP

6th February 2005

11 Uploads

4,275 Posts

0 Threads

#4 6 years ago

rifraf;5623358I figured the titles were scalable with the originals and why I asked was because I was changing some of the values like mining modifier, cost handicap etc..to make them even with me giving the AI no benefits or myself and level the playing field without playing on hard. I wasn't sure if the modified ones I needed to worry about though.

I'm also using your klingon AI as a guide to adjust some of the AI paramaters to be more difficult but not merciless level. :)

Merciless level is just the AI playing on a completely even playing field without any handicaps and a workable build list. =p

In my AI's they start off at Pushover with a 3x handicap, Easy is a 2x handicap and Merciless is the AI playing in the same environment as you. To beat it, all you have to do is learn how to play a bit better, Merciless is actually quite easy to beat most of the time since it can't adjust to what your doing.

The substantive problem with the good old primitive Merciless AI's is that every defensive structure in the game has an intrinsic value of 0.5 which makes the AI underestimate their power by half, which is why the AI runs fleets into walls of turrets with an enthusiasm unseen since Lemmings discovered cliffs. I fixed that in the next version, but to be honest although I did finish it I haven't tidied it up to the point i'm happy with releasing it publicly and given the amount of time it's not getting spent on it the chances of it getting released at this stage are pretty minute.

l will have to split off the AI bits at some point just to hear the screams about my later generation AI's, namely the Merciless successors Ruthless and Malevolent.




rifraf

Avid Gamer, Novice Modder

50 XP

24th July 2003

0 Uploads

180 Posts

0 Threads

#5 6 years ago

Seriously? I assumed your merciless was like some demon AI and never took a minute to really look at it. Feel kind of silly now. :) This seems obvious but you never know, if I just change the intrinsic value of defensive structures to higher values using merciless would that work?




Freyr VIP Member

A2Files Staff

46,875 XP

6th February 2005

11 Uploads

4,275 Posts

0 Threads

#6 6 years ago
rifraf;5623531Seriously? I assumed your merciless was like some demon AI and never took a minute to really look at it. Feel kind of silly now. :) This seems obvious but you never know, if I just change the intrinsic value of defensive structures to higher values using merciless would that work?

Well, some people say it's demonic and admittedly it wasn't so much released as it escaped after it killed the beta testers so many times they refused to play it again.

Personally, I don't find it that hard to beat. Then again, I programmed it to play as I did. To quote the readme, Merciless is "a crude, feeble, slow, stupid and rudimentary approximation of how I would play the level if you were fighting against me."

Realistically, I could never program an AI that could beat me without cheating. However, while it falls quite a long way short of being able to beat me it can occasionally give me a run for my money and is probably quite dangerous to people who don't know what it's doing.

And yeah, the appropriate figures for any defensive structure in the game (in my opinion!) is an intrinsic value of 0.0, and an attack power of 1.0. I got that the wrong way around in my last post.

Basically, the AI treats the entire map as a series of cells about 800 game units across. It looks at the number of attack base goals it's allowed to calculate. ie:-

int MAX_EXEC_ATTACK_BASE = 3;

As you can see, the stock AI calculates the three most heavily defended grids and then won't consider attacking the fourth, even if it is full of undefended superweapons and mining freighters.

The first thing you need to do is set this attack base goal to something a lot higher. Merciless considers the top twenty five goals and can attack any of them, so if goals 1,2 & 3 are heavily defended it will look at any of the top 25 instead of doing a kamikaze on one of the first three.

Basically, a goal will only be executed if ships with enough force have been committed to the goal. The amount of force committed to a goal is the total maximum shield strength of each craft multiplied by the attack_power of the craft. This force amount must exceed the same computation of enemy ships in the cell times the max_matching_force_ratio. For example, if the ratio is set to 0.8, then only goals in which the AI can match 80% of the enemy threat will be executed.

The problem is that the stock AI's have an intrinsic value of 1.0 set on everything, so it thinks a turret is as important a target as a advanced shipyard. Secondly, with an attack_power of 0.5 on the turrets & starbases the AI seriously messes up it's calculation of how many ships are required to kill things. If you set the attack_power to 1.0 then it'll calculate the firepower it needs to kill you much better than it is doing.




rifraf

Avid Gamer, Novice Modder

50 XP

24th July 2003

0 Uploads

180 Posts

0 Threads

#7 6 years ago

Before I reinstalled i had all borg to have 0 shieldrate, 0 shieldhealth, no shieldgeneratorhitpoints and i deleted the shieldgeneratorhardpoints line and just beefed up their hull and remaining hitpoints. Does this mean it won't figure the values correctly because the borg won't have shields now?

Or would having no shields but a higher attack power kind of even in out?




Freyr VIP Member

A2Files Staff

46,875 XP

6th February 2005

11 Uploads

4,275 Posts

0 Threads

#8 6 years ago

To be honest, I don't know. I haven't ever tried doing a race completely without shields.

On a pure math level however, zero multiplied by any number is still zero, so I would imagine that the AI will make a complete mess of the force matching.




rifraf

Avid Gamer, Novice Modder

50 XP

24th July 2003

0 Uploads

180 Posts

0 Threads

#9 6 years ago

Figures. I've been resolute all these years about making the borg have no shields but at every turn it just seems that I'll never get away from it. I'll have to keep experimenting with the intrinsic/attack values of the borg and see if it can be configured in some reasonable way.




Dominus_Noctis

GF makes me horny

50 XP

2nd October 2010

0 Uploads

89 Posts

0 Threads

#10 6 years ago

Stock Armada II calculates attackPower via shield hitpoints only, so if your units have no shield hitpoints, they will screw all sorts of things up.

Probably intrinsicValue and attackPower should be set far above 0 or 1 if you want to cause your AI to choose targets intelligently. IntrinsicValue is just used to calculate where the AI should send forces while attackPower is used to determine which units to attack in that area, i.e.: http://guide.fleetops.net/guide/modding/fo-odf-commands/gameobject/craft#intrinsicValue

Dr. Davis' commenting also indicates that force matching values (i.e. min_matching_force_ratio and max_matching_force_ratio) are non functional, but also that only shield strength is taken into account for Attack Goal, Defend Goal and Attack Base Goals. How valid his original commenting is would require extensive testing, but he's a nice guy who takes pride in his work, so I assume he commented his code well. Bear in mind that when changing many values in the AIPs, if you play online with someone else who uses the same modifications, you can generate a good load of out of sync issues.