Can scripts detect which empires are AI-controlled?

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

Post Reply
Message
Author
Telos
Space Squid
Posts: 50
Joined: Thu May 09, 2013 4:46 am

Can scripts detect which empires are AI-controlled?

#1 Post by Telos »

Can scripts detect which empires are AI-controlled?

I know that many folks around here have been motivated by a design philosophy that is averse to letting the AI "cheat" in any way. An idealistic part of me shares that sentiment, but another part of me is much more pragmatic, and recognizes that getting good AI design on a volunteer project can take a long time, and that some "AI cheats" can make the game more flavorful or challenging for players without needing to load anything more onto our over-worked AI coders, so the pragmatic part of me is willing to temporarily give the AI some cheats, ideally to be dispensed with if AI programmers ever get around to making the AI do things better.

For example, I've been toying with making organic ships grow faster at yellowish stars and slower in deep space, which I think could be a fun flavorful experience for human players who might enjoy growing themselves some big organic ships. But I don't think the AI will be any good at exploiting that system any time soon, so I'd be strongly tempted to just let the AI play by a simpler set of rules that gives them a flat growth rate comparable to what good human players will get, without their needing to be smart enough to figure out which stars to park their ships at. For me, at least, this seems like a reasonable amount of "cheating" to allow the AI, at least until we someday have programmers who want to make the AI smart enough to handle such choices itself.

Similarly, I've been toying with the idea of more flavorfully distinguishing different classes of ships by giving them different healing mechanisms, rather than having them all just go back to the same drydock. But I think the AI is currently hard-coded to think of dry-docks as the healing place, and I doubt that will change any time soon, so if I did make these changes, I'd be tempted to also script in a temporary "cheat" allowing AI's to still use dry docks to repair all ship classes, at least until AI programmers can program it to use other healing mechanisms for some ship-classes.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Can scripts detect which empires are AI-controlled?

#2 Post by Vezzra »

Telos wrote: Sun Jan 13, 2019 6:20 amCan scripts detect which empires are AI-controlled?
AFAIK, no. The player name of AI players could provide that information, but I don't think that's accessible in FOCS either - Geoff, Dilvish?

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

Re: Can scripts detect which empires are AI-controlled?

#3 Post by Morlic »

Code: Select all

Not Human
should work, I suppose.
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
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Can scripts detect which empires are AI-controlled?

#4 Post by Geoff the Medio »

Morlic wrote: Sun Jan 20, 2019 6:19 pm

Code: Select all

Not Human
should work, I suppose.
Yes; should work.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Can scripts detect which empires are AI-controlled?

#5 Post by Vezzra »

Oops, I stand corrected... ;)

Post Reply