.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   Reasons why the AI runs out of resources (http://forum.shrapnelgames.com/showthread.php?t=1333)

HreDaak January 11th, 2001 05:09 PM

Re: Reasons why the AI runs out of resources
 
I have also encountered this problem and i have been doing some tests with the AI_PlanetTypes file.

All the other lines in this file work just fine but the Mineral value, Organics value, Radioactives value lines work only partially IMO.

An example:

Mineral value := 110
Organics value := 100
Radioactives value := 100

This works as it is supposed i guess, because the AI "always" will reject this if the Mineral value on planet is not 110 or more. You could adjust this as long as you dont change the Organics value or Radioactives value from 100 and will keep the Mineral value above 100. Same thing works if you set the Radioactives value above 100 and the mineral value and organic value to 100 (as it will work with organics value too). I have made my own Version of this AI_PlanetTypes file which eliminates most of the problems with AI making a research compound or something else on a planet with mineral value 100+. This file also corrects the problem of AI making a mining colony on a planet with mineral value less than 100. I could upload it to the
mods thread or here if there is someone interested in it...

[This message has been edited by HreDaak (edited 11 January 2001).]

Eisenhans January 11th, 2001 05:44 PM

Re: Reasons why the AI runs out of resources
 
HreDaak!

It's great you made those improvements. Just - I seem to be too stupid to get your exact meaning! You write "it works as it is supposed to...". Could you explain to me how it is supposed to work and why this will fix the AI being too stupid to use planets in a sensible way? I'd be very interested in improving my games that way too. Thanks in advance.

HreDaak January 11th, 2001 07:33 PM

Re: Reasons why the AI runs out of resources
 
Oh, i'm sorry if my Posts dont make much sense, but it's a bit hard to write these things in english http://www.shrapnelgames.com/ubb/images/icons/icon9.gif.

But here goes...

I think it is supposed to work this way:
You just keep the other two values in 100
and change third value to whatever number you want. If the third value on the planet is less than the value stated in the AI_PlanetTypes.txt file the AI will not choose this colony type.

How it works now? (Based on my observations)
If you put this third value lower than 100 it does not work. It either rejects all planets or accepts them all, i dont remember
which way it was in this case. If you change the other two values to something else than 100 it also gets screwed (regardless what the third value is).

Huh.. i hardly understand myself what i've written here http://www.shrapnelgames.com/ubb/images/icons/icon9.gif. I'll try to give few examples...

Example1:

Mineral value := 130
Organics value := 100
Radioactives value := 100

Now let's just forget everything else and concentrate what AI decides based on these values.

AI now has a planet with values:

Mineral 140%
Organics 105%
Radioactives 147%

This planet it will accept because the mineral percentage is above 130%, it just simply ignores the organics and radioactives value (propably because they are set to 100).

Now AI has this type planet...

Mineral 125%
Organics 5%
Radioactives 133%

This planet the AI will ignore because it's
Mineral percentage is less than 130%. Both the Organics and radioactives values are ignored.

Example2:

AI is now looking a planet with these values.

Mineral value := 100
Organics value := 110
Radioactives value := 100

It has this type planet under consideration.

Minerals 7%
Organics 115%
Radioactives 77%

It will accept this planet because the organics percentage is above 110%. It ignores the other two values (reasons same as in Example1.)

Notice the pattern...

Problems start if you change the other two values to something else than 100 or the third value to less than 100.

Forexample this does not work:

Mineral value := 70
Organics value := 100
Radioactives value := 100

Whatever the values on the planet are it rejects or accepts all planets, i dont remember which way it was, but surely this is not the way it was supposed to work...
or who am i to say how it was supposed to work, dunno...

This is also complete jibberish to to the AI:

Mineral value := 100
Organics value := 90
Radioactives value := 90

It rejects or accepts all planets regardless of their values...

You should be on the safe side as long as you keep the other two values to 100 and the third value above 100. In all the other cases it seems not to work, although this could use some more testing.

Why will it fix?

Umm, do you mean that modified AI file or something else?

You can test these value things yourself also: Just create your own modified Default_AI_PlanetTypes.txt file and put it
in data folder (remember to save the original one). It only needs 2 entries:

AI State := Exploration, Infrastructure, Prepare for Attack, Attack, Secure Holdings After Attack, Incursion, Prepare for Defense, Defend (Short Term), Defend (Long Term)
Planet Type := Mining Colony
Max Per System := 100
Percent of Colonies := 100
Minimum Planet Size for Type := Tiny
Mineral Value := 0
Organics Value := 0
Radioactives Value := 0
Maximum Total in Empire := 0

AI State := Exploration, Infrastructure, Prepare for Attack, Attack, Secure Holdings After Attack, Incursion, Prepare for Defense, Defend (Short Term), Defend (Long Term)
Planet Type := Research Compound
Max Per System := 100
Percent of Colonies := 100
Minimum Planet Size for Type := Tiny
Mineral Value := 0
Organics Value := 0
Radioactives Value := 0
Maximum Total in Empire := 0

Just change those Mineral, Organics, Radioactives Values and see how the AI reacts
. Use Hot Seat with two empires, the other one being AI controlled. Press F2 and choose players, from there you can choose which race is run by AI, just dont put both on AI http://www.shrapnelgames.com/ubb/ima...ons/icon12.gif.

Any info on this subject is welcome...

HreDaak January 11th, 2001 09:35 PM

Re: Reasons why the AI runs out of resources
 
New info on the subject...

Mineral Value, Organics Value, Radioactives Value:
The approximate percentage value a planet must have to be selected
as this planet type. These are used as a ratio in relation to each other.
If this is zero, then this is not used.

These are used as a ratio in relation to each other. I first thought this meant that the M/R/O values were used as relation to each other. Apparently this is not true but the M/R/O values are used in relation to this approximate percentage value.

This approximate percentage value of a planet is most likely 100%. I suppose it is
hard coded and cannot be changed. Although there is Plr Planet Value Medium Percent
in settings.txt file. Changing that number from 100 seems to have no effect.

So basically you are limited to values that are above 100. I was in error in my previous post by saying that they cant be used together. I've tested this and you indeed can
set them together.

Example:

Mineral value := 110 (1.1*100%)=110%
Organics value := 105 (1.05*100%)=105%
Radioactive value := 115 (1.15*100%)=115%

So any planet that has all three values above those percentages will be accepted by the AI.
Also any number below 101 in these values seems to have the same effect as 0.
Also values above 150 are not feasible as there are no planets with percentages over 150% (in basic settings).

Example:

Mineral value := 57 (0*100%)=0%
Organics value := 104 (1.04*100%)=104%
Radioactives value := 110 (1.10*100%)=110%

So any planet that has organics percentage of 104% or above and radioactives percentage 110% or above will be accepted. All planets have mineral value of 0% or more so it has no meaning in this case.

I dont like this method as you cant set all
colonies to become mining colonies if they
have mineral percentage forexample 90 or above. You can only make it so that any
colony with a mineral percentage of 101 or above will become a mining colony.
Unless someone finds a way to change this so called approximate percentage value.


Eisenhans January 11th, 2001 09:35 PM

Re: Reasons why the AI runs out of resources
 
HreDaak!

Wow that was one long message! Thanks for all those detail! That explains A LOT!. I'll start experimenting right away. OOPS I already srewed up my original file! I think I set some values to below 100.
One more question though: This will simply decide which planets will get colonized first, right? Or will it mean that all planets with all three values below 100 will become research planets? (Guess that were two questions.)


Eisenhans January 11th, 2001 09:39 PM

Re: Reasons why the AI runs out of resources
 
Hi HreDaak!

Nice of you to reply to me before I even asked! (When I just posted my Last message I found that while writing it you cranked out another research report)
That is some great information, thanks again!

HreDaak January 11th, 2001 09:51 PM

Re: Reasons why the AI runs out of resources
 
If you set any of those 3 values to 100 or below it has same effect as setting this value to 0. Set only those values above 100
that you want AI to compare against the
planets percentage values. If the AI passes on all those comparisons (values that you set above 100) it will set this planets
colony type to whatever was stated on the
Planet Type line as long as every other condition is also fulfilled.
The other conditions are in my opinion pretty much self evident...

Eisenhans January 11th, 2001 10:57 PM

Re: Reasons why the AI runs out of resources
 
Thanks again! I think I got it now(kind of). At least enough to do some thorough experimenting. I do feel empowered now.

Tampa_Gamer January 12th, 2001 12:31 AM

Re: Reasons why the AI runs out of resources
 
HreDaak-

Have you been modifying the AI_Default_PlanetTypes file or a making one for a specific race. The reason I ask, is that a very extensive one for the Darloks, but had to resort to a more default approach when I realized all the tweaking was not effecting their decisions. My thoery at the time was maybe this file had a problem similar to the Strategies file in that the game was only reading the default file, not a specific file placed in the race's directory.

Tampa_Gamer January 12th, 2001 02:30 AM

Re: Reasons why the AI runs out of resources
 
I agree. In the bug/wish list thread, I suggested that we remove these lines from the "Settings" file so that they are hardcoded. This would then enable the AI_PlanetTypes file to be useful b/c the mineral percentages criteria for choosing planets can be based on static mineral values instead of "relative" comparison values which does not appear to be working currently.


All times are GMT -4. The time now is 01:20 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.