Author Topic: make AI play itself?  (Read 1367 times)

0 Members and 1 Guest are viewing this topic.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
make AI play itself?
« on: September 21, 2018, 12:06:39 AM »
How do I get all 7 factions to be played by the AI?  Also, is it possible to do this without hitting Turn Complete, to just have the thing run by itself to completion?

It may seem weird that someone with as much modding experience as myself, doesn't know how to do this.  But automated AI testing was never previously necessary or important to my work.  I had to calibrate how the game played from the perspective of a human player.  Does it spread as well as I spread, to give me a challenge?  So I played a lot of test games manually, eventually activating the Scenario Editor to see how well the AIs did in the meantime.

Now though, I'm just trying to diagnose the possible imbalance / weakness of a few factions.  I need to put them through the early game to see if they expand properly and get clobbered or not.  I don't need - or indeed at this point, even want - to be playing these games.

I think someone actually answered this question in an unrelated thread the other week, but damned if I remember the thread, or what was said.  I didn't strictly "need to know" at the time.  Searching the web, or this site, for the answer has not been productive.
« Last Edit: September 21, 2018, 12:24:54 AM by bvanevery »

Offline Vidsek

Re: make AI play itself?
« Reply #1 on: September 21, 2018, 12:49:49 AM »
  I'll take a look at this.  I think there is a way in the Scenario editor.
All this talk of fungus and worms makes me hungry...

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: make AI play itself?
« Reply #2 on: September 21, 2018, 01:02:26 AM »
So far with the Scenario Editor I seem to be stuck on having 1 faction that is under my control, not the AI.

A less than desirable workaround is to eliminate the faction under my control.  Then I have a game with 6 AIs playing each other.  I do not see any obvious way to add a faction back into the game once I've eliminated it, nor to assign it to an AI.

Even doing it this way, I have to hit Turn Complete all the time, and also I have to hit OK for various dialog boxes that spring up.

« Last Edit: September 21, 2018, 01:37:49 AM by bvanevery »

Offline Geo

Re: make AI play itself?
« Reply #3 on: September 21, 2018, 03:38:21 AM »
The popup dialog boxes can be disabled to show I think. But for the "end turn" action you'd need to tape down the "enter" key.

Offline Vidsek

Re: make AI play itself?
« Reply #4 on: September 21, 2018, 04:13:14 AM »
            Ok, when I tried this through the Scenario Editor, I found you can get all the factions under the AI by switching to a different faction than the one you are playing (you can then switch back to that one and still have it under the AI).
  However, so far I only get to watch that one faction.  I remember seeing an option somewhere in the editor to play each faction every turn.   I'll check what I can work out with that.

   Um, if you still have to hit Enter each turn (and for each faction), what exactly is the problem with weighting down that key?  I've seen posts by players that have done exactly that.

  More as soon as I get a moment to play with this further.
All this talk of fungus and worms makes me hungry...

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: make AI play itself?
« Reply #5 on: September 21, 2018, 04:22:20 AM »
   Um, if you still have to hit Enter each turn (and for each faction), what exactly is the problem with weighting down that key?  I've seen posts by players that have done exactly that.

The problem is it's a stupid thing to have to do.  But oh well.  I will go build me a custom "key depressor" for my laptop.

I will try your switch, switch back method.

It is not possible to disable popups about factions researching techs.  I now have all notification preferences turned off.  There may yet be other events that one simply has to be bothered about.  Hopefully hitting ENTER is the correct response for all of them.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: make AI play itself?
« Reply #6 on: September 21, 2018, 05:35:32 AM »
I think I now have a cookbook for how to make the AI play itself:

- start a game
- select MENU.. GAME.. Preferences...
  select "Pause at end of turn."
- play the 1st turn of your faction, so that it is not behind a turn.
- select MENU.. SCENARIO.. Activate Scenario Editor
  answer YES, OK.  The entire map is revealed.
- select MENU.. SCENARIO.. Switch Sides/Set View...
- choose a side different than the one you're playing and hit OK.
- you are asked, "Take control of TheFaction?"  Answer, "No (watch computer player)" and hit OK.
- hold down the ENTER key to select TURN COMPLETE over and over again, for as long as you want the game to play.
- you can select MENU.. SCENARIO.. Omniscient View if you want to see the whole map.  The game will run faster if you're only viewing what your faction sees though.
- if you are viewing a faction that is permanently eradicated (i.e. doesn't escape in an escape pod), the game will end and you won't get any prompts for continuing it.  If you want the game to keep going, you need to switch to a winning / viable faction before that happens.

I did run into a case where AI control of a faction was lost and reverted to me somehow.  It was the Believers in late game when they were steamrollering everyone.  Might have had something to do with their turn lengths getting longer.  I was stuck in a situation where hitting ENTER simply caused a city menu to pop up and close over and over again.  I solved it by switching my view to a different faction.

Offline Vidsek

Re: make AI play itself?
« Reply #7 on: September 22, 2018, 01:44:05 AM »
    Yes, that looks like what I discovered exactly.  I'm still looking for a way to watch *all* the factions as each moves.  This would be mainly for if you needed to see some details that might explain why an event or choice happened, since it would certainly slow down the progression of the game.

   Edit: Oh, wait, if you keep the omniscient view, your screen does jump to the actions of other factions, right?  I guess that solves what I was saying above ;)
All this talk of fungus and worms makes me hungry...

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: make AI play itself?
« Reply #8 on: September 22, 2018, 04:02:13 AM »
Yes, basically you hit "Y" for omniscient view.

Preliminary results of my testing are that Passive personality is to be abolished, and almost everyone must have Explore as part of their research foci.  It doesn't seem to just be about which techs you get, it seems to trigger different AI game behavior.  For instance, the play of the Believers seemed to improve substantially when I changed them from just Conquer to Explore, Conquer.  Explore really means "colonization and growth" internally, it is misnamed.  In short I've come full circle on SMACX AI Growth mod, I'm going back to the basic principles that originally started the whole thing.  I'm not ironclad sure about my testing, but I think I see enough in front of me to make the changes.

Last thing I'm testing is whether the University needs Explore, Discover as well.  I'm already set on changing the Consciousness to that, but I've wondered if the University with its bigger RESEARCH bonus, would be ok.  I had a run where I thought, seemingly not!  They didn't expand, 2 factions near them did, so they got the short end of the stick.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: make AI play itself?
« Reply #9 on: September 23, 2018, 04:34:31 AM »
Preliminary tests were wrong.  Passive does have its uses.  It has no influence on whether a faction will do well or poorly on the battlefield.  It can keep a faction out of early wars, when the faction's characteristics are better suited to building up before trying to take anyone out.

The main problem I'm having is my version of the University is weak.  All testing with all combos of research foci say so.  Even though my version of the University doesn't have the "unhappiness every 4 citizens" penalty.  It seems that +2 RESEARCH just really isn't that much of an advantage on Transcend.  I think all the other factions are getting a lot of RESEARCH bonuses somehow anyways.  So I've gotta toughen up the University somehow.  Haven't thought of how yet.


Offline Vidsek

Re: make AI play itself?
« Reply #10 on: September 23, 2018, 07:33:32 AM »
    In my current game test Zak's gang did very well for the first 15 or 20 turns, then stagnated.  They have slowly picked back up, but are growing/developing at a much lower rate than others.  Even the Cult, least "builder" of the factions involved, has grown (slightly) faster. 

   I too found this odd, and am studying my numerous saves to try to find the cause(s).

   I agree that Passive vs. Erratic does not seem to be the issue.
All this talk of fungus and worms makes me hungry...

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: make AI play itself?
« Reply #11 on: September 23, 2018, 08:51:02 AM »
I've decided to give Zak free BIOLOGY LABS at every base too.  It helps.  Not certain if it's a cure but it helps.

Much is depending on whether someone starts next to the Spartans.  They slaughter nearly anyone next to them.  I should probably put them up against the Usurpers to see who is the baddest one of all.  I might have to bring one of the traditional Spartan penalties back.  On the other hand, the Spartans may be systemically necessary "as is", as a counterweight to other factions sweeping the board.

Zak does well if he gets to start in isolation, or if he starts next to someone Passive.  I tried the Peacekeepers as Passive for a bit.  Although that greatly helped Zak, it sure didn't help the Peacekeepers when they ended up next to someone more violent!  So I put them back to Erratic, which makes them very likely to attack Zak.

I've done a lot of juggling.  I hope I have a final verdict on all of it tomorrow.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: make AI play itself?
« Reply #12 on: October 03, 2018, 06:40:29 PM »
Zak did indeed get to keep his new labs.  They appeared in version 1.20 of my mod.

I've realized a consequence of the "pennies and duct tape weight on Enter" method of making the game play itself.  I cannot multitask with my laptop when running an AI test!  It monopolizes the whole laptop.  Oh well.  Just thought I'd mention, this puts a limit on how much AI vs. AI testing I'll end up doing in the real world.  Like I'm at the library right now, with access to wifi, thinking should I just kick version 1.21 of my mod out the door, without formally testing it?  But I can't test and do wifi stuff.  I think I will run at least 1 test, so that'll have to wait until I'm at a picnic table and cooking lunch.  Back to the library later for release.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: make AI play itself?
« Reply #13 on: November 10, 2018, 10:36:09 PM »
Someone on CivFanatics told me that the Scenario Generator can be used to make a Scenario where you can watch all factions play each other.  I haven't tried this, and it remains to be seen when I will, since my 1.25 mod release is not begging for more changes.  Maybe there is a bit more setup overhead involved, I don't know.  But it's an interesting possibility, especially if it can be done without having to leave a weight on one's ENTER key!  It would be good to have something run in the background instead of needing machine hogging babysitting.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

I don't know but I've been told
(I don't know but I been told)
Deirdre's got a Network Node
(Deirdre's got a Network Node)
Likes to press the on-off switch
(Likes to press the on-off switch)
Dig that crazy Gaian witch!
(Dig that crazy Gaian witch!)
~Spartan! Barracks! March! (Yes sir!)

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 37.

[Show Queries]