View Single Post
  #4  
Old July 12th, 2001, 05:18 AM

Guest
 
Posts: n/a
Default Re: Colonization Minister secret revealed

Now it looks like the test is all colony ships plus all ships at top of build queue equals or exceeds number of colonies excluding homeworlds. I am beginning to wonder if that sucker is changing the rules on me depending on the turn number and total number of colonies/ ships/ yards....

I think I have figured out the construction queue usage in Construction_Vehicles :

Entry 37 Type := Colonizer
Entry 37 Planet Per Item := 10
Entry 37 Must Have At Least := 0

Build one colony ship for every colony, counting colony ships NOT yet built but queued up AT THE TOP of the queues. That TOP of queue is VERY important!

Entry 38 Type := Mine Layer
Entry 38 Planet Per Item := 80
Entry 38 Must Have At Least := 3

Build one minelayer for every 8 colonies counting ships NOT yet built but queued up AT THE TOP of the queues, and then for good measure, ALSO build up to 3 MORE if the number already BUILT does not exceed one per 8 colonies - IGNORING how many are in the queues, build at least one, but stop before 3 if building yet another would exceed one per 8 planets.

Entry 39 Type := Mine
Entry 39 Planet Per Item := 1
Entry 39 Must Have At Least := 1

Build ten mines for every colony counting mines NOT yet built but queued up AT THE TOP of the queues, and then for good measure, ALSO build just one MORE.

The TOP of queue MIGHT include ONLY those for which work has started already. I think it was put in because items will be removed from the queue if new tech makes them obsolete. So the count includes only those you can depend on having. Removing items from the queue when made obsolete would be MUCH better if instead they were REPLACED by the new design created when the design minister notifies the production minister that a design is obsolete. But that gets into issues such as the new design may require longer to build, if it is a unit the quantity may be different and there might not be cargo space, and you would also have to change the top of queue check to a full queue check. Obviously that would take more execution time. I think the extra execution time is not that important, but some threads about PBW talk about taking an hour or more to process a turn, so it MIGHT be important to others...

It seems the AI schedules items until all yard bases have at least one construction queue entry. For each queue entry (37 etc) it adds one and only one entry to the best yard available, then if not done it selects the next best yard until done or all yard bases have five or more turns work. (Note that yard components are INFERIOR to yard facilities, so usually all available colony yards are queued before the first yard base is selected.) It runs through however many queue entries are required to schedule five turns on yard bases UNLESS it hits a units production. If it hits a units production it schedules until the units entry is done or all colonies have five or more turns scheduled. If five turns are scheduled on all then it waits at that entry until it can be completed. If all the units entry can be scheduled it moves to the next entry. If it reaches five turns on all yard bases on an incomplete entry requiring a yard, then AND ONLY then will a colony without a yard get to build a facility, assuming that it has no units already scheduled. AFTER the vehicles scheduling is done, you may ALSO get queue entries added on colonies that have a yard if a facility UPGRADE is called for. So what I see is that any colony with a yard is allowed to build a facility ONLY if all the yard bases have an item scheduled at the start of a turn.

Furthermore, whenever new tech is learned that makes a queue entry obsolete, then the entry is removed UNLESS it has already started on a previous turn. This shortens the queues sometimes so that yard bases require scheduling more often than every five turns. I am not utterly certain about the five turns. It may be more or less, and it may be that the queue is done when one turn from build rather than when empty. It may also be that another is added when there is only one left. What I am CERTAIN is that the queues usualy have at least five turns work scheduled when I checked, and often there were three ships queued up.

"Yard bases" may include yard ships, but I have not built any so I do not know. It is obvious that a yard ship should only be queued if it has no orders to move. However I HAVE seen on my previous game checks to get scores at turns 30,45,60 that some AI had yard ships who were building something and recieving an illegal order to move.

If no "yard bases" are built, substitute "colonies which have built all facilities" i.e. Homeworlds and old colonies. Fortunately THEY have population bonuses to yard rate, which normally make them the next best available yard. So yards on newer colonies do not get called to build ships very often if no yard bases are built.

What this means is that the AI can BUILD YARDS on ALL its colonies, usually getting the facility per turn build rate enjoyed by players, but ONLY IF the AI designer gives up YARD BASES and YARD SHIPS. Furthermore, population transport may be a problem, because if the AI delivers enough to an optimal colony with a yard then it may exceed the yard rate of the homeworld. I have seen homeworlds as low as 1000k population, and delivery is made to exceed 500k. That issue I will have to explore in my next test game.

Now what I suggest is that the selection of best available YARD simply EXCLUDE any colony which has unused facility slots and ANY item already queued. Also do a facility build queue call when a YARD call selects the colony. If the queue is still EMPTY after the call, then ADD the ship to the queue, otherwise proceed to the next yard. It would be REALLY nice if changing units production could also be done at the same time. Basically I suggest that the sector inventory be checked to tally up the number of units of the specified type, INCLUDING all queue entries in all colonies in the sector (and not just at the TOP either). Divide the total by the number of colonies in the sector. If the average is less than the planet per item call, THEN schedule the unit. If the average equals or exceeds AND if there are unused facility slots on the colony, THEN do a facility build queue call. If the queue is still EMPTY after the call, then ADD the unit to the queue, otherwise proceed to the next colony.

I THINK the five turns queue ahead is useful because it gets the entries moved past ship/base entries so that units can be built. For some AI this might be critical. So keep it. Possibly this might be made an AI setup option rather than hard coded....

And while you are at it, add an option Rampant Colonization which lets the colonization minister dispatch every single colony ship as soon as it is built PLEASE! Make it a empire characteristic costing 500 points or something if necessary.....

I think these changes would be only a few hours work and would make the AI 1000 % smarter at building facilities, ships/bases and units. They would require only a few lines of logic and a few more function calls. It might be best to add another game setup option called DUMB AI for those who can not stand the challenge.

Anybody else want to lobby MM for these changes ?
Reply With Quote