Page 2 of 2

Re: Improving the AI - research order?

Posted: Wed Aug 03, 2016 1:08 pm
by Toastmartin
I played some games and tried to write down my tech order. I noticed it changes with my situation in the game just as much as with the species. So it seems to make little sense to write down a fixed order. In most games I dont even research the mass drivers, exept when meeting an early enemy with a production heavy race. That tech order could be so much better, if it was fit to the current game state of the AI: Are your next steps peaceful colonisation, or do you plan to invade something? Are there monsters or enemies you cannot scan? Are you able to hide with the next stealth tech? Are there enougth gas giants in your systems, that orbital generation so early in the tech tree makes sense? And thats probably hard to programm ..

I just wished the AI would pose a more of a challenge for the player. My takeoff-point over the AI's is usually around turn 100, when I absorbed the first AI. At that point I often look at the game meters (research/production/military) and just close the game, because I lead production and research by a factor of 2 and it would take to much clicking to reach a formal win condition despite the AI's not standing a chance.
I think at some point in the game development you will have to think about giving the AI an edge over the player. So why not do that now? At the moment I just skip the first 20 Turns of each of my games. But that feels stupid. Somebody proposed a multiplier for the AI's tech and production points .. you could connect/hide that with/in the difficulty level ..
That would be a nice feature for the release?!

Another piont, but not worth a separate post: Why do I have to resize all the game' internal windows on every startup of free orion? Why does the game not save its last window size/resolution and starts again like that?

Re: Improving the AI - research order?

Posted: Wed Aug 03, 2016 1:29 pm
by MatGB
Toastmartin wrote:I played some games and tried to write down my tech order. I noticed it changes with my situation in the game just as much as with the species. So it seems to make little sense to write down a fixed order. In most games I dont even research the mass drivers, exept when meeting an early enemy with a production heavy race. That tech order could be so much better, if it was fit to the current game state of the AI: Are your next steps peaceful colonisation, or do you plan to invade something? Are there monsters or enemies you cannot scan? Are you able to hide with the next stealth tech? Are there enougth gas giants in your systems, that orbital generation so early in the tech tree makes sense? And thats probably hard to programm ..
Actually, they're working on a dynamic, adaptive system but it won't be ready for this Release (you can turn it on in the game but it's not a good idea currently), so this is very much a "what do we do for this Release to make the current system better" thread not a full "plan for the future" thread.
I just wished the AI would pose a more of a challenge for the player. My takeoff-point over the AI's is usually around turn 100, when I absorbed the first AI. At that point I often look at the game meters (research/production/military) and just close the game, because I lead production and research by a factor of 2 and it would take to much clicking to reach a formal win condition despite the AI's not standing a chance.
See, I broadly agree here, but in a couple recent games the AIs have been the first to take other AI homeworlds (and let's face it it's the homeworld that makes the most difference normally), but without the use of either concentration camp or force/energy structures they don't get the benefit that I personally do at that stage (I try to target getting F/E at roughly turn 100 and prioritise it if I've had several conquests of heavily populated planets).
I think at some point in the game development you will have to think about giving the AI an edge over the player. So why not do that now? At the moment I just skip the first 20 Turns of each of my games. But that feels stupid. Somebody proposed a multiplier for the AI's tech and production points .. you could connect/hide that with/in the difficulty level ..
That would be a nice feature for the release?!
It's too late to add such a big feature without testing, plus I'm instinctively opposed—I'd rather see the AIs form alliances with each other to fight me than to have them be given 'cheats', it's against the basic philosophy of the game and I think if it does become needed we've effectively failed to balance things properly (the planned introduction of Influence will have a major effect on late game balance which might make it easier to sort this, regardless the mid-to-late game tech tree, research bonuses and costs will be adjusted as soon as possible).
Another piont, but not worth a separate post: Why do I have to resize all the game' internal windows on every startup of free orion? Why does the game not save its last window size/resolution and starts again like that?
Your config file should be saving them, but each time you reinstall a new version that'll be overwritten, you need a persistent config file to keep them between installs, there are a few threads on it elsewhere and we probably ought to have a how-to somewhere.

Re: Improving the AI - research order?

Posted: Wed Aug 03, 2016 1:34 pm
by Sloth
Toastmartin wrote:So it seems to make little sense to write down a fixed order. In most games I dont even research the mass drivers, exept when meeting an early enemy with a production heavy race. That tech order could be so much better, if it was fit to the current game state of the AI: Are your next steps peaceful colonisation, or do you plan to invade something? Are there monsters or enemies you cannot scan? Are you able to hide with the next stealth tech? Are there enougth gas giants in your systems, that orbital generation so early in the tech tree makes sense? And thats probably hard to programm ..
The current tech order is not fixed. There are a lot of factors taken into account that give certain techs a higher or lower priority.

Re: Improving the AI - research order?

Posted: Wed Aug 03, 2016 3:33 pm
by AndrewW
MatGB wrote:Your config file should be saving them, but each time you reinstall a new version that'll be overwritten, you need a persistent config file to keep them between installs, there are a few threads on it elsewhere and we probably ought to have a how-to somewhere.
Unless one happens to be a rather old version that doesn't yet include that.

Re: Improving the AI - research order?

Posted: Wed Aug 03, 2016 4:30 pm
by dbenage-cx
http://freeorion.org/index.php/Config.xml gives details on persistent config.

I'd be inclined to bump Adaptive Automation up. This is typically my 3rd goal post (after Subterranean Habitat and Nascent Artificial Intel).
After that: Laser, armor, and one hull type and leave the rest as is, since it may be abandoned post-release.

Re: Improving the AI - research order?

Posted: Wed Aug 03, 2016 6:15 pm
by Morlic
Vezzra wrote:That issue has been opened by Morlic when I asked everyone for stuff that needs to be done for the release. So I'd like to hear from him how important he thinks that particular issue is for the release (and if he can/wants to address it).
The important part of that issue was to make sure (potentially) changed mechanics are reflected by the tech choices and acted as reminder to check on that. I think nothing really major happened so it is nothing too critical.


Still, I think economic techs (especially Adaptive Automation and Symbiotic Biology) are currently researched too late and am currently trying to find a order which reaches those reasonably quick while still being able to (somewhat) defend against player rushes and not get stuck on bad starts...
So, yeah I am going to address it.
Toastmartin wrote: I just wished the AI would pose a more of a challenge for the player.
Great! The next step is to join the AI team and start to improve it. That's how I started...

Re: Improving the AI - research order?

Posted: Wed Aug 03, 2016 6:35 pm
by Toastmartin
MatGB wrote: (and let's face it it's the homeworld that makes the most difference normally)
Nah, thats about half of the bonus. The other half comes from the fact that you can colonize much more planets (in your systems) with another species and cherrypick pilot or troop traits.
Morlic wrote:Great! The next step is to join the AI team and start to improve it. That's how I started...
Thanks but I dont have any background in that, I should rather fishish my thesis, and when my children are sleeping and I can play a round of FO, my brain barely has the capacity for just that. Just out of couriosity .. how does the AI work at the moment? Are there sripts or something I could read??

Re: Improving the AI - research order?

Posted: Wed Aug 03, 2016 6:45 pm
by Morlic
The AI is written in Python. The scripts are located in /default/python/AI.

The complexity and readability differs greatly between different files tho. The aftermath of probably several authors that didn't really care too much for documenting and style guides. But stuff keeps getting cleaner and cleaner.

Re: Improving the AI - research order?

Posted: Wed Aug 03, 2016 11:33 pm
by MatGB
Toastmartin wrote: Nah, thats about half of the bonus. The other half comes from the fact that you can colonize much more planets (in your systems) with another species and cherrypick pilot or troop traits.
That's the strategic bonus, certainly, but in terms of immediate benefit a homeworld has research and production targets at 20+ on the turn you take it, having it get to those numbers quickly (then keep going to fairly high) is a substantial advantage, which is where force/energy really helps. Newly built colonies expand gradually and until/unless you get a new boost tech their growth tends to keep up with population (as it should do) whereas a conquered world already has a high population and +1 per turn when the target is 100 just doesn't cut it.
Just out of couriosity .. how does the AI work at the moment? Are there sripts or something I could read??
You need to be able to read Python to grok the AI scripts, I just about manage it but it still confuses me more often than there's clarity. The content scripts are dead easy though, especially if you spend most of your time slightly adjusting numbers as I do ;-)

Re: Improving the AI - research order?

Posted: Thu Aug 04, 2016 5:55 pm
by defaultuser
dbenage-cx wrote:http://freeorion.org/index.php/Config.xml gives details on persistent config.

I'd be inclined to bump Adaptive Automation up. This is typically my 3rd goal post (after Subterranean Habitat and Nascent Artificial Intel).
After that: Laser, armor, and one hull type and leave the rest as is, since it may be abandoned post-release.
The Adaptive Automation path brings in Nascent AI, so I just start with AA then slide NAI up one slot in the order. Whether I start AA before the Growth ones depends on what the early scouting is returning. If I find worlds that I can colonize either out of the gate or with Planetary Ecology, then I might wait on Sub Hab for a bit. The flat per every world nature of AA and NAI make them so attractive. Additionally, a poor area/species combo might make getting exobots early a goal, so again AA needs to be researched quickly.