Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
AI enhancement (test games)

  • The incredibly long REFIT saga:
    I guess you're already fed up with it (me as well), but please, could somebody with the OSG tell me, how is REFIT supposed to work for Meklars? The game code stupidly uses two totally different approaches, one is displayed, the other commited. The former is a brainless "no REFIT at all for Meklars" (which I saw in the simple game guide, but that is hardly a proof of something, eh?), the latter seems to imply an intricate Meklar REFIT cost, although it occurs later in the game (after they "use up" their +2 control_factory bonus) and is much smaller because their factory cost is smaller by then.

  • I've studied that terraform spending being lost in nowhere and that overspent ECO not being sent to planet reserve. (Just before I begin - what exactly is your "being advertised" point, RefSteel?)

    Overall, it seems I could
    a1) with almost no programming effort use the x2A part of planet data (gaia/fertile storage) to conserve, add anything you spent over, both for the terraforming and for anything over the CLEAN (e.g. forced POP growth). But the latter is problematic: because of planet interface, you always spent 1-3% over CLEAN, so you would amass a lot of BC naturally and after a Soil_enrichment or a Terraform breakthrough, the planet would go into the +20M or into a Gaia state in 1 turn. Not very nice.

    or

    b1) add just Terraform to the 'x2A storage group'
    b2) but let half of anything over the CLEAN go to the planetary reserve

    or

    do just the b2) and conservatively let the Terraform design in place

    So what do you think should be the solution?


Thanks for testing and for the positive reactions!
I've already added another set of suggestions and I am planning to post a big chunk (rather than small sraps) with bug fixes for further testing AFTER I finish off that bloody REFIT chucpe.
Reply

I don't have the guide, so can't help with the Meklar question, although everything I've read does suggest they never pay refit costs.
kyrub Wrote:I've studied that terraform spending being lost in nowhere and that overspent ECO not being sent to planet reserve. (Just before I begin - what exactly is your "being advertised" point, RefSteel?)
When you spend enough on ECO to fill a world to max population, you get a message from the game: "ThisWorld has reached its population maximum of N Colonists. The extra spent was placed in the planetary reserve." Thus, the game "advertises" extra eco spending being transferred to the reserve in this circumstance. That's all I meant by that.

I would personally love to see b1 and b2 for eco spending, but I don't know how much work this would take....

Also, I did a little more testing in the game I started with the new Orion.exe, and found that the Silicoids will still trade for Soil Enrichment (I haven't checked Advanced Soil yet) or accept it as a gift.
Reply

kyrub Wrote:please, could somebody with the OSG tell me, how is REFIT supposed to work for Meklars? The game code stupidly uses two totally different approaches, one is displayed, the other commited. The former is a brainless "no REFIT at all for Meklars" (which I saw in the simple game guide, but that is hardly a proof of something, eh?), the latter seems to imply an intricate Meklar REFIT cost, although it occurs later in the game (after they "use up" their +2 control_factory bonus) and is much smaller because their factory cost is smaller by then.
Unfortnately the OSG says no more about the intended Meklar factory cost than the game guide, just confirming the free refit also applies to captured factories. For normal races you have now corrected the cost of building factories and the cost of refitting factories - better than current bugged values for new colonies, worse for established colonies. For Meklars you could:

Mek1: Charge same increased robotic controls cost for factories as non-Meklars (as implied?)
Mek2: Fix factory cost to IInn level for all RCx as happens in unmodified game (increased cost is for prefit factory controls which Meks do not pay refit for if added later)

I vote for Mek2 because it seems more thematic. The correct answer may depend on how the Meks balance with the other races using the modified (corrected) values.
Reply

I am not sure if I understand you.


Current (being_modified) state is:

- fixed factory cost for anybody + REFIT + REFIT displayed
- classic Meklar cost (Improved Industrial tech) + REFIT + REFIT non-displayed

Now, you'd like to change just the REFIT free for Meklars, wouldn't you?
Reply

Yes, I think! REFIT for Meklars is intended to be and, in unmodified game, is free so your modified code should be the same. Actual factory cost for Meklars is not quoted as having any discount so could escalate with RCx (eg. 10 to 15 BC for RC3) but in unmodified game is not affected by RCx and I think it should stay this way but this may be contentious if other races are disadvantaged by the changes and Meklar become too strong.
Reply

Yes, the Meklars could now possibly join the top three races.

But the bug fixes should also give a boost to:
- Bears, correcting the AI decision routine for bombing when transports are incoming. The programmers forgot to change it after they changed the Bulrathi's gropo bonus from +5 to +25, I guess. This has a potential to massively improve the AI-Bulrathi performance, they will take over more worlds, get more tech from invaded factories...
- Alkaris, Mrrshans will have corrected their hidden bonus for AI-AI combat from +15 to +20 per ship. This is a small change (that follows the equation logic of 5*BC level / 6*BeamDef level) but it should be reflected in an improved combat performance in the early AI-AI battles. (Later, the bonus becomes mathematically irrelevant)
- Silicoids will profit from the correct action radius, they will not deplete their own planets from POP in the colonization process.
- Humans may be probably overpowered now, because of the AI-AI diplomacy correction = stable alliances

Honestly, only Darloks stay down with absolutely no bonus and seem to be the victim of too fearful programming approach. They simply do not spy unless the relations are negative... which kind of sucks in a game with too positive diplomacy.

------------------------

Found the silicoids_soil_enrichment bug = inertial_stabilizer bug. And another no_objective_preference_discount bug in the same subroutine!

In the research.lbx file the first entry for every field is the tech-group field (Reduced waste, IRC etc.). Silicoids have several tech_groups set as tabu. But there is a special x00 tech-group, which I call 'unique' (HEF, soil_enrichment, warp dissipator....etc..... inertial stabilizer). This group receives an incredible 10*x boost for tech price, and is not tabuic for Coids.
Boom.
Reply

kyrub Wrote:- Humans may be probably overpowered now, because of the AI-AI diplomacy correction = stable alliances
I'm a bit concerned about that diplomacy correction, honestly. With the liklihood of early random war against the player (especially but not exclusively with erratic leaders) and AIs ignoring certain penalties with each other (for instance, they don't seem to care about other AIs using spores, and I've seen AIs take each other's planets without going to war, even winding up with an alliance a turn or two later) I'm worried this fix will essentially result in every game (especially at higher difficulties) being defacto Always War. If there is no longer a 100% chance of jumping straight to alliance at the first opportunity, that would mitigate the problem, but unless there is a high probability of AI alliances being significantly delayed (compared to what happens now) this one change might make it an entirely different game.

Great job spotting the soil/stabilizer bug! Can/do 'Coids count individual techs as taboo, or only entire tech groups?
Reply

This needs a good run of tests and a bit of math, too.
I felt lost in this protracted thing, so there may be a number of bugs. Also, the whole conception needs a review. It seems quite weird to me, but maybe it's just the novelty of the concept. It adds a new level of planet economy management as well. Whether it's good or bad I cannot say at the moment.

What this version should do:
1) once an Improved Robotic Control is discovered, the factory cost at a planet should NOT change immediately, should stay the same until 2)
2) once a planet reaches its (max_pop * old Improved Robotic Control) number of factories, it should start to REFIT
3) once it pays IInd / 2 (rounded down) * (IRC_new - IRC_old ) * number of factories, the REFIT should end (this may be really hard to test, but is quite vital to know, whether it works)
4) once a planet captured by invasion reaches 2 * max_pop, it REFITs once and for all (not sure)
5) Meklars do not need to REFIT at all

And if someone can check that...
6) factory cost is now:
= Improved industrial tech lvl for Meklars
= IInd tech / 2 (rounded down) * IRob_control (planet) for anybody else
7) the display of planet shows right what is happening

...as well, I'd be grateful.

It's not simple, I know.
Advice: use the detailed planet view for number of factories and/or the savegame file for the planet IRC (xA0). The storage for the REFIT cost already payed is at xB0 adress in the planet data section.


----------------------

Refsteel, I agree. The AI-AI diplomacy will need a careful approach. I don't want to lose every second game to a first council vote. Let's say that the current threshold for the NAP/alliance roll is 150 (it is), I thought about making it into NAP - 130, alliance - 160, maybe higher if needed. BTW, when AI "catches" the NAP, it gets another +10 bonus to roll.

I will definitely lower all caps for the temp_diplomacy modifiers from 100-110 to 90-100. The diplomacy is generally too easy, for both the human player and the AIs.
Reply

Here's some results. Didn't quite understand the REFIT issue either, but now I got a better grasp of the calculations and such.

Quote:1) once an Improved Robotic Control is discovered, the factory cost at a planet should NOT change immediately, should stay the same until
Yes, the factory costs and factories built stay in line with the initial BC of 10, however the number showing for the expected factories is still accounting for the 50% increase cost so it shows less than what is actually built.

Quote:2) once a planet reaches its (max_pop * old Improved Robotic Control) number of factories, it should start to REFIT
Yes, this seems to work correctly. But there seems to be something occuring when Pop might be (Max - 1) and Factories is close to (* old IR) where it won't switch to REFIT, yet the IND seems to be spent in that regard. When Pop reaches Max, it changes to REFIT, but the difference in REFIT costs seems shorter so I'm assuming that's where the IND went. Also, Planetary reserves did not increase at all.

Quote:3) once it pays IInd / 2 (rounded down) * (IRC_new - IRC_old ) * number of factories, the REFIT should end (this may be really hard to test, but is quite vital to know, whether it works)
My findings are below. I used research points as a measure as I assume 1 RP = 1 BC equivalent for REFIT.

100 Planet w/ 200 Factories and 10BC cost = 900 to 1050 points for REFIT
100 Planet w/ 200 Factories and 9BC cost = 755 to 906 points for REFIT
70 Planet w/ 140 Factories and 10BC cost = 610 to 713 points to REFIT
75 Planet w/ 220 Factories and 8BC cost = 600 to 891 points to REFIT

I use the range because it seems to want to go over the REFIT requirement before changing back from REFIT to Factory #'s. But it does seem to fit the calculation as the upper range is usually just over the calculation amount.

One test that I didn't do was seeing how a new Planet built from scratch with IRC4 would behave. Would it still use the IInd tech level only until the conditions are met and then charge REFIT for both IRC3 and IRC4? I'll probably try it when I have more time.


Quote:5) Meklars do not need to REFIT at all
Confirmed that Meklar has no REFIT cost up to 4x Factories. As IInd tech increases, the cost of the Factories is calculated and updated via Planet view correct. When Meklars get IRC5, is there expected to be REFIT costs there or do Meklars totally get a free pass with regard to REFIT?

--------

Did not try 4). Maybe tomorrow if I'm free.

Also on a side note, not sure if there's a memory leak or uncleared registers but the game started to lag somewhat over time. It could have just been a bad dosbox session, but if it keeps happening I'll let you know.
Reply

SDragon Wrote:100 Planet w/ 200 Factories and 10BC cost = 900 to 1050 points for REFIT
100 Planet w/ 200 Factories and 9BC cost = 755 to 906 points for REFIT
70 Planet w/ 140 Factories and 10BC cost = 610 to 713 points to REFIT
75 Planet w/ 220 Factories and 8BC cost = 600 to 891 points to REFIT

SDragon, thanks for a lot of work. Now, to make this valid test, we need the Improved Industry tech level from these cases, or at least the new Impr Rob Control.

Quote:Also on a side note, not sure if there's a memory leak or uncleared registers but the game started to lag somewhat over time.
frown frown

It only shows how an implementation of something that was not put in the code, is problematic. Mind you, there are 31 appearance of the IRC value scattered over the code. I'll have to analyze all these and see if there's a problem, somewhere...
Reply



Forum Jump: