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

Create an account  

 
[ROTP] What are your ship design tactics?

Cool; I'll think about how to tell an AI about other ship roles then. The above set-up isn't perfect; in fact, I just thought of two potential problems (and corrected them in my post) as follows:

- Seeing one repulsor beam (still less just the tech) shouldn't completely scare an AI off of one-space beamers. If using a weighted-average-enemy "primary target" design, the "primary target" should ideally be considered to include repulsors for Gunner-design purposes only a percentage of the time, probably related to the number of enemy ships (or visible ship types) that carry them.

- My suggestion for modeling Autorepair and ADC was too favorable toward them for small, maneuverable ships. For gunners, I think it would work better to calculate as though they added 15% or 30% (respectively) to the ship's effective hitpoints, rounding fractions down, rather than the number of shots required to kill.
Reply

Wow Ref, that was in-depth!

One thing to keep in mind through all of this is, we need to be careful about not programming the AI ship design in such a way that it purposefully and artificially thwarts typical human ship designs but is otherwise not optimal. For example, humans like to use things like repulsor beams because they allow a player to catch up with a superior AI fleet against incredible odds in the right circumstance (and usually on impossible the human is playing catch-up). Hard-coding anti-repulsor ships would be kind of an "F-U!" to the human player, and not necessarily optimal for helping the AI to actually WIN against the other AI (rather than "not lose as badly to the human player). But I liked the way you dealt with this issue with your gunner ship with the weighted considerations, Ref! We need more ideas like that!
Reply

(November 17th, 2015, 00:04)Psillycyber Wrote: For example, humans like to use things like repulsor beams because they allow a player to catch up with a superior AI fleet against incredible odds in the right circumstance (and usually on impossible the human is playing catch-up).

Well, if the AI is made good enough at ship design and tactical combat, it will use repulsors in more or less the same way, and designs meant to thwart this tactic will be optimal, forcing the player to devise newer and better plans. In fact, the reason I corrected myself about anti-repulsor gunners was that I realized if the AI always gives up on one-space beams when an enemy has repulsors, the human player could predict this, build one repulsor destroyer, and then make the rest of the fleet small one-space beamers to shred the AI's heavier gunners and their overkill heavy weapons. You're definitely right though that an AI that is programmed to behave sub-optimally just to thwart current player tendencies will not be good: It will get eaten alive by other AIs, by players who exploit its new sub-optimal strategy or both.

Since I was talking about different ship roles, here are some examples from our recently-finished SG:

[img][Image lost...][/img]

Here you see a wide range of roles in play, bracketed by a scout and colship.
- The NPG 2.0 is an early gunner (the duralloy upgrade must have been free when it was designed or Ianus would probably have left it off).
- The Nuker 2.0 is an early bomber (same comment on duralloy).
- The Expotition2 (my design; Winnie the Pooh theme) is a third Specialty Ship: A scanner.
- The Care Bear 2 (Psillycyber's design; you've noticed we were Bulrathi here, I take it?) is our earliest completed design of what I call an Anchor. You can see it has a Repulsor Beam - this is because Huge Anchors (often) don't need support ships; they can provide their own support.

Now let's have a look at some later-game designs:

[Image: 2464d.jpg]

Here's a Medium Gunner designed with a Repulsor ship as its primary target. Note the Cloak to let it get close, allowing its one-space beams to hit, and how apart from that and Maneuver to close with its target, it completely sells out for offense, eschewing armor, shield, ECM, and all the rest.

If the following ship were a gunner too, it would probably have traded some of its shielding, its auto repair and/or some of its armor for more guns:

[Image: 2464b.jpg]

The Yogi is a late-game Large Anchor, and you can see here why I distinguish between Anchor and Support ships:

[EDIT: Original image lost, the following image includes only some of the same ships]
[Image: 2468e.jpg]
[/EDIT]

The Birdshot is previous-generation, but the Bearfang 5 uses basically the same technology as the Yogi - it just has far less killing power (particularly against fighters) because it's based around an important piece of equipment that's absent from the Yogi: A Repulsor Beam. Also in play, on both repulsor larges, you can see the "maneuvering weapons" that I'm worried may be a bit exploitive: Turn off missiles and the Bearfang can always move after it shoots. The Birdshot can do the same thing when attacking an enemy colony simply by never expending its bombs. I feel like this should either be an option for all ships (regardless of weapon loadout) in which case the AI should take advantage of it obviously, or for none (e.g. once you've fired once, you can't move again that turn, even if you have weapons left unfired).

Middle generation gunners and bombers are visible in that last image too: My Neutrino 2 design used roughly the same technology as the Care Bear 2 in a different role: The Care Bear was all but unkillable, hit hard against large targets, and had a repulsor beam to herd enemy ships around (and had its own maneuvering missiles). The Neutrino's hull was eggshell thin, but moved time and a half as fast (and was many times harder to hit) and could put almost 200 NPGs into space for the price of one Care Bear! They'll suffer attrition over time though, whereas the Care Bears just keep going; those two survived for more than thirty years, saving many planets along the way, and never did get killed: They were scrapped for parts in the final endgame, still holding their own. Hopefully that's a decent presentation of reasons it's best to have ships in play in both of these roles.

(You can also see the new bombers in that image, designed by Ianus shortly after the quantum leap from Warp 2 to Warp 5.)
Reply

Another way to think about AI design is to rule out what we DON'T want it to do. What are crippling weaknesses that the AI should avoid? We could always add certain checks at the end of an AI ship design routine to throw out any designs that somehow end up with a glaring flaw and force the AI to start over with the design process. That way we don't have to worry quite so much about our design algorithm being perfect on the first pass.

1. Ships without adequate speed. Unless the ship is an unkillable anchor ship, lack of speed is crippling. They can't get to the front line planets quickly or move between planets to where they are needed, they don't get in the first shots in battle, and they are vulnerable to warp dissipators. (And even on anchors, it is highly highly preferred to have the best engines and decent speed). Ships without max engines and almost max maneuverability should probably get thrown out most of the time (although any sensible design algorithm would probably put this near the beginning anyways).

2. Ships that can't hit other ships or planets that they will be going up against, either because:
A. They somehow ended up without weapons.
B. Their weapons cannot penetrate anticipated enemy shields.
C. Their weapons cannot damage an anticipated repulsor beam ship.
D. Their spore weapons are invalidated by enemy technologies.
E. Their battle computers are too obsolete, giving only a 5 or 10% chance to hit against anticipated enemy designs.
F. They are a missile boat design, and anticipated enemy designs have anti-missile counter-measures such as zyro shields or maneuverability that is higher than the speed of the missiles.

3. Ships that will get slaughtered by specialized enemy counter-measures:
A. Small ships getting slaughtered by scatterpacks, pulsars, stream projectors, and/or black hole generators.
B. Small/Medium/Large ships that will not be able to out-damage the auto-repair on an anticipated auto-repair enemy (technically, this is tricky because, in enough numbers, any ship would start accumulating damange...so maybe this is a consideration more for the fleet deployment code instead of the ship design code?)
C. Any ship with speed that is too low to close on and fire on anticipated enemy ships in a single turn, if those anticipated enemy ships have the high-energy focus special along with either very high speed, or if you lack subspace interdictors, subspace teleporters. Either one of those will allow the enemy to buzz around your ships at will and snipe you with the high energy focus, unless you have similar range or speed to close with them.
Reply

I agree, Psillycyber, that the first and possibly most important step to making a competent AI is to make sure it doesn't do stupid things. When that happens, immersion is always broken for the player.

Ship combat is the most important and detailed interaction that a MOO1 player has with the AI. Treaties come and go, but games are almost always won or lost on the battlefield.

There are 5 different components to the AI necessary for it to be competent in ship combat:

1) The Scientist - understanding the proper value of technologies for research, trade or theft. It currently does a good enough job, but could be improved.

2) The ShipDesigner - competently building useful ships. It is currently functional, but not good. It needs a bit of expert work and is the focus of this thread.

3) The General - selecting military targets and how much force to apply to them. This guy also needs work.

4) The Fleet Commander - efficiently routing the correct ships to their destinations. This one is in great shape, as it was developed when the scouting and colonization routines were done.

5) The Ship Combat - tactically managing ships in combat for their intended mission. Not currently written. Ship combat will not arrive until the beta (mid next year?)

However, the alpha is in a few months and testers will be able to enter an AI-only mode and monitor how the AI expands, researches, designs ships, and wages war.
Reply

Good points, Psillycyber. I think if we have spot checks we can do to make sure a ship isn't terrible, it's best to implement them first or as part of the design algorithms, just for coding efficiency, but your point stands. Taking my gunner algorithm above as an example:

- Some designs built with the algorithm above may trade combat speed for better offensive punch. Especially if the weapon selection process (step 4) is folded into damage optimization (i.e. with step 6f) this will only be the case at already-high movement speeds or extremely beneficial weapons or targeting however. Even so, I don't know if I've balanced the numbers optimally, and there are late-game situations which I didn't take into account that may dictate different design decisions.

One problem is that the significance of combat speed depends in part on how shoot-and-move combat rules will work. If all ships can move after shooting, combat speed becomes more powerful; if no ships can move after firing, though combat speed remains important, it can be spared more easily ... beyond a certain point at least. (If the original Orion system is used, AI large and huge ship designs should all incorporate single 2-racks of nuclear missiles that they never fire, which ... is kind of silly.)

- The only enemy special system I really accounted for in the above design rules was the repulsor beam. Pulsars on enemy fleets might modify the ship size roll or encourage building more anchors and fewer gunners, though again seeing one pulsar ship in one rival's fleet shouldn't eliminate the will to use small ships entirely. (In fact the best response to pulsars is often to plan ways to render them tactically irrelevant while still using lots of small ships; we'll see if we can teach the AI to know when and how to try this.) Stream projectors are a bit more complex, and I honestly just haven't used or seen them enough to have a good sense for what's best to do with or about them.

Thanks for the notes on ship combat AI, Ray F! The General is the reason I've been talking about ship roles rather than just e.g. "combat ships" - the General should ideally send (and "request" from the ship-designer and colony-manager) a mix of ship roles appropriate to each mission. This ... is difficult. Even a relatively simple rule of thumb like, "At least one support ship for a combat missions, at least one anchor when engaging fleets in the absence of friendly missile bases, and [number of gunners proportional to the project's priority]" will usually be better than (say) throwing de-facto gunners out without support and clumping all the repulsor ships together.
Reply

(November 18th, 2015, 20:15)RefSteel Wrote: Thanks for the notes on ship combat AI, Ray F! The General is the reason I've been talking about ship roles rather than just e.g. "combat ships" - the General should ideally send (and "request" from the ship-designer and colony-manager) a mix of ship roles appropriate to each mission. This ... is difficult. Even a relatively simple rule of thumb like, "At least one support ship for a combat missions, at least one anchor when engaging fleets in the absence of friendly missile bases, and [number of gunners proportional to the project's priority]" will usually be better than (say) throwing de-facto gunners out without support and clumping all the repulsor ships together.

This is correct. The General could give orders like:

-- There is an enemy fleet headed for Yarrow. Send 25 fighters and 2 destroyers to defend at priority 100.
-- Our next target system against the Mrrshan is Denubius Send 20 fighters, 10 bombers and a destroyer to capture it at priority 75, using Procyon as a staging point.
-- We need to destroy the Silicoid colony at nearby Rho. Send 10 fighters and 50 bombers to destroy it at priority 60.

The General's orders are handed off to the Fleet Commander, who then generates additional non-military and usually lower-priority missions for other systems (Scout system X,Y,Z, Colonize system A, Send defensive fighters to System B until bases are built, etc). All of the various ship requests are processed in order of priority and ships are sent on their way. If there are not enough ships & resources, the lower priority requests remain unfilled.

In addition, these orders will trigger spying missions (i.e. destroy bases at systems we are approaching) and ship construction.

All of the logic for mustering ships (i.e the glue to the whole thing) is already in place and works. It's how the AI currently scouts and colonizes, for example. But the logic for the General to send appropriately-sized fleets isn't that detailed yet. I think it currently just sends a scaling amount of Fighter ships.
Reply

I've been thinking about algorithms for an anchor design, and in doing so realized that there are some serious problems with the way my gunner designs above assign value to damage prevention, especially for high-end defenses. The number assigned for NS (in lieu of a number of enemy shots needed to destroy one) in the case of complete damage immunity is too low (it should be something more like a million, and I've updated it in the original post) but the fact that it looks at pure ratios is a problem in any case: If a ship that can survive ten shots on average can be improved to survive twenty, that's a big improvement. If one that can survive twenty thousand shots is improved to survive forty thousand ... it really doesn't matter; it's not like the ship is going to die against current enemy fleets anyway.

This probably won't come up often for gunners, which lean heavily toward offense anyway, but it's a real consideration for anchors, and I'd like to improve the algorithm either way since a shield-4 gunner with a single laser should not be built to interdict enemy fleets with lasers and death spores if a shieldless gunner could carry multiple ion cannons (to take an extreme example) even though the shieldless ships would suffer significant attrition; it's still better than letting spores hips get through intact to a planet's orbit. So ... well, I'm thinking further about how to improve the algorithm. I do have a few ideas, but have yet to come up with something I love.
Reply

Great! I am glad that you are still working on a design algorithm. It will certainly help the game in long run.

The last functional piece I have to do before the alpha is the diplomacy, which should be finished by the end of the year. At that point, I will the Save-Game feature and resume work in the AI, including the ship design algorithms.

At some point, I will probably privately invite several expert MOO1 players to test the alpha version of the game with the specific goal of tuning the AI. I am hoping some of the experts in this forum will be interested.
Reply

After illness and family obligations, I'm finally back! So, next up, I'm going to look at the role that I think corresponds to what you call a "destroyer" - I'm going to call them "Anchors" but again if we're talking about the same ship type, that's just a semantic choice.

Anchors are meant to maximize survivability and serve as the backbone of a fleet: To act as mobile combat platforms, protecting colonies whose bases can't manage on their own, as-yet-unclaimed systems, and assault forces heavy on bombers and missile boats. Where gunners are designed to maximize their short-term damage output and be replaced as they are lost to attrition, Anchors seek to minimize attrition while remaining credible combat threats, remaining relevant as long as possible in order to project power outside of an empire's ship-building core. They tend to be larger than other designs to enhance survivability, but exceptions certainly exist; a fleet of small "anchors" will certainly suffer attrition barring a huge technological advantage, but hopes to defeat gunners in a prolonged fight given equal numbers thanks to their more balanced approach (whereas gunners are meant to concentrate force in such a way as to prevent fights from becoming prolonged). My suggestion for how an AI should design one will look somewhat familiar however, with some key differences highlighted:

(Spoiled for extreme length again.)

1) Select Hull Size: Anchors are usually large compared to other ships in the fleet. Races that favor small ships might be less likely to build them altogether, but this tendency might be modeled by the fact that small gunners and small anchors are nearly indistinguishable in many circumstances. In any case, all races should be willing to build a huge ship occasionally.

Code:
Select a random number from 1-8.  If the race prefers small ships, triple the selected result.  If the race prefers medium ships, double the selection instead and add 6.  If the race prefers large hulls, just add 17 to the selection.  Ship size depends on the total:
    1-6: Small
    7-14: Medium
    15-21: Large
    22+:  Huge
The table is designed this way for easy of adding other modifiers, e.g. if the ship will be built at a low-production world, the roll might be weighted toward smaller ships; if (for instance) enemies are fielding pulsars or stream projectors, the roll might be weighted toward larger ships.

2) Assign basic equipment: I'm still not putting armor on a small hull without making sure it provides meaningful value; "basic equipment" is different for different hull sizes because it's really just a shortcut for stuff I know every ship of its class and size is going to want, regardless of other considerations. Unlike gunners (and like their name) anchors don't necessarily mind moving slowly in combat, though they'll usually need maneuverability anyway for defensive and tactical purposes. Of course it's unacceptable for nearly any ship to move more slowly than necessary on the galaxy map.

Code:
Basics:
    a) Give the design the fastest engine available.
    b) If the design is small or medium, increase its maneuverability class to 2 if engines allow.
    c) If the ship is Large or Huge, give it a Battle Scanner, the best available shield, the best available standard armor, and the best available battle computer.
I originally wanted to include autorepair here under certain circumstances, but I think it ends up working better built into steps 4 and/or 8 below....

3) Determine the design's primary targets. Anchors are meant to stick around, so they should definitely assume a target with the best known rival shielding, and - especially when building in peacetime - perhaps even the next level of shielding up. Current fleets should ideally be taken into account to be sure you don't end up with a design that - optimized against imaginary future fleets - proves a poor match for current enemies in a hot war however. There may also be cases when an anchor design is needed specifically to thwart a specific enemy design. When that is the case, refer to the target's specific defenses for purposes of designing the new anchor, but consider the attack power of the entire known enemy fleet when calculating the anchor's optimal defensive equipment.

4) Assign Target-Specific Equipment. Some enemy ships may require special measures to be taken; e.g. Pulsars may require even small anchors to mount heavy shields (and therefore perhaps to be bumped up one or more sizes) while stream projectors may require all anchors to mount ARS or ADC regardless of size. Repulsors of course might require anchors to use HEF, teleporter, or cloaking if one of these is available. Meanwhile, a large enemy fleet with numerous powerful one-space beams might demand a repulsor or dissipator if one of these is available and the new design's hull size is huge. High Energy Focus is useful in many situations too, for instance when either fleet has dissipator support ships and the enemy has (or the AI lacks) good heavy beams (or when the enemy has dissipators and HEF). Compiling a complete list of measures and counter-measures is beyond the scope of this post, but I may think about it more and post additional thoughts later on.

5) Determine the design's primary weapon. This isn't quite the same as for gunners due to the ships' differing tactical roles, but it's close. In particular, Anchors are even more reluctant to mount missiles than Gunners, and much more willing to bump up a size class if needed to fit the best weapons and equipment.

Code:
Weapon Selection:
    a) How many can fit in the available hull space
    b) How well they will perform against the target's shields
    c) Unless the weapon is streaming, damage after shields that exceeds the hit points of the design's primary target (as selected in step 3) is treated the same as damage equal to that hit point total.
    d) If the primary targets OR this design are known to feature repulsor beams when neither cloaking device nor subspace teleporter nor High Energy Focus is included on this design OR if enemy fleets include Dissipators and 2-space beams when neither HEF nor teleporter are on this design OR if the AI's own fleet includes Dissipators while many enemy ships rely on dangerous 1-space beams and HEF is not aboard this design, remove all 1-space beams from consideration as available weapons unless this would severely restrict potential damage output.
    e) Divide effective torpedo damage-after-shields by two since they can't fire every turn.
    f) Do not use a limited-shot weapon (i.e missile) UNLESS no other available weapon would crack the shields of any known enemy ship.
    g) If the only available weapons OR the only available unlimited-shot weapons that can damage the primary target do not fit on this hull OR if a weapon that would be available on a larger hull is significantly better against the primary target (say at least 1.5 times the damage-after-shields per unit space) then clear the design and start over from step 2 with a one-size-larger hull.
I feel like the restrictions introduced under step 5d are still incomplete and will sometimes result in crazy design decisions. As noted in step 4 above, counter-countermeasures can get complex.

6) Calculate the number of these weapons that will fit aboard the design and the cost of building the ship.

Code:
Given the limitations specified above, Maximum number of Weapons available = MW.  Cost of ship (in BCs) with max Weapons included = CW

7) Calculate Optimal Damage Setup. Anchors aren't as concerned about closing speed as gunners are, so though it still retains importance, it is not emphasized at this stage. There are some cases where closing speed per se is critical for an anchor, especially when they need to deal with specific (actual or anticipated) enemy designs to which the AI would not otherwise have an answer, but this should be handled above at step 4.

Code:
Equipment Comparisons:
    a) Subtract the known or estimated beam defense level (or missile defense level in the rare case where we're making a torp or missile design) of the design's primary target from the design's current attack level, including any racial bonus, weapon bonus, or already-present equipment (e.g. Battle Scanner or Battle Computer on a Large hull) and add 5.  If the result is less than 1, then the Baseline Attack value is BA = 0.5.  Otherwise, BA is equal to the total.
     b) For each available combination of Battle Scanner or Battle Computer upgrade, calculate the New Attack value (NA) by the same process as calculating BA in step 7a above and calculate the number of weapons (NW) for which space would be left.
    c) Calculate the New Cost (NC) of the design (in BCs) with each equipment combination, including as many weapons as it can still carry.
    d) Calculate the effective Damage Value of each combination relative to its cost:  DV = (NA * RS * NW * CW) / (BA * MW * NC) and select the equipment combination with the highest DV.  Ties are broken in favor of designs with battle scanners, and ties between them are broken in favor of those with the most space left available.
[   e) This is where you could improve weapon selection by recalculating steps a through e for different weapons, multiplying the result by the average damage output after expected target shields for each weapon type.]

8) Compute the value of defensive equipment. Anchors are meant to have more staying power than gunners, both tactically and strategically, but do not have the same firepower, so they assume a future fleet with greater force available than present ones and a battle of longer duration.

Code:
Defense Comparisons:
    a) Calculate the average Damage per Hit (DH) that each known enemy weapon would deal to a ship of this design given present shield levels.  For streaming weapons, this is a stragithforward average of damage numbers, but for non-streaming weapons that are capable of damaging the design at all, this number is equal to the design's hitpoints divided by the average number of hits the weapon requires to destroy one of these ships.  (Thus, a laser against an unshielded design averages 1.92 damage against a 3 hp ship, about 2.05 damage against a 4 hp ship, about 2.14 damage against a 6 hp ship, and about 2.37 damage against an 18 hp ship.) If the weapon has auto-fire, multiply average damage by the number of shots fired per weapon to calculate the final DH for that enemy weapon.
    b) For each weapon known to appear on a known enemy ship, calculate the Chance to Hit this design (CH) given that ship's attack level and this ship's defense level (including ECM and AMR in the case of missiles, and Displacement Device if present).  Multiply the DH for that weapon to calculate the average Damage Threat (DT) of that enemy weapon aboard that enemy ship.  Special cases may be included -- e.g. the DT for one-space beams on ships with neither teleporters nor HEF nor cloaking devices can be estimated as zero if this design has a repulsor beam and either better initiative than the enemy ships or longer-range weapons (or if this design has HEF and highly superior maneuverability while the enemy ship lacks the combat moves to close from HEF range) -- but that can be a deep rabbit hole to go down.  One exception:  For anchors, a cloaking device can basically be treated as granting a +5 bonus to missile defense (including against torpedoes).  Against beams, to properly model a cloak's effects, it is necessary to calculate separate DTs for each beam weapon given +5 (DT[cloak]) or +0 (DT[decloak]) beam defense bonuses from the device.
    c) Calculate DT (figuring DT[cloak] and DT[decloak] separately if a cloaking device is present) for a hypothetical new enemy ship with the best known enemy beam weapon, battle computer, and battle scanner.  For purposes of this step, assume the weapons aboard any unknown enemy ship types have this hypothetical DT, and assume that the unaccounted-for portion of the enemy's fleet strength (from the bar graphs) consists of ships that would maximize the fleet's total overall DT from among the known enemy ship types and the hypothetical new type if available.
    d) Calculate the total overall Threat per Round (TR) of the enemy fleet by adding up the DT values for all the weapons in the presumed fleet.  For anchors, also include hypothetical additions to the fleet equal to 20 times the DT of the hypothetical design from step c for each planet in the enemy's empire.  If more than one enemy race is considered, do not combine them; use only the highest TR of any single enemy race.  Ships with cloaking devices will have separate TR[cloak] and TR[decloak] ratings.
    e) Calculate the Estimated losses per Round (ER) for this design given a major but not total commitment of force by the enemy to a given battle:  Divide TR by three, and then divide the result by the current design's total hit points.  If the design has an Automated Repair System, subtract 0.15 from the result; if it has Advanced Damage Containment, instead subtract 0.3 from the result.  If the total result is less than zero, set ER to zero UNLESS a cloaking device is being used and ER[cloak] would be less than 0 AND ER[decloak] would be greater than 0.02.
    f) Estimate the Total Losses (TL) in a drawn-out fight:  Multiply the base ER by two, then recalculate ER, this time excluding any two-shot missile racks.  Add this new ER, and recalculate again, excluding any five-shot missile racks.  Add ten times this new ER, and recalculate again, excluding any torpedoes.  Add twelve times this new ER to get the final TL value for a given enemy race.  If ER[cloak] and ER[decloak] apply, use ER[cloak] for every calculation except the last (12x) calculation, for which ER[decloak] is used instead.
    g) For each combination of shields, armor, additional maneuverability, or defensive specials available for this design, calculate the new TL value for that set of equipment.
    h) For each of these combinations, recalculate the optimal DV for the space remaining and with the BC cost of the defenses included, repeating step 7 above (continue to use the original values for MW and CW however).
    i) If the best resulting DV for a combination is equal to 0, discard the combo; it will not be used.  If no combination of equipment results in a DV greater than 0, start over from step 2 with a one-class larger hull size.  If no combination of equipment yields a DV greater than 0 for a huge ship, this is not the right circumstance in which to design or build an anchor.
    j) If any remaining combination of defensive equipment has a TL of less than 0.45, discard all combinations with TLs of 0.45 or greater, and then increase the TL of each remaining combination by 0.05.
    k) Divide the DV of each remaining combination by its TL to get its Overall Value (OV).
Many of these numbers are guesstimations, approximations, and sheer inventions in an attempt to get into the right ballpark. Fortunately, we don't need the results to be perfect: No single design plan could be so anyway. The main thing is to ensure the results make sense and are generally effective. Once we've got a competent AI, we can work on making it even more competitive, but first we have to establish a baseline.

9) Add all the equipment and weapons associated with the highest OV found in step 8.

10) Add additional weapons:

Code:
Extras:
    a) Calculate the current Total Cost (TC) of the ship in BCs.
    b) If enough space is left over to add one, find the best available weapon of those that will still fit by the same process as step 5.  Calculate the ship's average Damage per Turn (DT) to the primary target and the average Damage per turn from each of the New weapons (DN) given the ship's attack level and the primary target's defenses.  Given the new Weapon's Cost (WC) in BCs, calculate the Value Added (VA) per new weapon:  VA = DN / DT - WC / TC
    c) If VA is positive, add as many of the selected weapons as will fit and repeat step 9 if there is room for any other weapons.  Otherwise...

10) Build it!
Reply



Forum Jump: