FreeOrion

Forums for the FreeOrion project
It is currently Wed Feb 21, 2018 11:14 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: AI Surrender issues
PostPosted: Mon Feb 19, 2018 5:56 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4453
Several months ago, Morlic proposed a PR to allow a near-dead AI to surrender. It would seem in keeping with our vision of the game, a number of players have explicitly requested it, plus it would let us simplify some AI code. We seemed to agree that the AI should surrender after it lost its last actual colony, and that it should gift its last ships and outposts. The big question we did not get resolved, though, was how to decide which empire would receive those gifts. It doesn't really seem that we disagreed, just that we decided we should talk about it more here, but never did. So...

For reference, here are what look to me to be the substantive posts on this remaining issue:
Dilvish wrote:
And just to clarify/expand a bit more on the gifting idea, there are at least a few ways I can think of for the AI to decide which player to decide which player to surrender to. My preference would probably be that when the AI realizes it lost its last colony it checks its sitreps to see which players conquered colonies from it that last turn and then if there were multiple it would choose among them (if it had a Capital colony that was conquered that last turn then whoever got it should probable be the chosen one, otherwise it could be a random choice or eventually based on influence).

Other possible ways could be the the AI to keep track of its major colony (independent of the empire.CapitalID property since that depends on a palace) and then surrender to whoever took that. Or the selection could be based on influence or even totally random regardless of whether that empire even captured a colony from the surrendering one could be OK.

Vezzra wrote:
IMO surrendering to the enemy that conquered the last colony is somewhat problematic. This might, in situations where several empires conquer another one, encourage tactics where everyone tries to isolate one small colony within the portion they conquered, and only finally conquers it once they think all the other empires have wiped out the rest.

Leading to a situation where everyone waits on everyone else. Doesn't sound like fun.

The best approach IMO is the one taking influence into account. However, until that's implemented, how about surrendering to the enemy that took the most colonies (maybe within the last 10-20 turns)?


I agree with Vezzra that Influence, once implemented, should at least be a very significant part of the decision. In the meantime, his proposal to surrender to the enemy that captured the most colonies in the past 10-20 turns sounds totally fine to me.

What say ye?

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
 Post subject: Re: AI Surrender issues
PostPosted: Mon Feb 19, 2018 11:51 am 
Offline
Space Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 407
For now (until FO 0.5) I would do it just random, or anything very very KISS.

To whom the AI surrendered its last ships (and colonies) in GalCiv2 was, IIRC, very elegant and fun for the game: it depended on the personality of the species surrendering and its relations with the remaining species/empires. Thus, a warring species that praise strength in combat, whom you have been tormenting the whole game mercyless, could in the end decide to give you all their remaining assets and nothing to other, more pleasant neighbours even being those in an alliance with the defeated empire. And the opposite could happen too, so that you bring down to its knees an empire and in the last moment it gives all its assets to the empire/s that has better chances against you, just because the people of that defeated empire hate your guts.
As commented by Vezzra, this kind of decision made by an AI will require the influence mechanics and its expected empires/species relationships.

If plain random is too shabby for you:
- Considering a little locational info: Random among the empires with colonies nearby (<N hops).
- Pretending to help balance between empires: Choose the neighbouring (<N hops) empire that has the least military strength.
- Focused on human-AI balance and fun: give it to the human player if it is not the strongest (military strength? PP+RPs per turn?) one in the game and had contact with the human player, otherwise give it to the strongest contacted AI empire.

Also, I wouldn't wait until there are no more colonies of the soon-to-be-defeated empire before surrendering. Make it based on differences on PP+RP per turn, or total population, or number of colonies, or estimated military strength... between the surrendering empire and the strongest one among those that have contacted it, so that an empire surrenders when it has less than say 10% of the colonies of another enemy empire.


Top
 Profile  
 
 Post subject: Re: AI Surrender issues
PostPosted: Mon Feb 19, 2018 4:07 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4453
Oberlus wrote:
For now (until FO 0.5) I would do it just random, or anything very very KISS. ...
Also, I wouldn't wait until there are no more colonies of the soon-to-be-defeated empire before surrendering. Make it based on differences on PP+RP per turn, or total population, or number of colonies, or estimated military strength... between the surrendering empire and the strongest one among those that have contacted it, so that an empire surrenders when it has less than say 10% of the colonies of another enemy empire.


Surrendering while the AI still has one or more actual colonies is something that could make more sense once we have Influence and the AI has stronger diplomatic handling in general, but is not so fitting now, I think. My expectation is to do this near-dead surrender, then work on having the AI be able to make meaningful alliances, and then that alliance code could be extended to consider surrendering/merging before near-death.

Quote:
- Considering a little locational info: Random among the empires with colonies nearby (<N hops).
I agree that would be fine and viable. As an additional tweak for it I think I'd prefer to consider just any empire that the surrendering AI had actually had contact with (it may not have a very good idea who is really still within N-hops anyways).

Quote:
- Pretending to help balance between empires: Choose the neighbouring (<N hops) empire that has the least military strength.
- Focused on human-AI balance and fun: give it to the human player if it is not the strongest (military strength? PP+RPs per turn?) one in the game and had contact with the human player, otherwise give it to the strongest contacted AI empire.


I think a sort of combination of these would be my favorite-- Surrender to the second-strongest empire that the AI has had contact with (making no distinction between human player or AI, although that's perhaps not a formal rule of ours, it is an informal rule of mine). I would base strength on PP + 2*RP, which I think more fairly represents the scarcity and value of research points.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
 Post subject: Re: AI Surrender issues
PostPosted: Mon Feb 19, 2018 6:03 pm 
Online
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 229
How about we go for the simplest approach for the first implementation (and possibly 0.4.8) - simply eliminate the empire and remove ownership of all its objects. Pending PR #2001 adds server side support for human players surrendering on those terms. Seems it could be reused for the AI.

Everything else seems more complicated and in need of more finetuning:
For example, consider the AI chosen to receive the remaining assets is disconnected from that part of the universe (for example there is an empire in between them, possibly the actually conquering player). Then the received gifts are perfectly useless. There is no additional challenge - it still will be completely tedious to clean up the remaining assets because there will be no reinforcements coming from the new owner.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
 Post subject: Re: AI Surrender issues
PostPosted: Mon Feb 19, 2018 6:45 pm 
Offline
Space Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 407
Now I must agree with Morlic.


Top
 Profile  
 
 Post subject: Re: AI Surrender issues
PostPosted: Mon Feb 19, 2018 9:39 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 218
I was going to suggest scrapping the ships a simpler alternative, however PR #2001 looks solid.


Top
 Profile  
 
 Post subject: Re: AI Surrender issues
PostPosted: Mon Feb 19, 2018 9:57 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4453
Morlic wrote:
How about we go for the simplest approach for the first implementation (and possibly 0.4.8) - simply eliminate the empire and remove ownership of all its objects. Pending PR #2001 adds server side support for human players surrendering on those terms. Seems it could be reused for the AI.
I agree that would be fine and make plenty of sense for the very first implementation of it. I don't think that we should feel constrained to not also try putting together something more interesting for 0.4.8, though.

Quote:
Everything else seems more complicated and in need of more finetuning:
For example, consider the AI chosen to receive the remaining assets is disconnected from that part of the universe (for example there is an empire in between them, possibly the actually conquering player). Then the received gifts are perfectly useless. There is no additional challenge - it still will be completely tedious to clean up the remaining assets because there will be no reinforcements coming from the new owner.
I had already considered that general situation before I posted just above, and I would disagree that the assets would be totally useless in that situation-- any outposts would have the opportunity to begin construction of some things (like exobots) in reliance on the Imperial Stockpile, and either they are likely to be close enough be supply-connectable with some attention, or if farther inside the perimeter then they might provide some interesting visibility and/or create a bit of pressure for military forces to be rerouted. Not hugely valuable for sure, but likely enough to have at least some value to make them interesting, it seems to me. I'd rather have them than not :D

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
 Post subject: Re: AI Surrender issues
PostPosted: Tue Feb 20, 2018 4:19 am 
Offline
Krill Swarm

Joined: Sat Jul 01, 2017 4:54 am
Posts: 13
I would argue that AI should surrender to close (physical or influential) ally, as first choice.

With that not available, I like the suggestion of surrender to no one. (perhaps auto scrap ships?)
Surrender to conquerer? Why surrender to the hated enemy?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group