Author Topic: 2017 World Cup - Knock-Out Stage  (Read 39250 times)

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: 2017 World Cup - Knock-Out Stage
« Reply #75 on: April 14, 2018, 12:32:58 PM »
Dan asked me to look at the gamesave from the match he is in the process of having with Mr Numbers.

I can see that on turn 32 a Bazaar tile is drawn and to use their formal titles:  TB.CRc.G then TB.CRc.W are both picked and both players place them.
The game resumes on turn 35 (after the 2 tiles are placed).  On turn '76' the TB.CRc.G tile is drawn again.

I've carefully stepped over the code across turn 32.
At the start of turn 35, I could see a Dragon was drawn and the ActiveGroup's Vector still contains 118 tiles.
The TB.CRc.W tile has been removed.  The TB.CRc.G tile remains in the deck.

Stepping back over the code, on turn 32 it seems the TilePacks are duplicated and 'passed by value' into the GameState just after the BaazarPhase.
Basically there are 2-gamestates each with one tile removed.  They are out of sync, meaning one overwrites the other.  Explaining how the removal of the 1st tile is lost.

I've not followed every step of the Bazaar phase to determine exactly why this happens, there are a lot of complex interactions.
It may be something to do with:
this specific Bazaar tile,
the tiles selected were next to each other in the deck,
the interaction of the Trader and Builder tiles, the Builder meeple or Fairy when the tiles were placed on turns 34 and 35,
or somehow later in the game:
that allows this tile to be re-selected.
I'd need to spend more time to work out a fix, which Farin would do better.

It's very easy to undo the last move that Dan played in the game, however.  So the game could continue prior to the placement of the problematic TB.CRc.G tile.
But I've not found a reliable way of removing the tile from the game; because JCZ doesn't track remaining tiles; only all the tiles from the selected expansions minus each tile played, which results in the same error occurring.

I suspect it will be a trivial fix for Farin to resolve and the game could continue prior to Dan's last placement, removing the last placement in the save file; like the screenshot I've taken with the last turn revoked.

Offline MrNumbers

  • Duke Chevalier
  • *
  • Posts: 1830
  • Merit: 91
    • View Profile
    • Carcassonne Latvia
Re: 2017 World Cup - Knock-Out Stage
« Reply #76 on: April 14, 2018, 12:40:43 PM »
Here is my story:
I wasn't aware of that bug. To be precise - what is this bug's main idea. I didn't find anything in "JCloisterZone FAQ, Suggestions & Bug Reports" forum, it was only briefly mentioned in Alternative World Cup thread:
Please go ahead and play your 'Final' games as JCZ currently stands. This is not a 'serious' competition for prizes, and is designed for enjoyment only, so I see no reason why we should not proceed with the minor bug that affects the bazaars. The program does not crash, and it will be the same advantage or disadvantage for both players, so I can see no harm in getting our 'Final' matches played with JCZ as it is.
(emphasis mine)

Based on that I let final matches to be played. But in fact it appeared to be a very serious bug, which affects the game in very significant way! In games like Final tile counting is serious part of the strategy. I have counted the tiles and, given that two cfcr tile are gone (2 most left) I created a hole so 2 Dan's meeples should be stuck forever (unless eaten by the Dragon). But in the subsequent turn Dan draw such tile again! And this is the only example I noticed. How could you notice any other such duplicates? The game becomes completely unpredictable, which it shouldn't be by default! Another annoying bug is with castles. According to rules, if castle is created and some feature is scored in the same turn, castle scoring is not triggered. This isn't realized that way in JCZ, which is another bug, not so serious, like the first one, but also could affect the game in serious way (in this game also, actually).
Given all the facts I don't see another option, but to exclude BC&B from Final expansions setup and start the game without it.

P.S. The whole post was written before I have read Decar's last reply.
"I never lose. Either I win or I learn." (Nelson Mandela)

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: 2017 World Cup - Knock-Out Stage
« Reply #77 on: April 14, 2018, 12:51:52 PM »
Yes, it's very important to know what tiles are coming up.
It looks like you have 3 meeple trapped in a large city and Dan drew a tile which should not have been in the bag!

Would you like me to identify any other duplicates that may have occurred during the game?
I suppose then you can compensate them or remove them from the bag is Farin is able to fix it.

Offline danisthirty

  • (not thirSty!)
  • Owner
  • Chatelain Grand-Croix
  • *
  • *
  • Posts: 6940
  • Merit: 293
  • "First to 4 points wins?"
    • View Profile
Re: 2017 World Cup - Knock-Out Stage
« Reply #78 on: April 14, 2018, 01:16:02 PM »
We have compensated for the castle bug already and we can again if it causes a problem. This does not affect the outcome of the game.

We can also resume our game from a point that I have two trapped meeples (on cloisters) in the same way that you have two trapped meeples in a city. This means we can complete it without affecting the outcome of the game.

I have a lot invested in this game and have fought hard for the position that I am in verses the position you are in. This ought to be respected, yet it feels it is being discarded simply because of a flaw that others have simply put aside and got on with the game. It could have been any tile, and either of us could have drawn it. It is random. Sometimes the odds are in your favour and sometimes they are not. But this aside, I have already offered to undo the advantage this gave me so that we can continue.

Based on the above, I will not take part in a rematch if this means that the half game we played last night will simply be discarded because you don't like it. Especially since you chose these expansions and instructed us to go ahead with the finals even though seemingly everyone else knew about the bug.

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: 2017 World Cup - Knock-Out Stage
« Reply #79 on: April 14, 2018, 01:52:47 PM »
I think the extra tile can be marked as discarded in the save file.

Please let me know if you wish me to identify any other possible duplicates and if you would like me to try and discard them before they are drawn.
I believe this means the game could continue with the correct tiles in the deck.
I can start this tomorrow if you would like.

Offline MrNumbers

  • Duke Chevalier
  • *
  • Posts: 1830
  • Merit: 91
    • View Profile
    • Carcassonne Latvia
Re: 2017 World Cup - Knock-Out Stage
« Reply #80 on: April 14, 2018, 02:15:23 PM »
If this isn't to difficult, please, do it, Decar. And I would like to ask you to do the same in the future with the save file, which I'll do before last tile of the game is placed.
Tomorrow I have National championship, BTW, so don't expect me to respond quickly :-)

Offline danisthirty

  • (not thirSty!)
  • Owner
  • Chatelain Grand-Croix
  • *
  • *
  • Posts: 6940
  • Merit: 293
  • "First to 4 points wins?"
    • View Profile
Re: 2017 World Cup - Knock-Out Stage
« Reply #81 on: April 14, 2018, 02:29:24 PM »
If this isn't to difficult, please, do it, Decar. And I would like to ask you to do the same in the future with the save file, which I'll do before last tile of the game is placed.
Tomorrow I have National championship, BTW, so don't expect me to respond quickly :-)

That's come round quickly. Good luck MrNumbers! :(y)

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: 2017 World Cup - Knock-Out Stage
« Reply #82 on: April 14, 2018, 02:29:41 PM »
Good luck tomorrow Mr Numbers.

I will check for duplicate tiles.  If/when they occur I will list them here, then at the current spot attempt to discard all that are necessary.
I will demonstrate the changes to the save file too, to ensure the game cannot be fixed.

I can't see any other duplicates on the board (though common road tiles may have happened, but these can be swapped out fairly I think), so I hope all can be removed prior to the game's end.
If not...well..let's hope that hasn't happened...

There is the possibility that future Bazaar tiles cause the same issue.
It may be necessary to check the number of tiles in the deck after any bazaar-phase tiles are placed.
If there is another occurrence, save the file and can force the discard.

I'll let you know how I get on tomorrow morning.

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: 2017 World Cup - Knock-Out Stage
« Reply #83 on: April 15, 2018, 06:31:34 AM »
I hope your tournament went to plan this morning MrNumbers.

I just want to provide you with the details I've uncovered from the save file that Dan shared with me.

This is quite a detailed description, which I've summarised here in plain English; my working out is below.
I have identified that the bazaar only removes the 2nd (last) tile when draw, leaving the 1st to be duplicated.
I've confirmed that no other duplicate tiles have been played.
I have identified that the following tiles should be removed from the deck: BA.L, TB.CRc.g, BA.RCr, BA.Rr, BB.CCCR, TB.CcR.c

The fix seems relatively trivial, it's a silly bug by all accounts, there's a for loop that changes the game state for each tile, which clones the tilepack.
I can fix it, but it will need some testing.

However: If I fix it, the game save will begin to load the incorrect tiles (this is hard to explain, but i tried below).

So I propose the following:
1) I create a patch for JCZ to:  programatically discard the 6 duplicates so that you may continue the game
2) Fix it so future Bazaars remove cards from the deck correctly.
3) I test the behaviour with a 3rd party (TheSteveAllen are you busy?)

It's a easy fix, but can you confirm you're both happy to accept a patch of the JCZ jar to complete this game?



Below is how I've determined this...for the for the faint-hearted, but you can check out my debugging skillz:

Methodology:

I started looking at the tiles from Turn 12, after all the River2 tiles completed. Vector is the set of all tiles in the main deck, it excludes things like the Dragon tiles and Bazaars which is expected because it changes game state.  This is a conversation I had with Farin before because it confused me.  But it's a pretty good indicator the the remaining tiles:

Turn 12:
Vector(BA.C, BA.C, BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.Ccc, BA.Ccc+, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.CFR.b, BB.CFc.b, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LCFc, BB.LRFr, BB.R.bi, BB.RFR.b, BB.RFR.bi, BE.CFR, BE.CRr, BE.CcR, BE.Ccc, BE.RCc, BE.RrC, DG.C.v, DG.CC.v, DG.CCc+.p, DG.CRRR.p, DG.CRr.g, DG.Cc!.p, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.Ccc.p, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrC.g, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.NS.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, FL.Rr.SW.o, FL.Rr.d, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRc.w, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CcRR!.c, TB.CcRR.w, TB.Ccc.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RCc.g, TB.RRC, TB.RRrr)


Turn 13: Bazaar tile drawn:  BB.CFR.b
Vector: Vector(BA.C, BA.C, BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.Ccc, BA.Ccc+, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.CFR.b, BB.CFc.b, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LCFc, BB.LRFr, BB.R.bi, BB.RFR.b, BB.RFR.bi, BE.CFR, BE.CRr, BE.CcR, BE.Ccc, BE.RCc, BE.RrC, DG.C.v, DG.CC.v, DG.CCc+.p, DG.CRRR.p, DG.CRr.g, DG.Cc!.p, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.Ccc.p, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrC.g, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.NS.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, FL.Rr.SW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRc.w, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CcRR!.c, TB.CcRR.w, TB.Ccc.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RCc.g, TB.RRC, TB.RRrr)

Bazaar Phase tiles drawn: BA.L, BA.RFr

Turn 16 - Post Bazaar:
Vector: Vector(BA.C, BA.C, BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.Ccc, BA.Ccc+, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.CFc.b, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LCFc, BB.LRFr, BB.R.bi, BB.RFR.b, BB.RFR.bi, BE.CFR, BE.CRr, BE.CcR, BE.Ccc, BE.RCc, BE.RrC, DG.C.v, DG.CC.v, DG.CCc+.p, DG.CRRR.p, DG.CRr.g, DG.Cc!.p, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.Ccc.p, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrC.g, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.NS.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, FL.Rr.SW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRc.w, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CcRR!.c, TB.CcRR.w, TB.Ccc.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RCc.g, TB.RRC, TB.RRrr)

There is an extra: BA.L to discard!

Turn 23: Bazaar Tile is drawn: BB.R.bi
Vector: Vector(BA.C, BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.CFc.b, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LRFr, BB.R.bi, BB.RFR.b, BB.RFR.bi, BE.CFR, BE.CcR, BE.Ccc, BE.RCc, BE.RrC, DG.C.v, DG.CC.v, DG.CCc+.p, DG.CRRR.p, DG.CRr.g, DG.Cc!.p, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.Ccc.p, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.NS.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, FL.Rr.SW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRc.w, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CcRR!.c, TB.CcRR.w, TB.Ccc.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RCc.g, TB.RRC, TB.RRrr)

Bazaar Tiles drawn: TB.CcR.c, DG.C.d

Post Bazaar Turn 26:
Vector:Vector(BA.C, BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.CFc.b, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LRFr, BB.RFR.b, BB.RFR.bi, BE.CFR, BE.CcR, BE.Ccc, BE.RCc, BE.RrC, DG.C.v, DG.CC.v, DG.CCc+.p, DG.CRRR.p, DG.CRr.g, DG.Cc!.p, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.Ccc.p, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, FL.Rr.SW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRc.w, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CcRR!.c, TB.CcRR.w, TB.Ccc.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RCc.g, TB.RRC, TB.RRrr)

An Extra TB:CcR.c to discard!

Turn 32: Bazaar Tile drawn: BB.RFR.bi
Vector: Vector(BA.C, BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.CFc.b, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LRFr, BB.RFR.b, BB.RFR.bi, BE.CFR, BE.CcR, BE.Ccc, BE.RrC, DG.C.v, DG.CC.v, DG.CCc+.p, DG.CRRR.p, DG.CRr.g, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, FL.Rr.SW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRc.w, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CcRR.w, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RCc.g, TB.RRC, TB.RRrr)
Selected: TB.CRc.g, TB.CRc.w

Post Bazaar: Turn 35:
Vector: Vector(BA.C, BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.CFc.b, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LRFr, BB.RFR.b, BE.CFR, BE.CcR, BE.Ccc, BE.RrC, DG.C.v, DG.CC.v, DG.CCc+.p, DG.CRRR.p, DG.CRr.g, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, FL.Rr.SW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CcRR.w, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RCc.g, TB.RRC, TB.RRrr)


An Extra: TB.CRc.g to discard <--- Known Issue


Turn 38: Bazaar Tile drawn: BB.CFc.b
Vector: Vector(BA.C, BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.CFc.b, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LRFr, BB.RFR.b, BE.CFR, BE.CcR, BE.Ccc, BE.RrC, DG.C.v, DG.CC.v, DG.CRRR.p, DG.CRr.g, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CcRR.w, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RRC, TB.RRrr)

Bazaar Tiles Drawn: BA.RCr, BA.C

Turn 41 - Post Bazaar
Vector: Vector(BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LRFr, BB.RFR.b, BE.CFR, BE.CcR, BE.Ccc, BE.RrC, DG.C.v, DG.CC.v, DG.CRRR.p, DG.CRr.g, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CcRR.w, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RRC, TB.RRrr)

An Extra: BA.RCr to Discard

Turn 43: Bazaar Tile Drawn: BB.Cccc.b
Vector: Vector(BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.Cccc.b, BB.Cccc.b, BB.F.b, BB.LRFr, BB.RFR.b, BE.CcR, BE.Ccc, BE.RrC, DG.C.v, DG.CC.v, DG.CRRR.p, DG.CRr.g, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.Rr.v, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RRC, TB.RRrr)

Bazaar Tiles Selected: BA.Rr, DG.Rr.v

Turn 46 - Post Bazaar
Vector: Vector(BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CFc.1, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.Cccc.b, BB.F.b, BB.LRFr, BB.RFR.b, BE.CcR, BE.Ccc, BE.RrC, DG.C.v, DG.CC.v, DG.CRRR.p, DG.CRr.g, DG.Cc.p, DG.CcRr.g, DG.CcRr.p, DG.Ccc+.g, DG.F.v, DG.R.v, DG.RFr.v, DG.RRR.g, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.WE.o, FL.RFr.d, FL.Rr.NW.o, TB.CCc.c, TB.CCc.w, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCC.c, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RRC, TB.RRrr)

An Extra: BA.Rr to discard


Turn 55: Bazaar Tile Drawn - BB.Cccc.b
Vector: Vector(BA.C, BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.Cccc.b, BB.F.b, BB.LRFr, BB.RFR.b, BE.CcR, BE.Ccc, BE.RrC, DG.C.v, DG.CC.v, DG.CRRR.p, DG.CRr.g, DG.Cc.p, DG.CcRr.g, DG.Ccc+.g, DG.F.v, DG.R.v, DG.RRR.g, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.WE.o, FL.RFr.d, TB.CCc.c, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RRC, TB.RRrr)

Bazaar Tiles Drawn: BB.CCCR, BA.C

Post Bazaar - Turn 58:
Vector: Vector(BA.C, BA.C, BA.CC.2, BA.CC.2, BA.CFC.2, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CRRR, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.F.b, BB.LRFr, BB.RFR.b, BE.CcR, BE.Ccc, BE.RrC, DG.C.v, DG.CC.v, DG.CRRR.p, DG.CRr.g, DG.Cc.p, DG.CcRr.g, DG.Ccc+.g, DG.F.v, DG.R.v, DG.RRR.g, DG.RrRr.g, FL.F.d, FL.F.o, FL.RFr.WE.o, FL.RFr.d, TB.CCc.c, TB.CFc.w, TB.CR, TB.CRc.g, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RRC, TB.RRrr)

An Extra: BB.CCCR to discard.

Summary:
So each time a Bazaar is drawn, only the last tile is removed from the GameState.
The following need to be discarded:
BA.L , TB.CcR.c, TB.CRc.g , BA.RCr, BA.Rr, BB.CCCR

The game is currently on turn 76, and the following tiles remain:
Vector(BA.C, BA.C, BA.CFC.2, BA.CFc+, BA.CFc+, BA.CRRR, BA.CRRR, BA.CRr, BA.CRr, BA.CRr, BA.Cc+, BA.Cc.1, BA.Cc.1, BA.Cc.1, BA.CcRr, BA.CcRr, BA.CcRr+, BA.CcRr+, BA.Ccc, BA.Ccc, BA.CccR, BA.CccR+, BA.CccR+, BA.Cccc+, BA.L, BA.L, BA.LR, BA.LR, BA.RCr, BA.RCr, BA.RFr, BA.RFr, BA.RFr, BA.RFr, BA.RRR, BA.RRR, BA.RRRR, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.Rr, BA.RrC, BA.RrC, BA.RrC, BB.CCCR, BB.CFR!, BB.F.b, BB.LRFr, BB.RFR.b, BE.CcR, BE.RrC, DG.C.v, DG.CRRR.p, DG.CRr.g, DG.Cc.p, DG.CcRr.g, DG.F.v, DG.R.v, FL.F.d, FL.F.o, FL.RFr.d, TB.CCc.c, TB.CR, TB.CRc.g, TB.CRcR.w, TB.Cc.g, TB.Cc.w, TB.CcCc.w, TB.CcR!.w, TB.CcR.c, TB.CcRC.c, TB.CcRC.g, TB.CccR.w, TB.LRRR, TB.RCc!.g, TB.RRC, TB.RRrr)


In conclusion of investigation:
So all the duplicate tiles can be removed: BA.L, TB.CRc.g, BA.RCr, BA.Rr, BB.CCCR, TB.CcR.c
The Bazaar only removes the 2nd (last tile) selected from the draw.

The save files do not store remaining tiles, nor discarded ones.
Instead it plays every turn through all the drawing/placement code.
It saves actions and saves salts to re-generate the same random number.
If I fix the bug, the bazaar will remove 2 random tiles from the vector : eg: #45 and #35.
But the next random tile drawn will be #100 - post-bug-fix tile #100 --> #101
So I think I need to add a specific clause to rescue this game...eg:

if(turn > 76) {
 tilepack.drawn( the 6-problem tiles).discard()
}
and
if (turn >76) {
 fix the bazaar
}

It's a relatively easy code change which I can build quickly.

I should test it properly with someone other than Dan or MrNumbers.

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: 2017 World Cup - Knock-Out Stage
« Reply #84 on: April 15, 2018, 07:00:13 AM »
I've produced a patch which I think you can use to finish the game.  Logistically, it's a bit like finding out some extra tiles were in the bag and removing them before continuing and making sure it doesn't happen again.

The modifications to JCZ were trivial:

First:  On turn 76 discard the duplicate tiles, then draw a new random tile.

Second:  On turns  < 76 if a Bazaar is drawn, keep doing what the code used to do.
For future turns: Draw the tile from the game state's tilepack, which ensures both tiles are removed.

Screenshots attached.

I've quickly run through and can now see two tiles being removed from the game state. Could do with some more testing, but seems solid.

Let me know how you want to proceed.

Offline Jéré

  • Chatelain
  • ******
  • Posts: 1187
  • Merit: 62
    • View Profile
2017 World Cup - Knock-Out Stage
« Reply #85 on: April 15, 2018, 08:10:00 AM »
I've produced a patch which I think you can use to finish the game.  Logistically, it's a bit like finding out some extra tiles were in the bag and removing them before continuing and making sure it doesn't happen again.

The modifications to JCZ were trivial:

First:  On turn 76 discard the duplicate tiles, then draw a new random tile.

Second:  On turns  < 76 if a Bazaar is drawn, keep doing what the code used to do.
For future turns: Draw the tile from the game state's tilepack, which ensures both tiles are removed.

Screenshots attached.

I've quickly run through and can now see two tiles being removed from the game state. Could do with some more testing, but seems solid.

Let me know how you want to proceed.

While you’re hacking the saved game could you add a function to replace both player names with string “Jéré”... yes, both, just to be sure... emoji code4]

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: 2017 World Cup - Knock-Out Stage
« Reply #86 on: April 15, 2018, 08:14:38 AM »
While you’re hacking the saved game could you add a function to replace both player names with string “Jéré”... yes, both, just to be sure... emoji code4]

Actually...you can do that already when the save loads  ;D

Offline TheSteveAllen

  • Marquis
  • ***
  • Posts: 457
  • Merit: 25
  • Power to the Meeple!
    • View Profile
Re: 2017 World Cup - Knock-Out Stage
« Reply #87 on: April 15, 2018, 09:59:27 AM »
Ok Decar. How can I help? I should be available this evening.

Offline thodekey

  • Count
  • **
  • Posts: 383
  • Merit: 9
  • I feel Carc-complete or do I?!
    • View Profile
Re: 2017 World Cup - Knock-Out Stage
« Reply #88 on: April 16, 2018, 01:38:53 PM »
Hmmm, I wonder if the WC 2017 will be finished before the WC 2018 does...?   :o

To avoid further complications like that, I suggest we start again a testing JCZ-team...along with the new expansions Farin introduced like the ferries.  What do you think, TheSteveAllen and others?

Offline danisthirty

  • (not thirSty!)
  • Owner
  • Chatelain Grand-Croix
  • *
  • *
  • Posts: 6940
  • Merit: 293
  • "First to 4 points wins?"
    • View Profile
Re: 2017 World Cup - Knock-Out Stage
« Reply #89 on: April 17, 2018, 02:50:47 AM »
Many thanks for your extensive efforts Decar! (+1 merit) And sorry for not responding sooner, but I was allowing time to see if MrNumbers had anything to add first...

From what I can tell it sounds as though you've put a workaround in place to prevent the Bazaar bug from duplicating any more tiles and have removed the duplicate tiles that it had already created? If this is the case, I see no reason why the game can't go ahead from the save game as long as we can undo my last turn (where I placed the duplicate crcf with wheat) and have this tile discarded.

This is my preference as the game is already underway (and half complete).


Share via delicious Share via digg Share via facebook Share via furl Share via linkedin Share via myspace Share via reddit Share via stumble Share via technorati Share via twitter

  Subject / Started by Replies / Views Last post
xx
World Cup - Knock-out Stage!

Started by danisthirty

117 Replies
39184 Views
Last post March 04, 2015, 07:01:52 AM
by Jéré
clip
2016 World Cup - Knock-Out Stage

Started by MrNumbers

63 Replies
22695 Views
Last post February 01, 2017, 01:59:24 AM
by Jéré
xx
2015 World Cup of Carcassonne Central - Knock-Out Stage

Started by danisthirty

160 Replies
61213 Views
Last post February 08, 2017, 02:46:16 PM
by danisthirty
xx
2017 World Cup - Group B

Started by MrNumbers

59 Replies
17929 Views
Last post February 10, 2018, 04:50:28 AM
by TheSteveAllen
xx
Follow-up World Cup 2017

Started by MrNumbers

18 Replies
7675 Views
Last post February 14, 2018, 05:49:04 AM
by TheSteveAllen