FreeOrion

Forums for the FreeOrion project
It is currently Thu Nov 23, 2017 7:38 am

All times are UTC


Forum rules


Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.



Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed Aug 02, 2017 7:23 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 199
I'll explain the functionality that Dilvish is referring to below. It works correctly for me. It may also work for you.

If it does not work for you, please post config files, log files and a save game to this issue. I posted the issue, but the functionality has always worked for me, so I have no test case.

The command lines are for linux. Translate them to the correct equivalents in windows.

Type
Code:
./freeorion --auto-advance-n-turns 10 --auto-quit --quickstart
and the game will quickstart a game based on the game setup in your "config.xml" or "persistent_config.xml", run 10 turns and exit. If you have auto save configured, then you will also have saved game files.
Type
Code:
./freeorion --auto-advance-n-turns 10 --auto-quit --load ~/.local/share/freeorion/save/test.sav
and it will load test.sav, assuming test.sav was saved with the same game version, run 10 turns and exit.

Instructions to setup "persistent_config.xml" are here

Here is an example "persistent_config.xml" that will, start a game with 5 AIs, with 5 different aggression settings and produce auto saves of the 20 most recent turns.
Code:
<?xml version="1.0"?>
<XMLDoc>
  <GameSetup>
    <ai-aggression>AGGRESSIVE</ai-aggression>
    <ai-players>4</ai-players>
    <empire-color>13</empire-color>
    <empire-name>A1 Test Corp</empire-name>
    <galaxy-age>GALAXY_SETUP_RANDOM</galaxy-age>
    <monster-frequency>GALAXY_SETUP_HIGH</monster-frequency>
    <native-frequency>GALAXY_SETUP_MEDIUM</native-frequency>
    <galaxy-shape>ELLIPTICAL</galaxy-shape>
    <planet-density>GALAXY_SETUP_HIGH</planet-density>
    <player-name>Test Player</player-name>
    <seed>check 1</seed>
    <specials-frequency>GALAXY_SETUP_LOW</specials-frequency>
    <starlane-frequency>GALAXY_SETUP_MEDIUM</starlane-frequency>
    <stars>167</stars>
    <starting-species>RANDOM</starting-species>
  </GameSetup>
  <AI>
    <config>
      <trait>
        <aggression>
          <force>1</force>
          <AI_0>5</AI_0>
          <AI_1>4</AI_1>
          <AI_2>3</AI_2>
          <AI_3>2</AI_3>
          <AI_4>1</AI_4>
          <AI_5>0</AI_5>
        </aggression>
      </trait>
    </config>
  </AI>
  <autosave>
    <limit>20</limit>
    <multiplayer>1</multiplayer>
    <single-player>1</single-player>
    <turns>1</turns>
  </autosave>
</XMLDoc>


Adjust as you see fit.

The typical problem is that at some point one of the AIs will kill your empire. If you save a game, after you convert your homeworld to SuperTesters then that will buy your completely passive empire some additional time.

Have fun.


Top
 Profile  
 
PostPosted: Thu Aug 03, 2017 10:27 pm 
Offline
Dyson Forest
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 215
Very nice!
So, LGM-Doyle, it is mandatory to have a human player, right?
If there is no easy way to assign an AI to control the human player or to completely remove the need for the human player (I think that "blank space" in the galaxy could give some advantage to the immediate neighbours over the rest), I'll use an ad-hoc race with absurd planetary stealth.
I will also need to mess with the code to produce the intended log that would feed the fitness function of the evolutionary optimisation algorithm (@Dilvish, that's exactly what I had in mind since it's my area of expertise at my job and I could addapt the sources I already have with little effort).
Well, at least once I get time to mess with this, which doesn't seem to happen any time soon, I have ahead a shitty summer with plenty of delayed work.


Top
 Profile  
 
PostPosted: Fri Aug 04, 2017 3:59 am 
Online
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3265
Multi player can be set so you're an observer and just have the AIs play each other.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Fri Aug 04, 2017 5:54 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 199
Oberlus, the Super Testers might be the species that you are looking for.

Currently the "--load" option from the command line only works with single player games. However, as MatGB described you could setup a multi-player game as an observer or moderator, save it and then re-load it while forcing the AIs to have different aggressions and let the AIs play against themselves.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group