New AI ship design system

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

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.
Message
Author
User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

New AI ship design system

#1 Post by MatGB »

I did a double take the first time I got a sitrep telling me a design I'd never heard of had arrived in a system and killed my scout. Problem tho:
warship-names.jpg
warship-names.jpg (14.34 KiB) Viewed 1381 times
I know based on map knowledge that that's an Eaxaw ship so I need to be careful and invade quickly. But that's not a nice way to display things.

Can either/both of shortening the design names and displaying the actual ship names instead of just the design name happen?
Mat Bowles

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

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: New AI ship design system

#2 Post by adrian_broher »

Just to clear this up:

Do you have a problem with the representation of the name or with the generated name itself?
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: New AI ship design system

#3 Post by MatGB »

My biggest problem is the text overlap obscuring important details. I'd prefer the name to be shorter for general use, especially Sitreps, but making important UI info impossible to see is a Bad Thing, if a second line or similar were introduced that would be fine by me but I'd prefer shorter names as well.
Mat Bowles

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

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: New AI ship design system

#4 Post by Dilvish »

Yes, that was bugging me too. Taking inspiration from european car origin stickers, I just put in a quick change to abbreviate the empire name to just first and last initial (uppercase). Seems to fit fine with the default FleetWnd, and retains the empire specificity.
ai_design_names.png
ai_design_names.png (25.47 KiB) Viewed 1370 times
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: New AI ship design system

#5 Post by MatGB »

That's better, can see what's going on.

Going to miss having a report of a Bolo or an Atlas turning up and knowing exactly how worried I need to be though, I'm guessing each empire is designing on the fly based on its best tech? Kinda nice to see Flux hulls carrying troopers, and by nice I mean threatening, naturally...
Mat Bowles

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

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: New AI ship design system

#6 Post by Geoff the Medio »

Dilvish wrote:Taking inspiration from european car origin stickers, I just put in a quick change to abbreviate the empire name to just first and last initial (uppercase).
That doesn't seem obvious to me... I suspect many people will not know what the initials refer to unless told.

Is the ship name being hidden due to visibility limitations, making the design name be shown instead, or is that actually the ship's name? If the latter, perhaps they could be given autogenerated shorter names if the AI script doesn't want to come up with a unique name? If the design name is being shown, that seems redundant and unnecessary since it's already visible to the right.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: New AI ship design system

#7 Post by MatGB »

It is my understanding that the shipname is hidden due to visibility issues and every single ship is given a name on creation in the same way human ships are, however a) my understanding may be wrong and b) I've never known why it's done that way and don't really like it much.
Mat Bowles

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

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: New AI ship design system

#8 Post by Dilvish »

Geoff the Medio wrote:That doesn't seem obvious to me... I suspect many people will not know what the initials refer to unless told.
I am thinking people don't really need to know what the intitials stand for (though they might enjoy figuring it out). It seems to me the only purpose is make sure the player doesn't wind up observing seven different warships designs (from 7 different empires) each named "Warship Mk 3" but actually different from each other. At least with this, the player should be on notice that a "JG Warship Mk 3" might very well be different than a "FN Warship Mk 3", and that's all that really matters. Unless the names drove people crazy for one of those weird quirky human reasons, but that doesn't seem likely to me.

But, if you have other suggestions for the empire-specific prefix, certainly propose them.

I would like to wind up being able to shift back to something that also uses the fanciful names of increasing ferocity as their rating increases, but we would still want some kind of empire-specific prefix.

**edit this initials approach does allow for some chance of two different empires in the game having the same initials, but that should be fairly rare and again, the player should at least be on notice by that time that different empires may have different designs for "blah Warship Mk 3"
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: New AI ship design system

#9 Post by Kassiopeija »

the line shows:
"JG Warship MK.II (Human) JG Warship MK.II"

what's the point in showing the "JG Warship MK.II" two times?

If you'd only show it for 1 time then you could still use the full name and retain all visibility in the first screenshot....

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: New AI ship design system

#10 Post by Morlic »

The AI ships do indeed have the "usual" ship names as you can see when observing an AI multiplayer game. However, Ship::PublicName() simply returns the design name for the other empires. Generally, this behaviour seems perfectly fair for many purposes.
So maybe we simply add

Code: Select all

        if (design_name == ship_name)
            m_ship_name_text->SetText("");
to ShipDataPanel::Refresh()? It does indeed seem completely redundant to display the same information twice in the UI.


About the AI names: The current approach is definitely only provisional, don't be afraid. Cj mentioned he had some ideas for this so I didn't spend too much effort on this (who would have thought when reading these names only a genius could have come up with?). I might code up some slight improvement to the current system today for use until Cj has some better idea.
About the empire name: Dilvish figured out my intention correctly. Having different designs from different AIs with same name is the main problem that was adressed by this. I think if we want to abbreviate the names, a somewhat more comprehensible approach could be to use the first n letters of the empire name instead?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: New AI ship design system

#11 Post by Morlic »

Morlic wrote: About the AI names: The current approach is definitely only provisional, don't be afraid. Cj mentioned he had some ideas for this so I didn't spend too much effort on this (who would have thought when reading these names only a genius could have come up with?). I might code up some slight improvement to the current system today for use until Cj has some better idea.
I opened a pull request which implements a naming system similar to the old one: "Warship" is changed to a name based loosely on the strength of a design and based on greek mythology (i.e. in general not like before to avoid confusion about different configurations).


If you have naming suggestions for any kind of ship type (be it single names, themes or whatever), now probably is the best time for it.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: New AI ship design system

#12 Post by MatGB »

If I'm reading it right, I definitely like the idea, but it would be better if as much as possible of the names went into the stringtable rather than the Python. Definitely like the look of all this overall, even if it will take time to get used to.
Mat Bowles

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

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: New AI ship design system

#13 Post by Morlic »

You are right, I added some stringtable support.

Note though that due to the implementation simply adding more names to the list will not make them show up in the game without changing the AI code accordingly, so changing the names is pretty much all it does at the moment.
I see no easy alternative to this right now (as the rating progression throughout the game seems somewhat hard to estimate automatically as it is definitely not a trivial function in the general case).
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: New AI ship design system

#14 Post by Dilvish »

Morlic wrote:I see no easy alternative to this right now (as the rating progression throughout the game seems somewhat hard to estimate automatically as it is definitely not a trivial function in the general case).
We could put the ratings into a similar list in the stringtable, and to facilitate a player assessing when they might want to add/change the list of ratings, we could augment the AI log a bit. The AI prints identifies its best designs in the log each turn, and for the warships we could have it include the nominal rating used for categorizing them.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: New AI ship design system

#15 Post by MatGB »

To observations, I'm seeing one empire using Bolo class Robotic hulls, I take it then the AI still uses old style designs if they're the most appropriate?

Also, I'm up against an AI that's actually using the Death Rays it got from an Ancient Ruins. That's a change, not sure I like the change (although it's definitely a good one).

New Greek naming scheme working well as far as I can see, definite improvement.
Mat Bowles

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

Post Reply