zond / godip

A dippy adjudicator in Go.
GNU General Public License v3.0
27 stars 22 forks source link

Ownership of non-SC provinces #118

Closed Wulfheart closed 3 years ago

Wulfheart commented 3 years ago

Is it possible to give an nation the ownership of non-SC province?

zond commented 3 years ago

This is not supported by godip, mostly since it doesn't have anything to do with adjudication.

If we can find a way to assign non SC ownership to players in a way that makes sense and doesn't provide skewed incentives, I wouldn't be against it since it's an often asked for feature. Do you have a suggestion for this?

I know both @tttppp and @JorenC have ideas about this as well.

Wulfheart commented 3 years ago

Oh yes, #67. But for example let's take webdiplomacy. If you e.g. look at this map and click through it you can see that by default there are some provinces which are by default assigned to some nations. Taking the approach from #67 would not need any saved state as it is only compiled from the current state. This is only a rendering issue. But if you compare this grafik and this grafik you may also find like me, that the second variant looks nicer in terms of "countries". However, the webdiplomacy approach would need an persisted state of a province as it is no longer dependent on the current ownership of surrounding SCs. For example https://github.com/diplomacy/diplomacy has also a concept for this.

My proposal: Extending the state struct by an additional property influences map[godip.Province]godip.Nation. There would also need to be an importing function. I could make a draft.

zond commented 3 years ago

What I want to avoid is a coloring that is influenced by troop movements, so that beginners feel rewarded for nonsensical moves only made to color non SCs in their colors.

I guess #67 could work, I'd like to see a PR for that.

Wulfheart commented 3 years ago

What about the possibility to implement different algorithms for this? This could be a parameter of variant.Start().

zond commented 3 years ago

It could also be implemented in either the server or client, so it's not strictly necessary to even implement it in the adjudication library..

zond commented 3 years ago

But yeah, sure, letting it be an optional thing would also work.

Wulfheart commented 3 years ago

One question about implementation details: Does setting influence on a supply center also change this SC's ownership or is this action ignored? What do you say?

zond commented 3 years ago

I'd say keep influence and ownership separate. Influence is just cosmetics :)

Wulfheart commented 3 years ago

In that case influence will ignore SCs as they are always owned and therefore "influenced" by a nation or neutral.

zond commented 3 years ago

Sure - each influence implementation will work differently anyway, and each client can choose whether to use it or not.

JorenC commented 3 years ago

As the Author of #67 I believe my approach is better than the influences map property.

1) My proposal does allow for creating a map like the second proposal - that's what the XML is for; at the start of the game, it defines which territories belong to what nation, e.g. Piedmonte, Bohemia would belong to the respective nations, similar to your second picture. This would mean the map owner would need to make one simple XML file, and if they do not, the map will follow the default logic (which will not break anything and still approximately work) It will also simply work retro-actively, rather than an "influenced-by' property.

2) By adding rule1 (When an SC get's captured, re-evaluate all adjacent non-SC territories), this also prevents the default, set-up by XML map to shift. E.g. Piedmonte would still belong to Italy for the start of the game until either Marseilles or Venice changes owner ('the war approaches'). It would then make sense to re-evalute this.

3) I strongly disagree that Ireland and Iceland should be coloured - they are neutral and should not be coloured as such. Indeed, note that they are also marked as impassable in Diplicity. Having them coloured makes it harder to understand for new players. [image: image.png]

4) The concept of influences map means that a map creator needs to make a complicated ruleset for new variants - some maps have 80+ territories, and for each territory the maker must make a multitude of influences definitions. In addition, if multiple SCs border one other territory, it will still come to "who owns all SCs that influence this territory".

5) A simple ruleset would likely be much easier to implement, as it's the same as with the influences map, but simpler.

6) The ruleset works in classical but also in all other variants. There might be an issue with territories only bordering one nation, for example, if Tunis gets taken - by definition, North Africa would get the same colour for the rest of the game, even if Spain is not. Or, in Vietnam war, the green nation might start with a large border, but because it's stretched, it might easily get "neutral" territories between it's SCs. Considering it's cosmetic, I think this is acceptable.

I would suggest we start with the 67 implementation firstly, and then possibly extend it with some "influences by" that can override 'SC next to me', if present. That way we can deliver value in iteration 1, and add additional value in iteration 2. It also ensures that if there is no influences property, everything has a fallback.

I forgot to add one rule: "Sea territories can't be coloured". I think this is self-explanatory.

On Mon, Nov 23, 2020 at 7:54 PM Alex notifications@github.com wrote:

Oh yes, #67 https://github.com/zond/godip/issues/67. But for example let's take webdiplomacy. If you e.g. look at this http://webdiplomacy.net/board.php?gameID=334254#gamePanel map and click through it you can see that by default there are some provinces which are by default assigned to some nations. Taking the approach from #67 https://github.com/zond/godip/issues/67 would not need any saved state as it is only compiled from the current state. This is only a rendering issue. But if you compare this [image: grafik] https://user-images.githubusercontent.com/25671390/100001860-0a06f480-2dc4-11eb-9f76-ad220fbc913c.png and this [image: grafik] https://user-images.githubusercontent.com/25671390/100001913-1e4af180-2dc4-11eb-870b-7951b2e6582d.png you may also find like me, that the second variant looks nicer in terms of "countries". However, the webdiplomacy approach would need an persisted state of a province as it is no longer dependent on the current ownership of surrounding SCs. For example https://github.com/diplomacy/diplomacy has also a concept for this.

My proposal: Extending the state struct by an additional property influences map[godip.Province]godip.Nation. There would also need to be an importing function. I could make a draft.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zond/godip/issues/118#issuecomment-732358150, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXURGKZ2UJGPSJEQH2JV63SRKVXJANCNFSM4T7ZUHRQ .

JorenC commented 3 years ago

@Wulfheart maybe join the Discord? https://discord.gg/FttqHc5f that allows us to discuss things more in a chat way, and leave the discussion results for Githb (keep it cleaner). We have a separate Dev channel I can invite you to, if you're commiting..

Wulfheart commented 3 years ago

@JorenC yes, I will join the discord for more discussion. However to ensure that I understood you correctly: You want to attach some provinces to supply centers. Do I get it correctly? I like this proposal. However this is something with doesn’t need to know which units passed previously through a province. Therefore this should be a concern of the renderer.

JorenC commented 3 years ago

Hi Alex

Yes and no. The difference between our proposed solutions is that the provinces are just attached to the neighboring SCs. In addition, the XML file would create a starting state. The rules would not change or be special.

They wouldn't be attached to an SC, just have a colour at start. Then, the rules would apply as normal - so the moment one of the SCs neighboring that province (let's say Piedmonte starts green. For three turns, nothing changes - Marseilles is blue, Venice is green. On turn four, Venice becomes red. Now, Piedmonte is a neighboring province and gets evaluated - one blue (marseilles), one red (venice), means it would turn neutral - it's a contested zone between two major powers...

So, I don't want to attach provinces to supply centers - I want to make one standard, simple rule set that applies to all countries. By making it only execute when neighboring SCs change, a simple solution like a starting state (which would just be pie - green, gascony - blue etc for any neutral SCs you want coloured) would have impact as long as needed, until the actual situation changes.

With regards,

Joren

On Mon, Nov 23, 2020 at 9:16 PM Alex notifications@github.com wrote:

@JorenC https://github.com/JorenC yes, I will join the discord for more discussion. However to ensure that I understood you correctly: You want to attach some provinces to supply centers. Do I get it correctly?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zond/godip/issues/118#issuecomment-732402129, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXURGN2N2HXODJJHK47X2TSRK7LFANCNFSM4T7ZUHRQ .

Wulfheart commented 3 years ago

@JorenC I made a custom package for this because I felt like it doesn't belong into the core. https://github.com/Wulfheart/godip-influence allows the definition of custom "influence" functions.

zond commented 3 years ago

Pretty cool!

@Wulfheart is it ok if we mentioned this in the godip README?

@tttppp do you want to implement your idea using this concept?

Wulfheart commented 3 years ago

@Wulfheart is it ok if we mentioned this in the godip README?

Of course. I have already provided a license for the project.

JorenC commented 3 years ago

Super awesome! If this would make it a step closer, super nice!

On Sat, 28 Nov 2020, 10:55 zond, notifications@github.com wrote:

Pretty cool!

@Wulfheart https://github.com/Wulfheart is it ok if we mentioned this in the godip README?

@tttppp https://github.com/tttppp do you want to implement your idea using this concept?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zond/godip/issues/118#issuecomment-735208786, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXURGPMQO5MOMC3OVMUJT3SSDCJHANCNFSM4T7ZUHRQ .

tttppp commented 3 years ago

I think my only contributions on this topic were:

  1. I probably wouldn't use it.
  2. If it was enabled then I'd want a different colour for influenced provinces and owned SCs.
  3. For consistency I think the sea provinces should be eligible for colouring in a similar way to the land provinces.

Having said this, I think it's a great piece of work, since this is probably the most requested feature.

Wulfheart commented 3 years ago

You can use your own algorithm. It is just a wrapper with some predefined algorithms.

And thanks for the compliment. 😁

zond commented 3 years ago

I'll close this now. Added mention of your project in the README :)