AI Alliances

This is for directed discussions on immediate questions of game design. Only moderators can create new threads.
Message
Author
User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

AI Alliances

#1 Post by Dilvish »

I had originally posted this in response to a vaguely named post by markpi, in which he mentioned an Age of Empires alliance dynamic where the lowest ranking empires would ally and target the highest ranking, but since I couldn't get him to rename that thread and got no responses there, I'm trying again with this as it's own thread; please reply with your thought about alliances.

The basic idea of supporting one or more AI alliances is certainly part of the mid-long term game plan, and now-ish may be a reasonable time to implement something simple. One with membership qualification based on lower ranking empires would be one of the more straightforward ones to implement and is probably a good starting point for implementing alliances. Off the bat I see five main areas for discussion and/or development: Desirability, Ranking/Score, Alliance Charter(s), Player Membership, AI Implementation
  • Desirability How interesting does this sound to folks? If we want to support this, would we want it as a definite aspect, or leave it optionally selectable?
  • Ranking/Score: We've recently been discussing elsewhere the idea of making available ingame some kind of performance chart akin to the ones as are produced by my python charting script in default/AI/charting. The script currently plots PP and RP production per turn, and total ships, but for an ingame chart a generalized score, or a ranking based on such a score, would probably be more suitable. I think the formula to be used for such a score will be the subject of many opinions and much discussion, so I'll try to use that charting thread for exploring this aspect further.
  • Alliance Charter(s):For a first supported alliance, I think a charter similar to what markpi mentioned would be good-- the key aspect being basic membership qualification based upon some type of ranking/score; let's call this initial alliance the 'Lowbies' for now.
    • Membership: The basic scoring metric we'll discuss in the charting thread. I'd want membership qualification based on some kind of running average, plus with an explicit hysteresis so that an empire could not flip in and out of membership, or out and back in, without a delay of at least 20-40 turns. To start with I'd probably have the AI's make a simple join/leave decision based on the scoring metric, but down the road I'd probably have them make a more involved assessment (an AI at the upper end of qualification, who is surrounded by weaker members and who has already colonized their primary territory close to the maximum extent possible, might not want to be in the alliance, so that they could more strongly expand into neighbors territories and invade planets. Down the the road I'd probably also want to support smaller mid-tier alliances, but let's not bog down this discussion with talk about that.
    • Purpose:markpi mentioned that in Age of Empires the lowbie alliance would prioritize attacks on the highest ranking player. That may or may not make sense for this alliance. To start with I'd just have the alliance be a minor one -- Peace, plus whatever supported alliance benefits there are in-game (like benefits of an Ally's Neutronium Extractor); each member would plan their attacks on non-alliance empires based on their standard tactical goals.
  • Player Membershipmarkpi proposed that the human player could be a member of this lowbie alliance; I don't have much of an opinion on that yet. I think it's something that should be discussed.
  • AI Implementation Significant AI diplomacy is a ways off, but not too far for what we're discussing. Right now the game itself supports being at War or Peace, with the latter being considered a type of alliance, but for the most part the AIs currently just assume than everyone is an enemy (though as I work on code I'm trying to slowly do away with that assumption). I'll need to think about how the AI's would plan expanding through a region shared with allies. But the basics of this kind of alliance shouldn't be too tough to implement.
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
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: AI Alliances

#2 Post by eleazar »

Moved the thread to "Top Priority" because i think this one is important to discuss and could be a good addition to 0.4.3.

A couple quick comments:
Dilvish wrote:Desirability How interesting does this sound to folks? If we want to support this, would we want it as a definite aspect, or leave it optionally selectable?
It it can only function to the players disadvantage, then there might be an argument for making it optional. Otherwise just put it in. It may be just the first steps, but it is the direction we want the game to go.

Dilvish wrote:Ranking/Score: We've recently been discussing elsewhere the idea of making available ingame some kind of performance chart akin to the ones as are produced by my python charting script in default/AI/charting. The script currently plots PP and RP production per turn, and total ships, but for an ingame chart a generalized score, or a ranking based on such a score, would probably be more suitable.
I don't think the system by which AIs calculate the strength of other empires needs to be transparent. The base data should be available to human and AI (# of ship, PP, etc.). I also like the idea of a "score" but as far as i'm concerned they don't have to be the same thing, if you have reason to make the criterion for offering/joining alliance more sophisticated.

Dilvish wrote:...plus with an explicit hysteresis so that an empire could not flip in and out of membership, or out and back in, without a delay of at least 20-40 turns.
Yeah, minimum duration is good to start with human emotional investment can't always keep up with AIs changing sides every few turns, and it just gets annoying.

Dilvish wrote:To start with I'd just have the alliance be a minor one -- Peace, plus whatever supported alliance benefits there are in-game (like benefits of an Ally's Neutronium Extractor); each member would plan their attacks on non-alliance empires based on their standard tactical goals
Sounds good.

Dilvish wrote:Player Membershipmarkpi proposed that the human player could be a member of this lowbie alliance; I don't have much of an opinion on that yet. I think it's something that should be discussed.
I'd like to see the possibility of including human players, otherwise it will feel unfair to many players. Of course it will require the addition of some sort of interface for the player, so maybe human participation isn't part of the first draft.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: AI Alliances

#3 Post by Bigjoe5 »

Just to toss in a quick two cents: Try to consider a solution that could become a natural part of the eventual diplomacy system we develop, not something we'll end up throwing out and replacing when the real thing comes along, which looks like a very real danger in this case.
Warning: Antarans in dimensional portal are closer than they appear.

ogre
Space Squid
Posts: 70
Joined: Sun Feb 10, 2013 5:38 am
Location: Flint, Wishagain

Re: AI Alliances

#4 Post by ogre »

any ai intelligence where alliances are concerned is welcome in my book.
i am weak willed and until i became a decent[?] player at this game i found myself cheating fate by allying with my enemies to avoid a larger assault.
the ai should at the very least be able to deny/break/request alliances
this goes back to the current "charts" thread and power assessment.
thanks for a great game. :)

Starcraft, Syndicate, Populous, Star Control II, Master of Orion, Master of Magic, X-COM UFO Defense, Spacehulk: Vengence of the Blood Angels.

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

Re: AI Alliances

#5 Post by Dilvish »

eleazar wrote:I'd like to see the possibility of including human players, otherwise it will feel unfair to many players.
I'm coming to this preference also.
Of course it will require the addition of some sort of interface for the player, so maybe human participation isn't part of the first draft.
I'll try playing a little with the current diplomacy and messaging interfaces, test having the AI's send peace proposals and messages (a little bit of declarative messaging would probably be best, such as to explain who the alliance members are, etc.) Perhaps what we have is enough for starters.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

ogre
Space Squid
Posts: 70
Joined: Sun Feb 10, 2013 5:38 am
Location: Flint, Wishagain

Re: AI Alliances

#6 Post by ogre »

the human player invitation shouldn't be too bad imb, couldn't it just be a single dialog accept/reject?
i don't see why that would cause omission from the first releases unless you guys like to keep the 'computer' under the debugger :)
as for sharing a neutronium extractor...
this leads to the difference in non-aggression pacts and alliances themselves.
naps are what you guys have now
true alliances are what you all are hinting at right?
i could beat the hell out of a computer and it could request a nap 5 turns from it's end
the computer could beat the hell out of me and accept a mercy cry until it got done with the rest of the galaxy
the weak computers could formulate naps or alliances accordingly, and two big boys might create a nap on the fly if the humans get too cocky
an alliance and actually sharing stuff is quite a bit more complex
i used to play the original moo and we'd get tech offerings when we went on a rampage

/non-aggression pact/ /truce/ /mercy/
/alliance/
thanks for a great game. :)

Starcraft, Syndicate, Populous, Star Control II, Master of Orion, Master of Magic, X-COM UFO Defense, Spacehulk: Vengence of the Blood Angels.

User avatar
Nighthawk
Space Squid
Posts: 76
Joined: Sat Jul 05, 2008 11:00 pm

Re: AI Alliances

#7 Post by Nighthawk »

I'd love to get diplomacy working now! You need to start making a bank of things the AI can say to you, too.

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

Re: AI Alliances

#8 Post by Dilvish »

Nighthawk wrote:I'd love to get diplomacy working now! You need to start making a bank of things the AI can say to you, too.
current version on SVN now has a tiny taste

Code: Select all

Rev [5846] AI update with some minor "diplomacy" -- peace proposals will not always be accepted and will likely be accompanied by rude comments.
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: AI Alliances

#9 Post by Geoff the Medio »

Dilvish wrote:rude comments
Those comments are going to need to be put into the stringtable to make them translatable...

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

Re: AI Alliances

#10 Post by Dilvish »

Geoff the Medio wrote:
Dilvish wrote:rude comments
Those comments are going to need to be put into the stringtable to make them translatable...
Ah yes, I suppose so. Right now it's half (one of two comments) based on American colloquial flippancy/innuendo in a vein that we may not want to continue, but I guess it's time to start planning some. It doesn't look like we have any UserString capability exposed to the AI yet; I'll include that in my related to-do list.
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: AI Alliances

#11 Post by Geoff the Medio »

Dilvish wrote:It doesn't look like we have any UserString capability exposed to the AI yet; I'll include that in my related to-do list.
It would be best long-term to have all the UserString looking up happen in the human client, rather than doing it in the AI and sending out the human-readable text in the chat message. This will require some modifications to be able to flag chat messages as requiring lookup before display, though.

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

Re: AI Alliances

#12 Post by MatGB »

As it's been discussed elsewhere, this is definitely the sort of thing I'd like to see.

It would be good if a) lower ranked AIs team together at a fairly obvious point b) AIs that are facing defeat can cede their remaining territories/ships to allies and c) the strongest player is acknowledged and ganged up on, whether or not that player is human (this would obviously help weaker players to some extent).

It'd be a good first step, but that sort of thinking for AIs would be something that's likely to carry over and be wanted in the end point of the game anyway, I always hated the point in MOO2 where you either "won" through leading the alliance or ended up fighting everyone together, but hated in terms of it was a challenge, not because the mechanic itself was a bad idea.

Definitely need more stringtable love for their messages (and, frankly, take out the "your Mum" joke, it's a bit too cliche ;-) ).
Mat Bowles

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

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: AI Alliances

#13 Post by AndrewW »

MatGB wrote:It'd be a good first step, but that sort of thinking for AIs would be something that's likely to carry over and be wanted in the end point of the game anyway, I always hated the point in MOO2 where you either "won" through leading the alliance or ended up fighting everyone together, but hated in terms of it was a challenge, not because the mechanic itself was a bad idea.
Final War, both MOO and MOO 2 have that.

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

Re: AI Alliances

#14 Post by Geoff the Medio »

As a temporary adjustment, AIs ganging up on the leader is OK, but it's probably not good to assume / plan for it to be used long term. Generally people want relationships with AI players throughout a game to have some weight, which in this case might mean an AI not declaring war on the leader just because they are the leader, but instead maintaining a game-long alliance.

That said, if the goal of AIs is to win (or stop other players from winning), it makes sense for them to do this.

Which behaviour / goal is preferable / chosen by AIs might be a matter of the personality of the AI scripts being used.

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

Re: AI Alliances

#15 Post by Vezzra »

^This.

Post Reply