Page 1 of 1

Can scripts detect which empires are AI-controlled?

Posted: Sun Jan 13, 2019 6:20 am
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.

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

Posted: Sun Jan 20, 2019 3:09 pm
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?

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

Posted: Sun Jan 20, 2019 6:19 pm
by Morlic

Code: Select all

Not Human
should work, I suppose.

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

Posted: Sun Jan 20, 2019 8:47 pm
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.

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

Posted: Wed Jan 23, 2019 4:30 pm
by Vezzra
Oops, I stand corrected... ;)