• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Setting up an AI-only game?

BFG

Chieftain
Joined
Sep 3, 2011
Messages
37
Is it possible? If so, how?
I've read in other forums that it is possible, but little detail - beyond that it is accomplished with the Scenario Editor - is given. No luck with Google searches either. And I haven't had any luck looking through the various game options.

I was wanting to test out the relative strengths of the various AI factions in different situations, with and without some of the edits I've made to the alpha(x).txt files.

Any info is appreciated.
 
Yes, it is possible to run an all-AI game: Start a new game, activate the scenario editor (Ctrl-K), and go MENU --> SCENARIO --> Switch Sides/Set View. Select the faction you wish to observe (you can switch to a different faction later, if you wish), press OK, select No, watch Computer Player and press OK again. If you place a weighted object on the ENTER key, you can bypass all the dialog boxes for continuous play.

The game will now "play itself" with no human intervention. You'll be observing the faction you switched to. If you press the "Y" key, you can observe the moves of all the factions.

HTH

Petek
 
Yes, it is possible to run an all-AI game: Start a new game, activate the scenario editor (Ctrl-K), and go MENU --> SCENARIO --> Switch Sides/Set View. Select the faction you wish to observe (you can switch to a different faction later, if you wish), press OK, select No, watch Computer Player and press OK again. If you place a weighted object on the ENTER key, you can bypass all the dialog boxes for continuous play.

The game will now "play itself" with no human intervention. You'll be observing the faction you switched to. If you press the "Y" key, you can observe the moves of all the factions.

HTH

Petek


Thanks again, Petek! I'm planning to run a battery of games under completely random conditions to ascertain how balanced the AIs are relative to one another. If they're all perfectly balanced, each one should win one out of seven times (or the equivalent if cooperative victories are achieved). But if, say, the Hive wins 20% of the time or more (which is what I'm expecting), then I'll know it's overpowered. I imagine a lot of games will be needed - 100 or more - and that's not even including the SMAX factions.

The overall goal is (1) to see just how balanced the factions are in actual gameplay, with the eventual goal to further balance them; and (2) increase their competitiveness versus human opponents.
 
Thanks, Petek. I wasn't able to get it to work at first; but then I tried moving my starting faction's starting units, and it worked as planned.

One question: is there any way to keep the game going even if the faction you start as is eliminated? I started as the University and was kicked out as soon as it was defeated.
 
Thanks, Petek. I wasn't able to get it to work at first; but then I tried moving my starting faction's starting units, and it worked as planned.

One question: is there any way to keep the game going even if the faction you start as is eliminated? I started as the University and was kicked out as soon as it was defeated.

Glad to hear that you figured out how to get the game going - I should have mentioned that in my first post.

If you see that your faction is about to be eliminated, you could switch to another one before that happens. Or if it's eliminated unexpectedly, you could revert to an earlier autosave and then switch.
 
Anyone know if tests like this have been conducted previously?

I've seen several people attempt to rate the relative strengths of each faction under default settings, but haven't seen very many people conduct actual tests. This will take FOREVER if I'm the only one to do this testing, and so would hate to spend that much time if someone else already has, or if there's no interest from anyone else.

EDIT: If anyone else is interested in helping with such testing, let me know...
 
Yes, others have tested the various factions by turning over control to the AI. In fact, the team that designed SMAX did so. Here's an extract from the Alien Crossfire designer notes:

About halfway through this process, we discovered that the game AI could play
itself at an accelerated speed—by turning over control of the game in the scenario
editor to another faction, turning off all the animations, and taping down
the “ENTER” key to bypass all the popups. Once we found this feature, we used
any empty processor time—lunches, overnight, design meetings—to play entire
games through to completion. By checking the powergraphs at any given time,
we could see how well each faction was doing. Plus, we could put one new faction
in with the old factions and see how they performed, to be sure that the
Crossfire inhabitants would not completely dominate the original SMAC 7.

I've run lots of simulations just for fun. Among the original seven factions, the Hive seems to be the strongest.

What sort of testing did you have in mind?
 
Thanks Petek. Here's what I had in mind:

  • Ideally, 100+ game runs; record the final ranking of all factions, which one(s) won, win type, and what mission year
  • SMACX using the original 7 factions only, Transcend level*
  • Scient's and kyrub's unofficial patch / AI patch installed
  • Standard rules only
  • Standard planet size; random map, random Ocean, Fungus, Weather, etc.
  • Slightly modified alphax.txt:
    • 7/4 artillery damage
    • 10% attacking from higher elevation
    • -10% attacking from lower elevation
    • 10% defend vs. mobile in rough terrain
    • Antigrav Struts ability added to Air units
    • Amphibious Pods ability added to Non-Combat units
    • Several new Probe, Terraform, Crawler support unit types added to Base Units section

Some of the above can be changed if someone else gets in on the testing "action".


The whole point of this exercise is to see, with whatever changes are available to SMACX via the Unofficial Patch (scient), Unofficial AI tweaks (kyrub), and faction tweaks (both), how the base 7 factions will fare in "real life". After that's done we can do some more tweaking to even up the weaker factions.


*Since this is using the Unofficial Patch/AI tweaks, it might make more sense to use SMAC instead. I chose SMACX however because that's what I usually play.
 
Any comments are appreciated! Anyway, I started last night. We'll see how long I have enough motivation to continue this test...
 
I can't commit to running lots of tests, but I might try a few. If you'll post your alpha(x).txt, I see how it goes. What are you keeping track of? Just which faction wins or something else?
 
Here ya go! http://www.megaupload.com/?d=QDZKIVYH
Any suggestions for changes to the alphax.txt, or to methodology, are appreciated.



As for what I'm recording - I'm recording which place each faction ends up in, what planet settings I used (planet size, ocean %, lifeform frequency, etc.), what type of win it was, and what mission year the win was in. Rule set is always standard, difficulty is always Transcendent.

When determining rank - The first faction knocked out of the game is 7th ("escaped in a colony pod" doesn't count as a knockout); the next faction knocked out is 6th, etc. A faction achieving any victory condition automatically gets 1st. (Cooperative victories mean several factions tie for 1st.) Any remaining factions - those still standing when one faction wins, or all remaining factions if no victory is achieved - should be ranked by the dominance graph. Ties on the dominance graph can be broken by AC score.

For example, here's what I recorded for the last game.
Ranking (first to last) - Hive, Spartans, University, Peacekeepers, Gaians, Morganites, Believers.
Victory - No victory. Hive tried for economic but didn't finish in time.
Conditions - Standard planet, average ocean, average lifeforms, average cloud cover
 
I can vouch for AI tests as being pretty good. :D I did a lot for Lost Eden. What I can say though, is that the AI can also be really stupid and not take advantage of a faction's strengths, and some spam-happy factions become overly powerful as it meshes with the AI's strategy. E.g. Oblivion in my game and Hive in the normal game are pretty notorious for being strong AIs.
 
@BFG,

I started a game with your alphax.txt and have played 256 turns. I have a suggestion for modifying the txt file. The AI love to build air unit colony pods and (especially) air unit transports. However, they don't know how to use them. All these units get placed on hold and sit around in bases taking up unit maintenance. Have you observed the same in your games? If so, I'd suggest removing the air unit colony pods and transports. On the other hand, the AI also builds sea unit probe teams and knows how to use them.

ETA: For example, in my current game, the Peacekeepers have built 128 Copter Transports, with another 16 in production. That accounts for approximately 50% of all their units. However, I'm "following" the PKers. The other factions are either not building Copter Transports, or only building one or two. I wonder what's going on? I'll switch to another faction and see if that makes a difference.
 
@Petek While I haven't observed that yet, it could be simply because I tend to follow the least developed faction (since that means running through the game faster :) ). I wouldn't be a bit surprised if that's the case though.

In fact, I'm thinking it might make sense to drop all of the post-Fusion Power units entirely, since we unfortunately can't set up alphax.txt to use anything other than Fission.

I'll set up a scenario this afternoon with all of the new units and see how the AI uses them (if they do). It's a shame that they (apparently) don't know how to use air colonies or transports; that could have given the AI a huge boost.
 
OK, just finished an all-AI game with your alphax.txt. Results and data:

Map size: Standard
Ocean: 70-90%
Erosion: Average
Life Forms: Rare
Cloud Cover: Dense

Winner: Lal, by diplomatic victory in MY 2458
2nd: Believers
3rd: Gaians
4th: Hive
5th: University
6th: Morgan
7th: Sparta was eliminated by the Believers in MY 2349)

Observations:
1. Lal was in first place almost the entire game, having started next to the Monsoon Jungle and having no early competition for that landmark. It would be interesting to monitor whether one faction having the Jungle leads to a decisive advantage.
2. As mentioned before Lal built lots of air transports, but never used them. Most of the other factions who discovered MMI also built Transport Copters (Miriam didn't build any), but not as many as Lal. I noticed that Lal's base governors were set to Explore/Discover. Perhaps this combination caused the mass building of the air transports.
3. Difficulty was set to transcend, but I think the AI always plays at Librarian (or some close approximation). You can verify this by observing that in the AI bases, the first three citizens are content and the fourth is a drone. That indicates Librarian, not transcend.

I'm attaching the final save file from the game, right after Lal's victory, in case you want to look at it.
 

Attachments

Since you started the AI game as a normal single player game the AIs get their usual advantages. They always get 3(4?) content citizens on transcend. They wouldn't be able to handle more restrictive drone settings anyway.
 
Well, you're right Petek. I ran a scenario today to check if the AI knew how to use the new units. Several of the new units it placed on hold, or even worse, it kept building units of a certain kind then just idled them.

The AI can't use any of these units so I recommend removing them: Aero Colony v1-3, Gravship Formers, Transport Copter, Transport Gravship. We may also want to remove the XX Missile since it looks like it's never built by the AI (but I'd like to find some use for that icon!)

On another note...anyone else get the idea that the XX Missile icon was originally supposed to be a Native Fungal missile?

EDIT: I was happy to see that the AI does know how to use all flavors of the Supply units, including Gravship.
 
Here's the #UNITS section of my alphax.txt. It's based on Darsnan's suggestions in another thread. I haven't used it enough to observe whether the AI builds and uses the new units. Might be worth a look, though. One useful feature of this version is that Formers have no tech prerequisites. That really helps those AI who don't research CentEco right away.

Code:
#UNITS
47
Colony Pod,             Infantry, Colony Pod,   Scout,      8, 3, 0, None,    -1, 00000000000000000000001000
Speeder Formers,        Speeder,  Formers,      Scout,      9, 0, 0, Disable, -1, 00000000000000000000001000
Scout Patrol,           Infantry, Gun,          Scout,      3, 1, 0, None,    -1, 00000000000000000000001000
Transport Foil,         Foil,     Transport,    Scout,      7, 0, 0, DocFlex, -1, 00000000000000000000000000
*Sea Formers,           Foil,     Formers,      Scout,      9, 0, 0, Disable, -1, 00000000000000000000000000
Crawler,                Infantry, Supply,       Scout,     10, 0, 0, IndAuto, -1, 00000000000000000000000000
Probe Team,             Speeder,  Probe Team,   Scout,     11, 3, 0, PlaNets, -1, 00000000000000000000001000
Alien Artifact,         Infantry, Artifact,     Psi,       12,10, 0, Disable, -1, 00000001000000000000000000
Mind Worms,             Infantry, Psi,          Psi,        1, 5, 0, CentEmp,  3, 00000000000000000000001000
Isle of the Deep,       Foil,     Psi,          Psi,        7, 8, 4, CentMed, -1, 00000000000000000000000000
Locusts of Chiron,      Gravship, Psi,          Psi,        4,10, 0, CentGen, -1, 00000000000000000000100000
Unity Rover,            Speeder,  Gun,          Scout,      3, 0, 0, Disable, -1, 00000000000000000000001000
Unity Scout Chopper,    Copter,   Gun,          Scout,      4, 0, 0, Disable, -1, 00000000000000000000100000
Submarine Transport,    Foil,     Transport,    Scout,      7, 0, 0, Disable, -1, 00000000000000000001000000
Sealurk,                Cruiser,  Psi,          Psi,        6, 6, 0, CentPsi,  4, 00100000000000000001000000
Spore Launcher,         Infantry, Psi,          Psi,        0, 5, 0, Bioadap,  5, 00000000001000000000000000
Battle Ogre MK1,        Infantry, R-Laser,      3-Res,      0,10, 0, Disable,  6, 00010000000000000000000000
Battle Ogre MK2,        Infantry, R-Bolt,       8-Res,      0,15, 0, Disable,  6, 10010000000000000000000000
Scud Missile,           Missile,  Conventional, Scout,      0, 4, 0, Viral,   -1, 01000000100000000000000000000
Fungal Tower,           Gravship, Psi,          Psi,        0, 0, 0, Disable,  1, 00000000001000000100000000
Unity Mining Laser,     Infantry, Laser,        Scout,      0, 0, 0, Disable, -1, 00000000000000000000001000
Sub Escape Pod,         Foil,     Colony Pod,   Scout,      8, 0, 0, Disable, -1, 00100000000000000001000000
Unity Submersible,      Foil,     Laser,        Scout,     -1, 0, 0, Disable, -1, 00100000000000000001000000
Cruiser Probe Ship Mk1, Cruiser,  Probe Team,   Scout,     11, 0, 0, DocInit, -1, 00000000000000000000000000
Cruiser Probe Sub Mk2,  Cruiser,  Probe Team,   Psi,       11, 4, 0, MindMac, -1, 00000000000000000000001100
Formers,                Infantry, Formers,      Scout,      9, 2, 0, None,    -1, 00000000000000000000001000
Probe Bug,              Hovertank,Probe Team,   Photon,    11, 4, 0, DocSec,  -1, 00000100000000000000001000
Attack Carrier Mk1,     Cruiser,  Missile,      3-Res,      6, 4, 2, DocAir,  -1, 00000100000000000010100000
Attack Carrier Mk2,     Cruiser,  Shard,        8-Res,      6, 4, 4, Space,   -1, 00100000100010000000010100000
Seawolf Mk1,            Cruiser,  Gatling,      3-Res,      6, 4, 0, Super,   -1, 00100000100000000000001000000
Seawolf Mk2,            Cruiser,  R-Bolt,       8-Res,      6, 4, 0, SentRes, -1, 00100000100010000000001100000
Fighter Escort Mk1,     Needlejet,R-Laser,      3-Res,      1, 4, 0, DocAir,  -1, 00000100000000000000100000
Fighter Escort Mk2,     Needlejet,R-Bolt,       8-Res,      1, 4, 0, SentRes, -1, 00000100010000000000100000
Speeder CP,             Speeder,  Colony Pod,   Scout,      8, 0, 0, Disable, -1, 00000000000000000000000000
Hovertank CP,           Hovertank,Colony Pod,   Psi,        8, 4, 0, MindMac, -1, 00000000000000000000001000
Synth Police,           Infantry, Gun,          Synthmetal, 2, 2, 0, Integ,   -1, 00010000001000000000000000
Probability Police,     Infantry, Laser,        Probability,2, 4, 0, ProbMec, -1, 00010000011000000100100000
Marine Raider,          Infantry, Impact,       Synthmetal, 1, 3, 0, Chaos,   -1, 00000000000000000000001000
Empath Rover,           Speeder,  Impact,       Scout,      1, 3, 0, Chaos,   -1, 00000000000000100000001000
Attack Gravship Mk1,    Gravship, Chaos,        Silksteel,  0, 5, 0, Magnets, -1, 00000100010000000000000000
Attack Gravship Mk2,    Gravship, Shard,        8-Res,      0, 5, 0, Space,   -1, 01000100010000000000000000
Drop Commando Mk1,      Infantry, Chaos,        Silksteel,  0, 5, 0, Magnets, -1, 01000100010000000100011000
Drop Commando Mk2,      Infantry, Shard,        8-Res,      0, 5, 0, Space,   -1, 01000100010000000100011000
Supply Sub,             Foil,     Supply,       Scout,     10, 0, 0, Super,   -1, 00000000100000000001000000
Submarine Former,       Foil,     Formers,      Scout,      9, 4, 0, Super,   -1, 00100000000000000001000000
Hovertank Superformer,  Hovertank,Formers,      8-Res,      9, 4, 0, EcoEng2, -1, 00000000010010000000001001
SP-88,                  Speeder,  Missile,      3-Res,      0, 3, 0, DocAir,  -1, 00000000000000000000101000

Also, I realized that there is a good reason to start the AI-only games on transcend level. If you start at the Librarian (say), then some of the factions might not get two Colony Pods. At transcend, AFAIK, all factions begin with two CPs.
 
Interesting ideas Petek. I saw several differences from the "vanilla" units, as follows:
  • Formers and Probe Team upgraded to Speeder
  • Sealurk upgraded to Cruiser
  • Battle Ogre MK3 is missing (!)
  • Fungal Tower is Gravship, instead of Infantry; has Heavy Artillery and AAA Tracking (what effect does this have?)
  • Alien Artifact has Psi defense and Hypnotic Trance (interesting...wouldn't a tech-based defense make more sense?)
  • As noted, standard Formers require no tech
  • Multiple units have Amphibious Pods added (to prevent land units from getting stuck?)
  • Unity Foil is now a submarine
  • Sea Escape Pod is now a slow unit and a submersible

It looks like most of the new units are either combat units of different kinds, or units similar to those in my version of alphax.txt. The Submarine Supply and Formers are interesting, though.
Any specific units you'd recommend adding to this test?


On a different note - if you look at the SMAX units.pcx, you'll notice that there's three different versions of an Alien Artifact. Any idea how to use types 2 and 3? I think it'd be interesting to have different variants, perhaps with different defensive capabilities or special abilities.
 
Back
Top Bottom