Distant Worlds AI

Distant Worlds is a vast, pausable real-time, 4X space strategy game which models a "living galaxy" with incredible options for replayability and customizability. Experience the full depth and detail of large turn-based strategy games, but with the simplicity and ease of real-time, and on the scale of a massively-multiplayer online game. Now greatly enhanced with the new Universe release, which includes all four previous releases as well as the new Universe expansion!

Moderators: Icemania, elliotg

Gregorovitch55
Posts: 191
Joined: Tue Feb 11, 2014 10:36 am

RE: Distant Worlds AI

Post by Gregorovitch55 »

FWIW a few comments on what IMO are examples of an epic fail and and a pretty good system for AI ship design.

SotS2 failed badly at this and is one reason I stopped playing it. Two main reasons leap out as to why. Firstly there are a lot of race specific techs in that game which means there also have to be race specific build plans (templates if you will). The problem is once the player figures out how to counter a particular race's basic build plans it's too easy to kill their ships. The second reason is the random element in research which simply denies a faction access to a particular technology (for example shields) randomly on a per game basis. This obviously plays merry hell with the AI's ship design plans and from what I could see it had no fallback strategies to speak of and simply sat on it's hands doing nothing upgrade wise - again easy peasy to kill them.

I think the moral is that anything that enriches and particularly diversifies the game environment is unfortunately the enemy of successful AI ship design algorithms.

The GalCiv2 was/is IMO very good at dynamic ship design in response to both AI and human players. of course GalCiv's system is very simple, but in this context that is it's strength. From what i could see what it did was use three factors to calculate if it needed to either redesign it's ships or undertake further specific research before taking on (or defend against) a particular faction: fleet size limit, opponent's main weapons strength vs it's corresponding defense strength, it's main weapon strength vs opponents corresponding defense strength. From these numbers it calculates whether it can or cannot defeat a full size enemy fleet on current designs, or if not if it could on redesign within its current tech levels. If those numbers show it still can't, then it will slam it's production and social sliders as far left as it can and shove it's research slider far right so it can rush the required weapon and defense techs to change the numbers so it can defeat the target faction's full size stack with it's own full size stack. There is still a curved ball in that ships accumulate both offense and defense capability with experience, but that cuts both ways.

As far as I can see most races in GalCiv do have basic ship design plans (or templates) that they always seem tho start with and persist with until something comes along that can trounce them, but after that they alter dynamically based on circumstance.

A lot of this is not applicable to DW of course (e.g. fleet size limits) but I think the moral is that this ability to crunch the numbers and translate them into a competitive ship design against a specific opponent, factoring additional research if necessary, on the fly is crucial to generating those "Oh Sh*t" moments you get in GalCiv when your missiles are suddenly next to useless against a pile of point defense and some relatively modest looking mass drivers are ripping your ships to pieces 'cos your shields are useless against them.
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Okay I've just watched the AI Research on full automatic in Pre-Warp.

I'm in shock right now so please excuse me for a moment ... [puts head under the water and screams]

I had to turn it off after 4 years because my Laptop was close to getting thrown through a window. I just can't watch that **** again.

Okay.

Constructive mode ... ON. Stick to the facts.

Wow.

1. The AI builds a Medium Spaceport and Energy Research Lab and then stopped. It's running at about 40% of research potential and does absolutely nothing to fix it.

2. 19 Energy Research Projects were finished and not one of them was Warp Field Precursors because the AI has not found the Pre-Warp Ruins yet (Explorer AI should prioritise ruins). Otherwise to provide a positive the build order was okay.

Shields
Energy Collection
Space Construction
Proton Ionization
Advanced Nuclear Fission
Enhanced Construction
Fusion Ignition
Enhanced Shields
Enhanced Engines
Accelerated Construction
Shield Reinforcement
Accelerated Shield Recharge
Component Prefabrication
Intensified Shield Strength
High Volume Thrust
Efficient Energy Conversion
Damage Control
High Storage Capacitors
Maximised Thrust Output

3. The Construction Ships built a Mining Station ... after 3.5 years!

4. With 3 HighTech Labs the AI decides to research Colonisation. Good idea!

Transport Systems
Colonisation
Proximity Sensors
Target Tracking
Countermeasures
Long Range Scanners
Enhanced Countermeasures
Continental Colonisation

5. Quameno Race files say they are meant to focus on Beams and Torpedoes. Only two of the first 13 Weapons Technologies were in this group. No mid-tier weapons yet. 3 Weapons Labs.

Improved Assault Tactics
Gravitic Weapons
Enhanced Missiles
Star Fighters
Area Weapons
Armor Plating
Improved Defence Tactics
Energy Torpedo
Enhanced Beam Weapons
Enhanced Gravitic Beams
Point Defense Weapons
Light Interceptors
Planetary Defence Units

WTF!
SirFinbar
Posts: 33
Joined: Tue Jun 03, 2014 9:25 am

RE: Distant Worlds AI

Post by SirFinbar »

Well that settles it, I won't be playing pre-warp again.

On my new game I'm leaving tax automated to default settings, as that's what I assume the AI uses. It's just too unfair otherwise.

EDIT: Also I'm new here. Thanks to Spidey; I've read a number of your very informative posts, helped me with a couple different things. [;)]
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

I don't know why we should consider modding the Empire Policy or Ship Design files because the problems are more fundamental than what we can change.

We need a patch that fixes AI explorer ruins prioritisation, AI research capacity, AI research order and the AI needs to actually follow the Tech Focus set in the Policy Files.
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Welcome to the boards SirFinbar!

Where are my manners ... sorry a bit distracted!
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Okay I've narrowed down one problem. I thought full automatic meant full automatic but it doesn't ... you need to ensure "Newly built ships are automated" is checked. The observations are all still valid except ship movements. EDIT: Post updated above.
User avatar
Wanabe
Posts: 30
Joined: Sun Jun 01, 2014 3:33 am
Location: New Zealand

RE: Distant Worlds AI

Post by Wanabe »

Yeah I've also been watching the AI a bit here and there over the last few days while I've been working on my design templates.

I've noticed the issue of it refusing to put some research labs down, it seems like it has a large weight towards putting them down at research bonus locations but if it can't find any it extremely often doesn't build any at the homeworld.

Civilian mining ships sometimes sit around at base a bit too much even if they have enough fuel to travel to a mining spot and back.

AI will also try to build space ports/defenses on planets that are completely surrounded by their enemy when they have no hope in hell completing the project which wastes a bit of money aswell.

I wonder if there would be a downside for a rule of the AI to not recruit any troops on planets until it encounters its first non-pirate empire, wouldn't help a lot (if it actually would help) but relatively simple to add depending on how the game keeps track of what empires are known to each empire.

The investigations every one is doing is very good I think. Keep it up! :)
Bingeling
Posts: 5186
Joined: Thu Aug 12, 2010 11:42 am

RE: Distant Worlds AI

Post by Bingeling »

Icemania:

I have never seen it have issues with exploring the ruin required. They get out of space after all. I have seen them build two research stations, at least, but not always two energy.

The exploration for the ruin, though, is not a "zoom to the ruin" that the human player can do, it is a natural exploration order inside out or similar. How long it takes to find depends on the star system and on lot of random stuff.

If you watch the AI a lot, you learn that it does a lot of stupid things, and that it does not learn from its mistakes. Do you ever have pirates attack your colony with similar fleets and fail again and again? That is stupid AI, for instance. Did you win? A complete AI failure, they were many against one.

You appear a hardcore mini-maxer in this game, how do you expect the AI to compete?

You may scoff at everything the AI does, but I am a bit satisfied when a lot of glaring AI errors does not happen (at least not frequently) anymore, because I have reported it, and it was fixed. You may be depressed at 1 energy research station, I am happy there is one, because there was a time without even that.
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

ORIGINAL: Bingeling

Icemania:

I have never seen it have issues with exploring the ruin required. They get out of space after all. I have seen them build two research stations, at least, but not always two energy.

The exploration for the ruin, though, is not a "zoom to the ruin" that the human player can do, it is a natural exploration order inside out or similar. How long it takes to find depends on the star system and on lot of random stuff.

If you watch the AI a lot, you learn that it does a lot of stupid things, and that it does not learn from its mistakes. Do you ever have pirates attack your colony with similar fleets and fail again and again? That is stupid AI, for instance. Did you win? A complete AI failure, they were many against one.

You appear a hardcore mini-maxer in this game, how do you expect the AI to compete?

You may scoff at everything the AI does, but I am a bit satisfied when a lot of glaring AI errors does not happen (at least not frequently) anymore, because I have reported it, and it was fixed. You may be depressed at 1 energy research station, I am happy there is one, because there was a time without even that.
Please don't misunderstand ... I don't expect the AI to compete ... but I do expect the AI to implement the really really basic stuff. It would be trivial to improve the Explorer AI to go to ruins as a priority.

I just did a repeat and the ruin was found a little earlier and the AI did go straight to Hyperdrive research as you said earlier, so found another positive!

Every other observation is valid and could easily be fixed.

User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Since the AI builds a Medium Spaceport (or Large Spaceport for some settings) and an Energy Research Station at the start of pre-warp change Medium Spaceport from 3, 3 and 3 Labs to 8, 8 and 8 labs. Total would be 8, 14 and 8 labs i.e. 30 labs total. The problem then is overbuilding labs as the game progresses of course as the design files don't allow a homeworld special or equivalent.
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Okay I have repeated the test with the Medium Spaceport change above. The AI has 3 mid-tier weapons with #4 on the way whereas before it had 0 (weapons research is going almost three times faster after all). Same story with High Tech. LargeScale Construction (Size 500) available in Energy. Massive difference. I've updated the base design post earlier with this suggested improvement. Obviously it costs more though so probably worth reducing some other components a bit to compensate in the design so the AI doesn't freak out.

The AI must have a script for the "basics".

So will now delete fighter bays, ion cannons, ion defences, point defences and torpedoes from the design ... keep beams only ... and change the Quameno Race file so it focused on Beams only and not Torpedoes.
User avatar
Spidey
Posts: 455
Joined: Sun Dec 08, 2013 11:39 am

RE: Distant Worlds AI

Post by Spidey »

@ SirFinbar
Happy to be of help. Welcome to the forum. [:)]

@ Ice
How about using player stunts? If players can have fun with labs on mines then why can't the AI? If we're cutting costs by throwing scanners on mines instead of state bases then why can't the AI? And wouldn't this also serve to ensure research capacity without resulting in the AI going bankrupt?
User avatar
Erik Rutins
Posts: 39783
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Distant Worlds AI

Post by Erik Rutins »

Hi Icemania,

ORIGINAL: Icemania
Okay I've just watched the AI Research on full automatic in Pre-Warp.

I'm in shock right now so please excuse me for a moment ... [puts head under the water and screams]

I had to turn it off after 4 years because my Laptop was close to getting thrown through a window. I just can't watch that **** again.

Okay.

Constructive mode ... ON. Stick to the facts.

Wow.

1. The AI builds a Medium Spaceport and Energy Research Lab and then stopped. It's running at about 40% of research potential and does absolutely nothing to fix it.

2. 19 Energy Research Projects were finished and not one of them was Warp Field Precursors because the AI has not found the Pre-Warp Ruins yet (Explorer AI should prioritise ruins). Otherwise to provide a positive the build order was okay.

Shields
Energy Collection
Space Construction
Proton Ionization
Advanced Nuclear Fission
Enhanced Construction
Fusion Ignition
Enhanced Shields
Enhanced Engines
Accelerated Construction
Shield Reinforcement
Accelerated Shield Recharge
Component Prefabrication
Intensified Shield Strength
High Volume Thrust
Efficient Energy Conversion
Damage Control
High Storage Capacitors
Maximised Thrust Output

3. The Construction Ships built a Mining Station ... after 3.5 years!

4. With 3 HighTech Labs the AI decides to research Colonisation. Good idea!

Transport Systems
Colonisation
Proximity Sensors
Target Tracking
Countermeasures
Long Range Scanners
Enhanced Countermeasures
Continental Colonisation

5. Quameno Race files say they are meant to focus on Beams and Torpedoes. Only two of the first 13 Weapons Technologies were in this group. No mid-tier weapons yet. 3 Weapons Labs.

Improved Assault Tactics
Gravitic Weapons
Enhanced Missiles
Star Fighters
Area Weapons
Armor Plating
Improved Defence Tactics
Energy Torpedo
Enhanced Beam Weapons
Enhanced Gravitic Beams
Point Defense Weapons
Light Interceptors
Planetary Defence Units

WTF!

I haven't seen the AI do that poorly since Shadows Alpha before release. I believe you that this happened, but it's clearly not typical or common given that the AI players are regularly getting into the hyperspace era and competing with human players.

I would be very interested in seeing any save files you have for this to try to figure out what happened.

The only instances in Universe where I've seen an AI not get out of its system have had to do with very strong pirates, rather than any exploration or research issues.

With all that said, we are always working on the AI but I see this report not as anything "normal" but some kind of weird corner case that you found.

Regards,

- Erik

Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Similar outcome in this test i.e. 2-3 mid-tier weapons. While the AI didn't research Torpedoes a lot of time was wasted researching other weapons technologies. Tried to set ResearchDesignTechFocus1-6 all to Beams but again similar outcome.

I noticed sometimes the AI will build a small spaceport to start with so probably not a good idea to delete the labs in fact I'll update the design post to go the other way ...
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Erik:

Please try the following settings: Ancient Galaxy Theme, Quameno, Prewarp, Normal Difficulty, No Pirates, Very Cheap Research (everything else default).

I've now repeated this test about 6 times and always stopped at the 4 year mark. Some starts the AI builds a Small Spaceport (presumably due to limited cashflow) which I restart (or bump planet quality a bit in Editor) as I'm looking closely at the Medium to start with.

Warp
Within 4 years I did get out of Warp most times but in 2 tests I did not. If you watch why it's very clearly the Explorer AI when the ruin is at the end of the Explorer AI algorithm in placement. The improvement suggestion here is for the Explorer AI to target ruins first which would help the AI get out of pre-warp a lot faster.

Research
The level of Research completion is very repeatable in every test with fairly minor variations.

The root cause is the Base Designs. If you see my recent posts, increasing the number of labs has vastly improved the AI's performance.

This is also repeatable so please give it a try.

Please have a look at Weapons. I'm trying to give Beams priority in the Empire Policy Files but it's very limited in how much priority is actually given.

User avatar
Erik Rutins
Posts: 39783
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Distant Worlds AI

Post by Erik Rutins »

Thanks, I will give that a try. This won't likely fit in this week's update but if we find anything we'll fix it for next week.
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Erik (and anyone else interested) please refer HERE for a save file.

This includes the modifications I've made to the Medium Spaceport design (more labs in particular) and Empire Policy for Quameno as documented in the posts above.

Notes

1. Warp Field Ruins has not been found yet. Only two Explorers were built and they are focused on extremely low priority targets instead. The Explorer AI should always prioritise Ruins (not just pre-warp but generally).

2. Compare the massively greater amount of research completed due to the Medium Spaceport design change (compared to the post previously with default designs which you can repeat and get similar results). This enables the AI to research at full capacity rather than at a fraction of capacity.

These two changes alone would make a significant difference to AI performance prewarp.

Other Notes

1. Please have a look at the Weapons research. It looks like ResearchTechFocus on beams has a minor effect only. Could this effect be increased?
2. Conditional Logic. I assume this in the too hard basket but refer previous posts e.g. the Explorer example. With Conditional Logic I think it would be possible to fully emulate player designs.
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Erik, any chance Elliot can look at Post 38 with the proposed default Base Design Changes? I'm worried about knock-on effects. Items like more labs and extractors really should be default as they would help everyone's AI experience a little.
User avatar
Erik Rutins
Posts: 39783
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Distant Worlds AI

Post by Erik Rutins »

Hi Icemania,

Don't worry, we've been reading everything and discussing internally. Some AI improvements will already be in this week's update.

Regards,

- Erik
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Icemania
Posts: 1847
Joined: Wed Jun 05, 2013 9:14 am
Location: Australia

RE: Distant Worlds AI

Post by Icemania »

Okay great thanks Erik, looks like I've timed these comments well!

And better develop some more while the patch window is open ... [:)]

My Laptop is safe and no windows were smashed in the making of these e-mails.

Post Reply

Return to “Distant Worlds 1 Series”