Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blitz-Out Inconsistency (2.5.22294) #10643

Open
Cernelius opened this issue Jun 12, 2022 · 25 comments
Open

Blitz-Out Inconsistency (2.5.22294) #10643

Cernelius opened this issue Jun 12, 2022 · 25 comments
Labels
Problem A problem, bug, defect - something to fix

Comments

@Cernelius
Copy link
Contributor

Situation:
A unit which is able to blitz moves out of an (enemy-owned) territory into an other land zone, and the territory has no enemy units in it (It does not matter what units are in the other land zone.).

Correct behaviour:
The territory (of which the unit is moving out) ought (always) to be conquered as if blitzed.

Current behaviour:
The territory is conquered if the other land zone is an other enemy-owned territory but is not conquered if the other land zone is friendly.

Savegame:
2022-6-12-World-War-II-Revised(blitz out).zip

Additional information:
You can test all the following behaviours by moving one of the units which are in West Russia:

  1. Move the armour to Karelia S.S.R.: West Russia is not conquered.
  2. Move the armour to Belorussia: West Russia is conquered.
  3. Move the infantry to Karelia S.S.R.: West Russia is not conquered.
  4. Move the infantry to Belorussia: impossible.

The behaviour described at the first point is wrong (in that West Russia should be conquered), whereas all other behaviours are correct, so the first behaviour should be changed as to have West Russia being conquered upon exiting but not changing the other behaviours (In particular, West Russia should not be conquered when the infantry moves out because the infantry cannot blitz.).

Notice that this has nothing to do with the armour being able to move two spaces: what matters is the canBlitz option being set true, not the movement: the armour would behave here just like the infantry if the armour would have been able to move 2 spaces but unable to blitz.

Please fix.

@Cernelius Cernelius added the Problem A problem, bug, defect - something to fix label Jun 12, 2022
@Cernelius
Copy link
Contributor Author

@asvitkine May you fix this? I think it is strongly related to what you are doing at
#10617

@panther2
Copy link
Contributor

panther2 commented Jun 12, 2022

@Cernelius

Please help me understand this scenario. How can Russia start a Combat Move in an enemy territory in Revised?
Isn't the situation rather caused by editing an impossible scenario to a map not supporting something you intend?

@Cernelius
Copy link
Contributor Author

Cernelius commented Jun 12, 2022

@Cernelius

Please help me understand this scenario. How can Russia start a Combat Move in an enemy territory in Revised? Isn't the situation rather caused by editing an impossible scenario to a map not supporting something you intend?

Yes, this would never actually happen in this game or any other basic ones. However, it rests on basic rules.
Since entering an empty enemy territory and going back to the territory you came from is a blitzing move (even though ending into a friendly territory) and causes the territory to be conquered just like if we move through it into an other enemy territory, then the outcome at the first point should be the same as the outcome at the second point (West Russia being captured) because it should not matter whether the final territory is friendly or hostile. I think it can be assumed that, if a unit can blitz through a territory, the same unit should be able to blitz out of a territory, which is how the program already behaves in the second point (If you select the armour in West Russia and move it to Belorussia, you will see that both territories are immediately conquered, which is an agreeable outcome beside the inconsequential and notorious fact that Belorussia should be actually conquered during Conduct Combat if the armour does not move any further.) but, inconsistently, not in the first one.
An alternative solution would be having West Russia non-conquered both at the first and at the second point, but it would make no sense that blitzing a territory you are already inside is harder than blitzing an adjacent one (as, this way, the only way to blitz West Russia would be having an armour that can move 3 or more spaces so that you first move out of West Russia and then move into it again and then out of it again, making a total movement like West Russia to Karelia S.S.R., then Karelia S.S.R. to West Russia, then West Russia to Karelia S.S.R. (This also does not matter for the basic games because it would require land units able to move 3 spaces or more, which are, however, quite common amongst TripleA games.)).
The absurdity would be that, in the given save-game, an armour starting in Karelia S.S.R. would require only 2 movements to take both West Russia and Belorussia and end its movement in Belorussia (by moving Karelia S.S.R. to West Russia to Belorussia), whereas an armour starting in West Russia would require at least 3 movements to take both West Russia and Belorussia and end its movement in Belorussia, and it would make no sense that West Russia is harder to blitz if you start your turn inside it than if you start your turn next to it.

Do you agree with my (let's say) "extrapolation" of the rules to this case which can never actually happen in the basic games (but certainly can in other TripleA games)? The main thing which I believe we can certainly agree is wrong is the inconsistency between the first and the second points: West Russia should either be conquered in both cases or in neither of them. This said, we may then agree that the preferable solution is West Russia being conquered in both cases, which is my point. Otherwise, a property could be added by which West Russia would be conquered in both cases if false and in neither of them if true. In any case, the current behaviour is inconsistent and should be changed.

@panther2
Copy link
Contributor

panther2 commented Jun 13, 2022

@Cernelius

Abstracting from the basic games I think I understand your point now.

So let's assume a game, which rules allow units starting in an enemy territory.
(Maybe there has been a battle in West Russia one round before and on Germany's turn
Germany retreated its units to Ukraine, as the rules of that game allow that.)

In this case Russia starts its turn in West Russia, that at this point has not changed ownership
to Russia.

Now the question is: At which point does a territory change ownership? Abstracting a bit from Revised and enhancing the question to modern core rules (v3-v6 incl. 1940) the rules say that ownership ususally changes at the end of the Conduct Combat phase (during the Conclude Combat step). Only in the special case of a Blitz through an enemy territory the territory blitzed through changes ownership immediately before the blitzing unit continues its move to a second (friendly or hostile) territory. This - and only this - is blitzing.

Now in your scenario we must first be clear about two different points:

  • when does an Enemy Territory change ownership in the situation that leads to your starting position of your savegame?
  • what is related to blitz and what is not?

I leave the first point open for now. As this must be defined by the mapmaker with his intended rules. There are of course several options.

Concerning the second point I would say that - if the rules allow this starting position - the Russian infantry should be allowed to move its one point movement to any enemy territory. It should not be allowed to move into friendly territories, as we are in Combat Move Phase. The Infantry's move is totally unrelated to blitzing. (The rules may of course require that at least one unit stays in that territory in order to fight a battle against no one in order to allow for changing ownership).

The Russian Tank however is a unit allowed to blitz, so the Tank should be able to enter an enemy territory as his first move (here Belorussia), taking this territory immediately when continuing his move to a second territory (hostile or friendly).

So it seems to me that the question of West Russia changing owership is rather unrelated to the question of "blitzing".
Simply moving out of a territory (contested or not) is not blitzing.
To me it seems that it is necessary to clearly define changing ownership of territories in special scenarios like this one before.

It might for example be defined that

  • ownership changes when German Units move out or at the end of Germany's turn, leaving the territory to Russia
  • ownership changes at the beginning of Russia's turn or Combat Move
  • ownership changes during Russia's turn after one round of combat against no one
  • whatever ...

Alternatively/additionally one could create rules for "land units starting in hostile/contested territories".

@asvitkine
Copy link
Contributor

asvitkine commented Jun 13, 2022

@Cernelius Can you clarify how I can use the save game you attached? It doesn't have a tsvg extension and neither unzipping it and adding a tsvg extension or just renaming the zip to add a .tsvg extension makes TripleA be able to open it.

Is there some weird trick to use these? Why not just zip up a .tsvg game and upload that?

EDIT: Oh, I think it's actually a surprising behavior of the default unzip behavior in macOS. It somehow tries to decompress the inner file after unzipping the outer file. I think this only happens because the zip filename doesn't have include the .tsvg extension before the .zip.

@panther2
Copy link
Contributor

@asvitkine The above zip file contains the*tsvg file. Any zip-software should be able to extract it:
See:
zip

@asvitkine
Copy link
Contributor

asvitkine commented Jun 13, 2022

I agree with @panther2 here, I think the state in that save game, which I assume was created with Edit Mode, can't really happen regularly, so now we're talking about custom map territories.

So then, I'd treat it more as a feature request to improve the behavior for maps that may want that, as opposed to a bug per se since it won't happen regularly.

Having said that, it looks like my blitz PR may change things here a bit, for example it does let the infantry move out of that territory into either of the adjacent enemy territories (since it's not related to blitzing). However, perhaps it shouldn't be doing that - since we want to default "can attack from contested territory" to false, so I think if we're treating this territory as "contested", it should prevent such movement (unless the property is set).

@asvitkine
Copy link
Contributor

OK, looking more at how this interacts with my current PR, here are my thoughts:

  1. I agree that we should treat this as a bug (the inconsistency about what happens to the territory based on movement).
  2. It's not high priority because this case is pretty obscure, doesn't affect any standard A&A variants. Still, it would be good to improve to have the engine behave in a more consistent manner.
  3. The scenario helped me discover a surprising behavior of my PR which I will be adjusting. As panther2@ mentioned, the fact that the tank can move out of the territory but not the infantry is inconsistent, since neither of those moves should be related to blitzing. As such, I am making my PR behave consistently WRT to the new "Cannot attack out of a contested territory" property:
    • If the new property is not set (default), neither unit can move out to an enemy territory, since the territory is considered contested.
    • If they stay, then during battle step, the territory gets conquered. If they both move out to friendly territories, the territory stays German.
    • This actually partially resolves this issue, since now there's no inconsistency.
    • If the new property is set to true, it allows both tank and infantry to move out. This is good. However, the inconsistency mentioned in this report is present - i.e. if you go to an enemy territory, this territory changes ownership.

So based on the above, I think my PR is improving things here (reducing inconsistencies) and once it lands, this issue will only be limited to maps that set the new "Cannot attack out of a contested territory" property to true and can end up in a situation like this (empty territory with enemy units).

@Cernelius
Copy link
Contributor Author

I agree with @panther2 here, I think the state in that save game, which I assume was created with Edit Mode, can't really happen regularly, so now we're talking about custom map territories.

This (The fact that I obtained it with edit mode instead of by playing a game regularly.) doesn't matter: it is something that can happen in a number of TripleA games. I could have obtained the functionally similar situation by starting Napoleonic Empires and playing it (without any edits) till getting to that, and the only difference would have been spending more time to do so.

So then, I'd treat it more as a feature request to improve the behavior for maps that may want that, as opposed to a bug per se since it won't happen regularly.

The problem is (as I said) that the current behaviour is inconsistent. Can you explain me why I'm conquering West Russia when I move from West Russia to Belorussia but not when I move from West Russia to Karelia S.S.R.? I don't think there is a sensible explanation for that and it is also inconsistent with the fact that regular blitzing happens all the same in case I'm moving friendly - hostile - hostile and in case I'm moving friendly - hostile - friendly (for example, if I have an armour starting in Karelia S.S.R. (in the save-game), I blitz West Russia both in case I move Karelia S.S.R. - West Russia - Belorussia and in case I move Karelia S.S.R. - West Russia - Karelia S.S.R..
The inconsistency is the problem.
How to fix the inconsistency is not obvious, however, since this never happens in the basic games, but this does not mean there is not a problem: just that there is not a given solution to it.

Having said that, it looks like my blitz PR may change things here a bit, for example it does let the infantry move out of that territory into either of the adjacent enemy territories (since it's not related to blitzing). However, perhaps it shouldn't be doing that - since we want to default "can attack from contested territory" to false, so I think if we're treating this territory as "contested", it should prevent such movement (unless the property is set).

I don't think you should be changing any such behaviours unless you are doing it deliberately and documenting it in PoS2. I think most such behaviours have no documentation nor rules-books behind, so can be changed, but only if this springs from a general plan on how to define them (hopefully better than they are). The next step would be documenting everything in PoS2, so that people may know that how it works is how it is intended to work and won't have to test themselves every case to know how it works.

This said, I think point 4 ("Move the infantry to Belorussia: impossible.") is a preferable behaviour. I think an infantry starting in a hostile territory must conquer that territory before conquering anything else but it can conquer nothing else than one territory because it cannot blitz, so the only way for moving the infantry would be point 3 ("Move the infantry to Karelia S.S.R.: West Russia is not conquered."), which I consider a correct behaviour too. If you intend to change either or both of such behaviours, I much suggest you add one or two properties to allow map-makers to go either way, preferably keeping the current behaviour as default.
As I said, I tend to think they should better remain working as they are, but it has to be open to discussion.

@asvitkine
Copy link
Contributor

@Cernelius looks like we replied almost at the same time. Can you check my message above and lmk if you agree with my thoughts and plan here?

@Cernelius
Copy link
Contributor Author

@Cernelius looks like we replied almost at the same time. Can you check my message above and lmk if you agree with my thoughts and plan here?

Of course. I've also to reply to @panther2, since I disagree with something he said.

@panther2
Copy link
Contributor

@Cernelius
Can you please do me a favour and explain to me how a similar situation can occur in Napoleonic Empires?
I have played this map a lot years ago, and fail to remember how this could happen.

@Cernelius
Copy link
Contributor Author

OK, looking more at how this interacts with my current PR, here are my thoughts:

  1. I agree that we should treat this as a bug (the inconsistency about what happens to the territory based on movement).

Right, I think we can all see an inconsistency here, at least from a "realistic" stand-point. If I can blitz a territory I'm already inside by going to an other hostile territory, there is no reason why I should not be able to blitz it also by going to a friendly territory (Realistically, it should be even easier in the second case, as my units are only conquering one territory as opposed to conquering one territory and also making other combat-related actions on the same turn.).

  1. It's not high priority because this case is pretty obscure, doesn't affect any standard A&A variants. Still, it would be good to improve to have the engine behave in a more consistent manner.

Maybe, but, since strongly related matters are being addressed right now, it is probably about time to try to settle the whole picture rather than potentially changing behaviours without knowing where we are heading. The fact that we don't have a rule-book telling exactly what is right in every case will make much more difficult in the future to address inconsistencies you might add now.
I also think we should try not to add too many properties if we can see some behaviours being quite clearly more sensible than others even though (being outside of the basic rules) them all are acceptable.

  1. The scenario helped me discover a surprising behavior of my PR which I will be adjusting. As panther2@ mentioned, the fact that the tank can move out of the territory but not the infantry is inconsistent, since neither of those moves should be related to blitzing.

I'm not seeing any inconsistency here as long as we assume an already existent and reasonable expansion of the implied rules beyond the limits covered for the basic games: I think it is a very reasonable extrapolation of the blitzing rule to blitz a hostile territory you are already inside, so I do believe the current behaviours on the matter are correct and to be kept. Rather, it is needed to document in PoS2 that it is intended for blitzing to apply also when exiting a hostile territory you could blitz by moving through (as I think it is most likely that blitzing by exiting only happening within the program must have been intended albeit undocumented as far as I know) so that everyone may know this is an actual TripleA rule, not something that just happens outside of any rules.
Specifically, in case there is one unit alone inside a hostile territory which is adjacent to an other hostile territory:
if the unit is unable to blitz, the unit cannot move into the adjacent territory.
if the unit is able to blitz, the unit can move into the adjacent territory and, in doing so, it immediately conquers (by blitzing it) the original territory.
I believe this is how the program already behaves and I think it is agreeable.
If you prefer, you can add a property to define whether or not you can blitz a territory by only exiting it. This may be good for purists who want to keep the blitzing ability working strictly by basic rules.

As such, I am making my PR behave consistently WRT to the new "Cannot attack out of a contested territory" property:

What do you mean? That as default you can do that and there is a property that, if true, makes you unable to attack out of contested territories? This would reverse the current behaviour which, aside from blitzing-out, is as default forbidding doing that.
Moreover, I'm not sure if an enemy territory with no enemy units in it counts as contested.
Also, how about moving into a territory you own but which has enemy units in it. Have you considered this case? This would count certainly as a contested territory too and I believe that currently you can always do such a move.
I suppose the actual property you want here is something called as "Units can move into enemy territories from hostile territories".

All this said, I agree that you should be unable to attack out of a contested territory if you are unable to blitz, but I believe that you should be able to blitz out (thus potentially attack out too) of a contested territory by blitzing the contested territory if it is a territory you could blitz by moving through. Practically, I think exiting a territory with a unit able to blitz should always be treated the same as blitzing the territory if the territory is eligible for blitzing (A territory is eligible for blitzing if it is hostile and with no enemy units beside infrastructures in v1 and no enemy units at all in v2+.).

  • If the new property is not set (default), neither unit can move out to an enemy territory, since the territory is considered contested.
  • If they stay, then during battle step, the territory gets conquered. If they both move out to friendly territories, the territory stays German.
  • This actually partially resolves this issue, since now there's no inconsistency.

This does solve the inconsistency outlined at this topic, but not the way which I think is preferable.
I suppose you are overlooking the irrealistic consequences of this behaviour.
For example, in the save-game, an armour starting in West Russia would be, then, unable to blitz West Russia, whereas an armour starting in Karelia S.S.R. would be able to do so: it really makes no sense that an armour which is in West Russia cannot blitz it while an armour that is outside of it can, realistically.
However, I agree that making West Russia always unblitzable by an armour starting inside it would be rules-compliant and consistent.

  • If the new property is set to true, it allows both tank and infantry to move out. This is good.

At this point, I start strongly thinking we really need a property that define whether or not you can blitz territories by exiting them even though I still tend to think this is how it should work (by simply expanding the basic blitz rules, which is what the program appears to be already doing albeit inconsistently: only when moving out to an other hostile territory and not when moving out to a friendly one).
Since this behaviour is not covered by the basic rules and it is not very intuitive, I suppose a well worded property (something like "Units can blitz territories by exiting them") would be the best way to cut out confusion.
Once this is is done, then any game having both "Units can move into enemy territories from hostile territories" false and "Units can blitz territories by exiting them" true should behave like the program currently does (that is allowing attacking out of hostile territories if such territories have no enemy units and all the units which are attacking out have the blitz ability) except that, in the example, West Russia would be conquered also by exiting it to a friendly territory like Karelia S.S.R. (which would be the behaviour that I see as preferable for realism).
Yeah, I suggest having both these properties: this should help a lot in communicating both behaviours within PoS2 and keeping the basic rules closer to what they actually are (as I agree that, under the basic rules, you don't blitz territories by exiting them: only by moving through them).

However, the inconsistency mentioned in this report is present - i.e. if you go to an enemy territory, this territory changes ownership.

As I said, this should better be addressed (right now that all other changes are being made) either:

  • by having the armour in West Russia conquer West Russia whenever it moves out of it (so both in case it moves to Belorussia (which currently works) and in case it moves to Karelia S.S.R. (which currently does not work)).
    or
  • by having a property defining whether or not you blitz blitzable territories when you exit them just like when you move through them (and this should either happen or not happen based solely on the property and regardless whether the unit is exiting into a hostile or a friendly territory).

So based on the above, I think my PR is improving things here (reducing inconsistencies) and once it lands, this issue will only be limited to maps that set the new "Cannot attack out of a contested territory" property to true and can end up in a situation like this (empty territory with enemy units).

As I said, I personally disagree that everything detailed is an improvement because I think the current behaviour of allowing units able to blitz to move from hostile to hostile by blitzing upon exiting (whereas the units unable to blitz cannot move from hostile to hostile) is overall much preferable.


I maintain that, regarding the exemplified behaviours you can test by moving one of the units which are in West Russia,

  1. Move the armour to Karelia S.S.R.: West Russia is not conquered.
  2. Move the armour to Belorussia: West Russia is conquered.
  3. Move the infantry to Karelia S.S.R.: West Russia is not conquered.
  4. Move the infantry to Belorussia: impossible.

I find them all reasonable and consistent except the first one, and would have them changed to:

  1. Move the armour to Karelia S.S.R.: West Russia is conquered.
  2. Move the armour to Belorussia: West Russia is conquered.
  3. Move the infantry to Karelia S.S.R.: West Russia is not conquered.
  4. Move the infantry to Belorussia: impossible.

I think this way they would be both consistent and sensible the most.

As a second best, I would agree that the following would be consistent too (but much less sensible):

  1. Move the armour to Karelia S.S.R.: West Russia is not conquered.
  2. Move the armour to Belorussia: impossible.
  3. Move the infantry to Karelia S.S.R.: West Russia is not conquered.
  4. Move the infantry to Belorussia: impossible.

So I think it may be good to have a property or a set of properties which allow to choose one or the other consistent solution, per game.

@Cernelius
Copy link
Contributor Author

@Cernelius Can you please do me a favour and explain to me how a similar situation can occur in Napoleonic Empires? I have played this map a lot years ago, and fail to remember how this could happen.

Two powers are in an Allied or Open Borders relationship.
One power moves combat units into an empty territory of the other power and keep them there.
The power downgrades the relationship to war.

However, this is just one way it can happen.

@Cernelius
Copy link
Contributor Author

@Cernelius Can you please do me a favour and explain to me how a similar situation can occur in Napoleonic Empires? I have played this map a lot years ago, and fail to remember how this could happen.

Two powers are in an Allied or Open Borders relationship. One power moves combat units into an empty territory of the other power and keep them there. The power downgrades the relationship to war.

However, this is just one way it can happen.

Sorry, I should have clarified that I was talking about the Napoleonic Empires map, not the Napoleonic Empires game: this is not possible in the Napoleonic Empires game but it is possible in all the other games of the Napoleonic Empires map. The games of that map in which this is possible are the "Napoleonic Empires: FFA 5 Player" and the "Napoleonic Empires: FFA 8 Player".

I assume you only played the Napoleonic Empires game of the Napoleonic Empires map and never the other games of the same map. The only game of that map I ever played is "Napoleonic Empires: FFA 5 Player".

@asvitkine
Copy link
Contributor

asvitkine commented Jun 13, 2022

@Cernelius Thanks for your detailed reply.

Let me reply to your two main points:

  1. Whether it makes sense to fix the territory ownership change issue in my pending PR.

I agree it should be fixed, but the code for changing territory ownership is completely in a different place than the move validation code I'm changing. So I think it should be in a separate PR. I don't disagree that fixing it makes sense.

As another point, given it's a new area of the code base for me to dig into, I think it would be a worse use of my time than fixing some of the 2.6 regressions also in areas of the code unfamiliar to me, such as #10599 where the wrong number of dice are rolled or #10647 where there's error popups in 2.6.

  1. That it's better to have blitzing units be able to leave contested blitzable territories they start in.

Here, I disagree, let me explain my thinking. First, we're talking about very much an edge case. It requires a blitzing unit to start in a contested territory, which I think eliminates the vast majority of triplea maps. So the ones left are the ones with limited combat rounds (e.g. civil war), ones where politics can change ad hoc (napoleonic empires) and ones where the starting position or triggers create such a scenario. I think it's telling that we only discovered this as a result of explicit testing and never heard anything about this from players - i.e. it doesn't really happen much in practice.

So given it's such an edge case and in particular, it doesn't come up with any rule book we're trying to replicate, so it's entirely up to TripleA how this should work, I think we should strive for something that's the most maintainable and doesn't result in a lot of extra complexity just for this edge case.

In particular, my proposed "Can Attack From Contested Territories" property is very clear (given a clear definition of what contested means - but this is already well defined with the existing property "Contested Territories Produce No Income" - territory must not have enemy units).

If we instead need to make it take into account blitzing, it becomes quite a mess, because then the new property would need to instead say something like "Non-Blitz Units Can Attack From Contested Territories" (default false) - in order to preserve existing behavior. And then you'd want a "Blitz Units Can Attack From Contested Territories" (default true) if you want to separately control this for blitz units. But it's not even "contested territory" for the blitz case right now, but "blitzable territory" which has its own definition. So as you can see, this would require a lot of complexity - both to explain how it works and in terms of properties that would be needed to support customizing this.

But then stepping back, my argument is still that this has nothing to do with blitzing, other than the current engine not making a distinction between blitzes and non-blitzes for these attacks (i.e. some existing behavior that's questionable). If blitz is defined as being able to attack multiple times in a combat move given the unit's movement, then I don't see how it's relevant to the starting territory. (Edit: And all the definitions of blitz in A&A rulebooks talk about entering an enemy territory on your first move, clearly a case that doesn't apply here.)

The last thing I want to argue is the question of "Does it really matter?". That is, if the case doesn't really come up all that often, because existing rulesets+maps don't run into this scenario and the ones that do, still need a pretty specific case to happen (i.e. ally -> war while having units in an empty territory), then it's a bad reason to add a lot of complexity in terms of new properties and engine code. Instead, it's better to go with a simpler solution, of which "Can Attack From Contested Territories" is clearly, and the alternative is not.

@Cernelius
Copy link
Contributor Author

In particular, my proposed "Can Attack From Contested Territories" property is very clear (given a clear definition of what contested means - but this is already well defined with the existing property "Contested Territories Produce No Income" - territory must not have enemy units).

I feel it being far from clear and you previously named it as "Cannot attack out of a contested territory", so which one is it? Can or cannot?
For example, if I'm in a contested territory and want to move to a contested territory I own, does this property matter? Assuming the name of the property is "Can Attack From Contested Territories", does this mean I cannot move from any contested to my own territory if there are one or more enemy units in it and this property is false? I don't think this is what you want, but it is what the property is saying.


All considered, I think there is a very high risk that your changes will make default things worse off and possibily damaging existent non-basic games meant to work under exactly the current behaviour.
At this point, I feel like strongly suggesting you to keep the default behaviour exactly as it is now and make any changes to it via additional properties which are false as default.
Really, as I said, the only thing I think it should be changed of the current program behaviour is having blitzing unit conquering biltzable territories also when exiting them to friendly ones (which would fix the inconsistency that currently you can do this only by going to enemy territories). As far as I know, I think I would keep anything else which is default working exactly as it does now. Even this proposed change could be not made as default but by adding a property specifically for blitzing-on-exiting territories when going to friendly ones, though at this point it would make much more sense for such a property to apply to every blitzing-on-exiting case (since any such case is not part of the basic rules-sets anyway, which support only blitzing-on-moving-through).

@asvitkine
Copy link
Contributor

asvitkine commented Jun 13, 2022

In particular, my proposed "Can Attack From Contested Territories" property is very clear (given a clear definition of what contested means - but this is already well defined with the existing property "Contested Territories Produce No Income" - territory must not have enemy units).

I feel it being far from clear and you previously named it as "Cannot attack out of a contested territory", so which one is it? Can or cannot?

Sorry, I mispoke in that reply. It's "Can Attack From Contested Territories" defaulting to false - I did not change the name in my PR, it was this way from when I introduced this, so that false was a reasonable default that intended to mostly match existing behavior (obviously, the blitz case we're discussing is the discrepancy).

For example, if I'm in a contested territory and want to move to a contested territory I own, does this property matter? Assuming the name of the property is "Can Attack From Contested Territories", does this mean I cannot move from any contested to my own territory if there are one or more enemy units in it and this property is false? I don't think this is what you want, but it is what the property is saying.

Yes, it applies as well. If property says true, you can do it, otherwise you cannot.
For majority of triplea maps, this again isn't relevant since it's the same story as the example we're discussing here - i.e. they won't have this state.

As to what I want, my intention is to provide a property that allows such movement, hence if it's true, then units can move freely. So the false case is not relevant to that, but obviously we should ensure that the behavior in the default case is desirable. My argument is it is - as it makes it easy to reason about (since "contested territory" is well defined) unlike the current behavior and the current behavior is not based on any Axis and Allies rulebook and I don't think any maps are relying on it, because it's very much an edge case.

All considered, I think there is a very high risk that your changes will make default things worse off and possibily damaging existent non-basic games meant to work under exactly the current behaviour. At this point, I feel like strongly suggesting you to keep the default behaviour exactly as it is now and make any changes to it via additional properties which are false as default. Really, as I said, the only thing I think it should be changed of the current program behaviour is having blitzing unit conquering biltzable territories also when exiting them to friendly ones (which would fix the inconsistency that currently you can do this only by going to enemy territories). As far as I know, I think I would keep anything else which is default working exactly as it does now. Even this proposed change could be not made as default but by adding a property specifically for blitzing-on-exiting territories when going to friendly ones, though at this point it would make much more sense for such a property to apply to every blitzing-on-exiting case (since any such case is not part of the basic rules-sets anyway, which support only blitzing-on-moving-through).

Can you clarify why you think it's a high risk? Everything we discussed seems very much an edge case with maps affected by this likely not even considering these cases, let alone relying on them.

If we fix bugs in engine code, do you also think we shouldn't do it? (For example, my PR also fixes problems with air transportable units where they can be allowed to "blitz" even if they're not being air transported, as long as at least one of them is being transported.) It's changing behavior, so then you can argue some map might be relying on air transports working in this broken way, even though it's clearly a bug (and the code had a TODO to fix to validate properly).

Also, to be clear, the current behavior is the error message is something like "Cannot blitz further into enemy territory", even if the unit doing this is an infantry that doesn't have blitz that started in an enemy territory. So the current behavior is clearly wrong.

...

If we really want to keep the current logic, then I suppose we can make the new property something like "All Units Can Attack From Contested Territories". That's arguably an even simpler change than what my PR does, since we just disable the existing logic if that property is set, but imho the result is this strange blitz-specific logic that has nothing to do with blitzing...

I'm curious what @panther2 and others (maybe @DanVanAtta who may be the person reviewing my PR) think about this. If everyone agrees that we keep this strange "blitz" behavior which is unrelated to how blitz is defined in the rulebook, then I can certainly rework my PR.

@Cernelius
Copy link
Contributor Author

In particular, my proposed "Can Attack From Contested Territories" property is very clear (given a clear definition of what contested means - but this is already well defined with the existing property "Contested Territories Produce No Income" - territory must not have enemy units).

I feel it being far from clear and you previously named it as "Cannot attack out of a contested territory", so which one is it? Can or cannot?

Sorry, I mispoke in that reply. It's "Can Attack From Contested Territories" defaulting to false - I did not change the name in my PR, it was this way from when I introduced this, so that false was a reasonable default that intended to mostly match existing behavior (obviously, the blitz case we're discussing is the discrepancy).

For example, if I'm in a contested territory and want to move to a contested territory I own, does this property matter? Assuming the name of the property is "Can Attack From Contested Territories", does this mean I cannot move from any contested to my own territory if there are one or more enemy units in it and this property is false? I don't think this is what you want, but it is what the property is saying.

Yes, it applies as well. If property says true, you can do it, otherwise you cannot. For majority of triplea maps, this again isn't relevant since it's the same story as the example we're discussing here - i.e. they won't have this state.

Such matters have always been an undocumented problems-ridden mess nobody ever wanted (in my experience) seriously to put his/her hands on, to try to make sense of, but I think you are doing it with far too heavy axe-strokes.
If you want to go the way you want to go, I much suggest you atomize everything much more specifically, creating more properties than that.
For example, under your system, it would not be possible to have a game working under the behaviour that units in an enemy-owned contested territory cannot move to an other enemy-owned territory but can move to a friendly-owned contested territory: if I understand what you are saying, either they would be able to move to both or to none (depending on the setting of your property). This is an example in which it would be much better having two properties, so that every map-maker can decide what is possible and what not, for the game. For example, a property which allows you to move from contested to enemy-owned and an other property which allows you to move from contested to friendly-but-contested.

I reiterate I suggest you fix problems (comprising inconsistencies (for inconsistencies which can go multiple ways you may want to add properties like in the case of blitzing-by-moving-out, which is currently possible only if you go to enemy territory but not if you go to friendly which makes no sense)) while otherwise keeping the program behaviour as close as possible as it currently is. Meaning leaving alone as default whatever has no problems.
If you change something which is not problematic, I highly suggest you make a property available for opting back into the current behaviour, on a per-game basis.


By the way, while you are at it, are you also fixing that problem that you can use paratroopers or land units on blitzable enemy-owned territories to open the way for other paratroopers? It has been discussed a number of times, but I don't recall was ever fixed. For example, here:
https://forums.triplea-game.org/topic/1561/cold-war-1965-official-thread/15?page=1

@asvitkine
Copy link
Contributor

asvitkine commented Jun 13, 2022

I still don't find the argument for blitzable units being able to exit enemy territories they start in convincing, but the other thing you brought up about moving to your own territories that are contested - I went to check with 2.5, and this is indeed allowed, whereas my PR causes that to change. I do think that may have a more impactful unintended effect, so that convinced me to maybe try to preserve the old behavior as-is when the new property isn't set.

The good news is my PR is adding unit tests for all these scenarios, so once we decide what it should be, we'll now have test coverage for them so in the future, they can't accidentally change without someone realizing it.

@Cernelius
Copy link
Contributor Author

I still don't find the argument for blitzable units being able to exit enemy territories they start in convincing, but the other thing you brought up about moving to your own territories that are contested - I went to check with 2.5, and this is indeed allowed, whereas my PR causes that to change. I do think that may have a more impactful unintended effect, so that convinced me to maybe try to preserve the old behavior as-is when the new property isn't set.

That was just an example. My point (that you are proving) is that I believe you should not go ahead changing things you don't even know how they currently work.

@Cernelius
Copy link
Contributor Author

To be clear, I'm not against changing things, but it should be at least deliberate: you know exactly how everything works and you know exactly what you are changing and why.

@panther2
Copy link
Contributor

@Cernelius

I assume you only played the Napoleonic Empires game of the Napoleonic Empires map and never the other games of the same map. The only game of that map I ever played is "Napoleonic Empires: FFA 5 Player".

Thank you, your assumption is correct.

@panther2
Copy link
Contributor

panther2 commented Jun 14, 2022

I will take a deeper look into all new information and comment on anything else later this day week.

@panther2
Copy link
Contributor

panther2 commented Jun 17, 2022

Having read all the latest comments I don't have very much to add. Maybe let me summarize my thoughts as follows, as always based on core rulesets and the desire to argue close to them:

  • As a workaround I don't have of course any objection against harmonizing movement where it makes sense.
  • The problem of the current issue is unrelated to blitzing. Moving out of whatever territory is not 'blitzing'.
  • The problem of this issue is the lack of a reasonable "territory changing ownership" process for special situations like this one.
  • That could be resolved by the territory immediately changing ownership at the time the situation comes up.
  • The core ruleset of 1914 has clear rules for territories (being empty of enemy units) changing ownership.
  • A contested territory is a terriory with units of both factions inside. 1914 rules say "Contested: Not controlled by any power, and occupied by units of one or more powers on each side"

So I strongly vote for resolving this terriorial ownership loophole at first.

  • Additionally to that I can think of movement rules (unrelated to blitzing) for units starting in contested territories.
  • The core ruleset of 1914 has those rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Problem A problem, bug, defect - something to fix
Projects
None yet
Development

No branches or pull requests

3 participants