Rules interpretation for placement Human vs AI
-
Now for a change up. This setup is exactly the same as above, the only change is the following:
<attachment foreach="$Players$" name="rulesAttachment" attachTo="@Players@" javaClass="RulesAttachment" type="player"> <option name="placementCapturedTerritory" value="true"/> </attachment>This will allow the Human player to place units into Karelia S.S.R. as well as the Karelia Sea Zone. The factory can go into Caucasus, but non-construction units cannot.
For the AI player this does nothing. The AI was already allowed to purchase to place in Karelia S.S.R. and these units can be placed there but by rule, unplaced units cannot, even with "placementCapturedTerritory" their placement looks the same as above. The factory unit is still not placed.
If a bunker unit is created:<attachment name="unitAttachment" attachTo="bunker" javaClass="UnitAttachment" type="unitType"> <option name="attack" value="0"/> <option name="defense" value="2"/> <option name="hitPoints" value="2"/> <option name="movement" value="0"/> <option name="isConstruction" value="true"/> <!-- place anywhere owned --> <option name="constructionType" value="Bunker"/> <option name="maxConstructionsPerTypePerTerr" value="2"/> <option name="constructionsPerTerrPerTypePerTurn" value="2"/> <option name="canOnlyBePlacedInTerritoryValuedAtX" value="1"/> <option name="canBeDamaged" value="true"/> <option name="canDieFromReachingMaxDamage" value="true"/> <option name="maxDamage" value="2"/> </attachment>And 6 bunkers were given to Germans along with the factory, transport and infantry. The Human player can place all 6 bunkers. They could be placed 1 each in 6 different or stack 2 in 3 territories. The Human player has options the AI does not have. The AI can place 2 bunkers in South Europe and another 2 in Germany and that is all the bunkers it can place. This is by rule the AI player can only place in production territories it has owned since the start of their turn.
Cheers...
-
The next change is pictured below;

No factories at the start of the game but factories are still needed for production. So, this will change Russians purchases to a single factory and it is placed in Russia.
The AI German player may purchase 1 or 2 factories. It is still being given a factory, transport and infantry, all of which cannot be placed this turn.
Prior to running tests this morning, I upgraded to version 2.7.15616. When running test on an older version, the AI German player favored Germany then East Europe, Karelia S.S.R. or South Europe. Now East Europe is highly favored followed by Karelia S.S.R. or South Europe. I have not seen a purchase for place factory for Germany with this new version. I have not dug too deep into the purchasing routine as I'm just trying to figure out the rules for placement. At first, I thought the rules would be similar for the placement of units given to a player whether AI or Human controlled. The placement of these types of units have completely different rules depending on the type of player.
If "placementCapturedTerritory" is still active and the AI purchased to place in Karelia S.S.R. or Caucasus, then that unit is placed. If not active, then those factories purchased for those locations will become held unplaceable units. Held unplaceable unit are either destroyed at the end of placement or saved over until the next turn determined by how "Unplaced units live when not placed".
So, the AI can purchase to place factories, but can still lose them because it can always try to purchase for captured territories even if they can't be placed there.Cheers...
-
-
So, the AI can purchase to place factories, but can still lose them because it can always try to purchase for captured territories even if they can't be placed there.
Not sure what all this means. Does new code need to be written for the AI not to do this ? Or does a new map property need to be added to the xml so one can turn it off depending on what game they're playing ?
I'm not real clear on all the different rulesets, as it's been so long since I've played anything other than G 40.
Anyway, I won't be of any help here but Good Luck for getting it corrected
I will ping @panther for you, as he is a rules heavyweight. -
To sum up what WC is pointing out here - basically the AI is stupid here in that it tries to purchase units for territories it can't place in. And it is also unable to place unplaced factories because it tries to place them in territories with factories.
This needs to be fixed on the engine level. Two fixes are needed:
-
When making purchases, the AI simulates it turn first and then uses that information to make its purchase. However, it then correctly needs to identify that it cannot place in conquered territories because right now it thinks it can.
-
When the AI tries to place unplaced factories, it needs to use a different set of territories than those for regular units.
-
-
Is this what should happen?
Components of this problemrulesAttachment has placementCapturedTerritory" value="true"
This allows for the placement of units in the same turn as they were captured.Order of delegates in xml speak
A&A style Purchase before Combat
Purchase> Combat move>Combat> Non-Combar move> Place> End Turn
or
New style Purchase after Combat
Combat move>Combat> Non-Combat move> Purchase> Place> End TurnFor Purchase before Combat
The AI tries to purchase what it thinks it needs based on its current TT and then Places them.
If PlacementCapturedTerritory=true then it should re-evaluate its Purchases/Place based on its new TT gains, yes? (As the gains might be better, closer to the enemy etc)Purchase after Combat
If PlacementCapturedTerritory=true or false
The logic is simpler, the AI purchases what it can place, yes?In the above mix, if the AI have been given units/factories from isAI/xml it should test for these first and not Purchase them,
Is the above what should happen?
-
-
Why are unplaced construction units being placed only into production territories or adjacent sea zones owned since the start of turn?
Why when using rule "placementCapturedTerritory" are unplaced units still limited to production territories and their adjacent sea zones owned since the start of turn?
Why when using rule "placementAnyTerritory" are unplaced units now allowed to be placed in captured territories. This is also including those sea zones adjacent to captured production territories?
Why when using rule "placementAnySeaZone" along with "placementAnyTerritory" are sea unis still restricted to sea zones adjacent to production territories? And why is this still also including sea zones adjacent to captured production territories?
Why are the rules so different for the AI to place unplaced units?Cheers...
-
Lol, I should have specified that when I talk about the rules I exclusively mean the v1-v6 rulesets.
I can't know what the intentions or intended specific game-(house-) rules behind those "placementWhatever" rules might be, as these are usually used to override those core game-rules, as it seems.
-
So in the PoS2 it states:
isConstruction values: allows the unit to be placed in territories that don't contain factories.But because this is not a rule, requiring the AI to place isConstruction units in territories with factories is not a bug.
There you have it @thedog. You can only give Human players factories with triggers but you can't give them to AI players.
Cheers...
-
You can only give Human players factories with triggers but you can't give them to AI players.
Yes, its wrong, TripleA should allow the AI to place Factories, because the Player can.
@wc_sumpton
Is this a question because the Devs want confirmation that, the AI should be allowed to place Factories like a human player?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
