AI Standard [Proposal]

Started by DarkZeros, March 09, 2010, 03:57:17 PM

Previous topic - Next topic

DarkZeros

Today I had an idea (maybe some of you already think about this)
Make a config file in the main dir of SC2, to configure some things on the AI. So, anyone can easily edit its AI, or with a loader, change values there BEFORE the game starts.

The idea is to make this config file standard, so all the AI have the same one.

As a test I have made a "Starcrack v6.1.1 configurable" version. If the config file does not exist it will load as the "standar v6.1.1" version. Be carefull because if it exists, it must be correct or the game will not load.
All included in the file, just extract.

turdburgler

I'll back use of something like this. The exact specification has to be debated.

godspiral

That is excellent.

I love how it shows how much it is cheating as well.

Its actually not too hard to edit or screw up
the format is
property = setting ;

You should only edit the "setting" part.
always leave the ";" afterwards
"//" means comment rest of line
any setting that says "false" has the only valid alternative "true"
if a setting is a number, only change it to other numbers


It looks like this mod breaks replays though.  :(

turdburgler

Quote from: godspiral on March 09, 2010, 04:57:47 PM
That is excellent.

I love how it shows how much it is cheating as well.

Its actually not too hard to edit or screw up
the format is
property = setting ;

You should only edit the "setting" part.
always leave the ";" afterwards
"//" means comment rest of line
any setting that says "false" has the only valid alternative "true"
if a setting is a number, only change it to other numbers


It looks like this mod breaks replays though.  :(

What doesn't break replays  :-\

godspiral

sorry about the bad report regarding breaking replays.  I had unrelated extra file issues.

Quote from: turdburgler on March 09, 2010, 04:55:25 PM
I'll back use of something like this. The exact specification has to be debated.

DarkZeros format is pretty good.  Maybe a mini-primer in heading.  Using pure galaxy code makes it easy on AI designers for providing extra customizability

Flame02

What is the exact meaning of: AI_HarvestBonus?

I've tried setting it to 0.1 and -0.9, without noticing any significant change?

LRD

Quote from: Flame02 on March 13, 2010, 05:51:34 AM
What is the exact meaning of: AI_HarvestBonus?

I've tried setting it to 0.1 and -0.9, without noticing any significant change?

It's the AI Mineral/Gas Harvest BONUS.

For example: 1.0 means 100% (no bonus) and 1.5 means 150% (a bonus of 50%).

Flame02

Quote from: LRD on March 13, 2010, 08:56:32 AM
Quote from: Flame02 on March 13, 2010, 05:51:34 AM
What is the exact meaning of: AI_HarvestBonus?

I've tried setting it to 0.1 and -0.9, without noticing any significant change?

It's the AI Mineral/Gas Harvest BONUS.

For example: 1.0 means 100% (no bonus) and 1.5 means 150% (a bonus of 50%).

Does that mean that at 0.0 the AI can harvest all he likes, but he is not getting any minerals/gas, or does values below 1.0 not have any effect?

Mr42

Quote from: Flame02 on March 13, 2010, 10:20:38 AM
Does that mean that at 0.0 the AI can harvest all he likes, but he is not getting any minerals/gas, or does values below 1.0 not have any effect?

In Warcraft3, the difference between easy and medium AI is that, easy has 50% income penalty, thus I expect that you can set a handicap. Not sure, if 0.0 would be a valid value, though.

godspiral

Quote from: Flame02 on March 13, 2010, 10:20:38 AM
Quote from: LRD on March 13, 2010, 08:56:32 AM
Quote from: Flame02 on March 13, 2010, 05:51:34 AM
What is the exact meaning of: AI_HarvestBonus?

I've tried setting it to 0.1 and -0.9, without noticing any significant change?

It's the AI Mineral/Gas Harvest BONUS.

For example: 1.0 means 100% (no bonus) and 1.5 means 150% (a bonus of 50%).

Does that mean that at 0.0 the AI can harvest all he likes, but he is not getting any minerals/gas, or does values below 1.0 not have any effect?

Universe may implode at 0.0 (or get no minerals), but below 1.0 just makes the AI easier than standard

Flame02

There is something that does not add up:

AI_Config.galaxy:
const fixed AI_HarvestBonus = 0.01;

Map:
(4) - AI - Metalopolis (1x).s2ma
(playing Terran, againt 3 other terrans)


1. scenario: "I send a SCV to an opponents camp and watch"

In 3 min. he builds 2 supply depots, 1 refinery and 1 barracks, costing 425 minerals.

He probably also produces some SCVs, but I'm not counting.

He must harvest at least 425-50 = 375 minerals to do this.


2. scenario: "I hardvest minerals as much as possible"

In 3 min. I produce 10 extra SCV and builds a supply depot costing 600 minerals.
After this I have 750 minerals left, which is 700 more than when I started.

All in all, I have harvested: 600 + 700 = 1300 minerals.


My opponent has harvested at least 1/3 of what I have (having produced a unknown number of SCVs, and having SCVs occupied building 3 more buildings than I did, this number could be must higher.)

At a setting of: AI_HarvestBonus = 0.01, he should have been able to harvest 15 minerals! That is obviously not the case!

godspiral

In replays, you can see income tab, with workers and minerals per second (times 60).

If I were to guess what might be happening in your setting is that the AI doesn't get fractional minerals.  And/or the game has a hard minimum on gather rates.  Normal gather rate is 5 minerals per trip.  I don't know if cheating/easy settings makes workers get (say on 2x cheat setting) 10 minerals per trip, or if it gathers 5 twice as fast.