Currently Online

Latest Posts

Topic: AI Handling of Diplomacy

hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2023-01-02, 12:24

Hi everybody,
as we now have a cool new feature with the diplomacy settings we need to teach or AI how to properly handle it.

So first here is what is currently implemented:
1. for the first 10 minutes every invitation or join request is denied (to avoid clickraces from humanplayers),
2.after tht there is a random 20% chance to accept any such request from a stronger player only (strenght is determined by mil power and owned land) .

What I am asking for is:
1. Based on what factors should an AI send an invitiation or join request?
2. what are the factors to leave an alliance?
3. better factorized decision on when to accept.

any suggestion is welcome


Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 967
Ranking
One Elder of Players
Posted at: 2023-01-02, 17:51

hessenfarmer wrote:

... (to avoid clickraces from humanplayers),

If you could just implement this in every strategy game ; ) good feature

2.after tht there is a random 20% chance to accept any such request from a stronger player only (strenght is determined by mil power and owned land) .

when weaker 5 % Chance?

What I am asking for is:
1. Based on what factors should an AI send an invitiation or join request?

when you are nearer than 10 fields when you conquer 3 buildings of the ai

when you start military production earlierer

  1. what are the factors to leave an alliance?

  2. better factorized decision on when to accept.

any suggestion is welcome

AI should have the Power to recognize its ability to team up with another AI if they are then both stronger than the Player

No more players should join an Alliance if this is already the strongest Alliance


Top Quote
the-x
Avatar
Joined: 2019-01-19, 13:23
Posts: 967
Ranking
One Elder of Players
Posted at: 2023-01-02, 18:00

hessenfarmer wrote:

  1. what are the factors to leave an alliance?

Every 10 Minutes check miliary graph:

A) when weaker 10% chance to leave the All or

B check mil Graph: when faster production speed 10% chance to leave the Ally

Randomness is very welcomed, because AI should also play like human, so that Player is not able to "read" the AI or predict what the AI will do , imo

-> Imagine a 4 Player Game where the AI is so clever that even my military production is very fast they (3 trading post AI) are able to win against me (but dont continiously play 3v1, as a challenge/idea)

Edited: 2023-01-02, 18:02

Top Quote
Solstice_s_Return
Avatar
Joined: 2020-01-28, 13:24
Posts: 62
Ranking
Likes to be here
Location: Finland
Posted at: 2023-01-03, 19:08

It would be nice if this feature could also include different aspects of trading, and not only military strength point of view. From mutual benefits to blackmail should be possible. And I think it shouldn't be possible with undiscovered players regardless of player type. However, any kind of contact should be enough: A scout visiting briefly in some other player's territory, a ship passing through territorial waters, etc. Also against computer players, if a player first attacks and then afterwards wants an alliance with that player, it shouldn't be possible without paying heavily with common goods. Moreover, such an action should make other computer players suspicious (especially those in the same alliance if there's any) too and maybe request something also to accept alliance, etc. I would incorporate trading with a new building that can send convoys over roadless paths. Each would be pulled with a couple of tribe specific carrier animals and maybe some kind of four wheeled wagon behind them. They would be single use only and disappear after reaching closest warehouse or headquarters. I know my suggestion is very complex and at least partially might be out of reach for the time being, but that's just my vision about diplomacy and the related important functions.


Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2023-01-03, 20:29

trading is a different feature already on the wishlist, but with no forecast when it will be implemented. So as diplomacy is implemented we need an urgent solution how to improve the AI handling the current implementation.

But I will keep your suggestions in mind if trading might hit the game finally.


Top Quote
Goofy
Avatar
Joined: 2017-01-24, 11:47
Posts: 29
OS: Linux-x86_64 (Manjaro)
Version: 1.1 release
Ranking
Pry about Widelands
Location: Berlin
Posted at: 2023-01-25, 09:53

In Settler I there were predefined AI-Chars, as I remember. I cannot remind, in which cases they start their offers, but you got a screen with a funny portrait combined with some expectations and maybe demands of that AI-player, so the human player could get an estimtaion about that AI-Player and how the game would go on. I believe there were four different AI-char builds from aggressive to friendly and through some predifined answer-buttons on that screen you could a little bit control the level of difficulty for your game.

For example: An aggressive AI-Char send you the message: "I'm the King of the biggest Empire on the map! Give me Goldcoins! I am expecting your tribute soon! Now you can choose an answer by filling the formular.

  1. Go home see you on the battlefield (means: I'm ready for the fight)

  2. Give me some time to procure Gold for the mighty King (means: after maybe 10 minutes you will get anew a request)

  3. Tribute for the mighty King. I will send you x Goldcoins (means: the AI-player let you play until you are mighty enough to be a worthy opponent. But he will claim you from time to time for more Gold!)

The answer of that AI-char is not steady, but it will calculate by a probability depending on your answer. To send him goldcoins should always calm him down a little even the fight should has already started. So you have always a chance for controlling the game by using diplomatic options.


Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2023-02-05, 20:49

First working draft of this is available: https://github.com/widelands/widelands/pull/5774


Top Quote
tothxa
Avatar
Joined: 2021-03-24, 12:44
Posts: 436
OS: antix / Debian
Version: some new PR I'm testing
Ranking
Tribe Member
Posted at: 2023-02-11, 22:51

Maybe you've seen this in the news. The bar is set quite high: face-wink.png

https://www.gizmodo.com.au/2022/11/an-ai-named-cicero-can-beat-humans-in-diplomacy-a-complex-alliance-building-game-thats-a-big-deal/

It's even up on github: https://github.com/facebookresearch/diplomacy_cicero face-smile.png

Although it won't run on our laptops any time soon, and of course it is trained for a different game mechanism. But the chat logs are an interesting read and quite impressive: https://github.com/facebookresearch/diplomacy_cicero/tree/main/data/cicero_redacted_games


Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2023-02-11, 23:54

Interesting but I fear this to be out of dreams for our small AI Implementation.


Top Quote