Carcassonne Central

Carc Central Community => Online Games and Competitions => JCloisterZone FAQ, Suggestions & Bug Reports => Topic started by: danisthirty on March 27, 2018, 02:19:41 AM

Title: JCZ: Score the Farm - self merging fields
Post by: danisthirty on March 27, 2018, 02:19:41 AM
Hello!

Following a great game with TheSteveAllen last night, we couldn't justify why the farm shown below is worth 54 points so I was wondering if someone else could help us? O:-)

(http://www.dan.tehill.net/FarmSize.png)

- I see 7 complete cities + 1 besieged city
- The farm includes the pig herd tile from River 2
- Both pigs (Yellow and Blue) are included in the farm

The only thing we could think that might explain it is if both pigs were scored for the same player which would be 6 points per regular city (3 + 1 {pig herd} + 1 {Yellow pig} + 1 {Blue pig}) x 7 = 42. Then 12 points for the besieged city which scores the same as 2 regular cities (so 6 x 2). This gives a total of 54 points, but I'm fairly sure that the Blue pig shouldn't have been scored by Yellow!

Another idea is that maybe the fairy awarded an additional point per city (and 2 for the besieged city). Fairly sure this isn't the case, and even if it was I'd expect to see the additional points in the Fairy section of the scores breakdown which isn't where it was...

Any suggestions or should we be reporting this to farin?
Title: Re: Score the Farm (help please!)
Post by: Halfling on March 27, 2018, 03:11:02 AM
I would expect the farm to be worth 45 points, if the river II pig farm is in play.
Therefore a bug report seems necessary.

I can't offer a better explanation for the extra 9 points.
Title: Re: Score the Farm (help please!)
Post by: Decar on March 27, 2018, 03:26:08 AM
That Castle is on a tile has the farm in question on it; but it's not in the farm itself.  That may be where the extra points came from.
Title: Re: Score the Farm (help please!)
Post by: cletus81 on March 27, 2018, 03:41:41 AM
Did you consider that the city bridge does not separate fields? You should also add one more city and the castle.
In this way we have 8 completed cities (8*4=32) + 1 besieged city (8 ) + 1 castle (5). In this way I can arrive at 45 points. We cannot see the upper bound of the game, maybe is there something else that worth some points?
Title: Re: Score the Farm (help please!)
Post by: dirk2112 on March 27, 2018, 03:44:17 AM
I agree with Halfling.  Value per city = 5 (3 +1 for pig + 1 for pig farm), so  7 cities * 5  = 35.  A besieged city is double so 10 giving you 45. 
Title: Re: Score the Farm (help please!)
Post by: Rosco on March 27, 2018, 03:47:45 AM
Agreed - should be 45 points.

Sent from my SM-A320FL using Tapatalk

Title: Re: Score the Farm (help please!)
Post by: cletus81 on March 27, 2018, 03:53:58 AM
Did you consider that the city bridge does not separate fields? You should also add one more city and the castle.
In this way we have 8 completed cities (8*4=32) + 1 besieged city (8 ) + 1 castle (5). In this way I can arrive at 45 points. We cannot see the upper bound of the game, maybe is there something else that worth some points?
Wait a minute, I didn't see the yellow pig. This means 5 points per completed city. This brings my final computation to 56 (8 completed cities = 40) + (1 besieged city = 10) + 1 castle (6).
Maybe it scored both pig and pig herd tile only once for besieged city and castle...
Title: Re: Score the Farm (help please!)
Post by: Rosco on March 27, 2018, 04:07:19 AM
Did you consider that the city bridge does not separate fields? You should also add one more city and the castle.
In this way we have 8 completed cities (8*4=32) + 1 besieged city (8 ) + 1 castle (5). In this way I can arrive at 45 points. We cannot see the upper bound of the game, maybe is there something else that worth some points?
Wait a minute, I didn't see the yellow pig. This means 5 points per completed city. This brings my final computation to 56 (8 completed cities = 40) + (1 besieged city = 10) + 1 castle (6).
Maybe it scored both pig and pig herd tile only once for besieged city and castle...
The bridge does not separate fields but the river does.  Castle and all cities in that field are not in the main farm.

Sent from my SM-A320FL using Tapatalk

Title: Re: Score the Farm (help please!)
Post by: danisthirty on March 27, 2018, 04:16:39 AM
Thanks for your posts everyone. :(y)

Did you consider that the city bridge does not separate fields? You should also add one more city and the castle.
In this way we have 8 completed cities (8*4=32) + 1 besieged city (8 ) + 1 castle (5). In this way I can arrive at 45 points. We cannot see the upper bound of the game, maybe is there something else that worth some points?
Wait a minute, I didn't see the yellow pig. This means 5 points per completed city. This brings my final computation to 56 (8 completed cities = 40) + (1 besieged city = 10) + 1 castle (6).
Maybe it scored both pig and pig herd tile only once for besieged city and castle...
The bridge does not separate fields but the river does.  Castle and all cities in that field are not in the main farm.

Yes, exactly. You don't need to see the rest of the game to see the farm in full detail.

The farm extends under the city bridge but it doesn't add anything to it unless it can go round the top of the river. But it's blocked there by the city cap at the end of the river next to the cccf split city with silk token.
Title: Re: Score the Farm (help please!)
Post by: cletus81 on March 27, 2018, 06:08:53 AM
Thanks for your posts everyone. :(y)

Did you consider that the city bridge does not separate fields? You should also add one more city and the castle.
In this way we have 8 completed cities (8*4=32) + 1 besieged city (8 ) + 1 castle (5). In this way I can arrive at 45 points. We cannot see the upper bound of the game, maybe is there something else that worth some points?
Wait a minute, I didn't see the yellow pig. This means 5 points per completed city. This brings my final computation to 56 (8 completed cities = 40) + (1 besieged city = 10) + 1 castle (6).
Maybe it scored both pig and pig herd tile only once for besieged city and castle...
The bridge does not separate fields but the river does.  Castle and all cities in that field are not in the main farm.

Yes, exactly. You don't need to see the rest of the game to see the farm in full detail.

The farm extends under the city bridge but it doesn't add anything to it unless it can go round the top of the river. But it's blocked there by the city cap at the end of the river next to the cccf split city with silk token.
I am sorry, I didn't see the two cities are touching, separating the fields...
Title: Re: Score the Farm (help please!)
Post by: danisthirty on March 27, 2018, 06:18:59 AM
Nothing to apologise for! Thanks for getting involved in the first place ;) :(y)
Title: Re: Score the Farm (help please!)
Post by: Decar on March 29, 2018, 11:22:32 AM
I've finished my analysis!

JCZ thinks there are 2 pig Herd tiles in the farm.

Everytime a tile is added to the board, farms are merged.  When merging takes place the number of pigHerds are added together.

But this does not explain why JCZ thinks there are 2 pig herds.

Digging further I have listed all the tiles with a pigHerd that join another Farm.

The tiles are merged in the following order, each with a unique name, location on the board and orientation:

R2.RIrI,[4,4],R0
BB.F.b,[3,3],R0
TB.CR,[2,1],R0
DG.F.v,[0,-1],R0
TB.Cc.g,[-1,-1],R270
FL.Rr.d,[0,-2],R270
TB.LRRR,[0,-3],R90
TB.CcR!.w,[0,1],R180
BA.RFr,[3,4],R0
BA.RRR,[2,4],R270
BA.Rr,[2,3],R0
TB.Cc.w,[1,4],R0
BA.RFr,[-1,-3],R0
BA.Rr,[-2,-3],R270
BA.Rr,[0,3],R270
BA.Rr,[0,3],R270


You will see that the final tile is being merged twice.
We can see the basic game, FFRR tile in location 0,3 in Dan's screen shot.

So I went further down the Rabbit hole:

When the tile is first added, the Game State, Place Tiles contains:
LinkedHashMap(([0,0], R2.I.s,[0,0],R0), ([1,0], R2.III,[1,0],R0), ([2,0], R2.CIcI,[2,0],R270), ([3,0], R2.CcII+,[3,0],R90), ([3,1], R2.CIRI,[3,1],R90), ([3,2], R2.II+,[3,2],R90), ([4,2], R2.RrII,[4,2],R0), ([1,-1], R2.IFC,[1,-1],R270), ([4,3], R2.LIFI,[4,3],R270), ([4,4], R2.RIrI,[4,4],R0), ([4,5], R2.II,[4,5],R180), ([5,5], R2.I.v,[5,5],R0), ([3,-1], BB.Cccc.b,[3,-1],R0), ([4,0], DG.CFc+.d,[4,0],R0), ([2,-1], TB.CCc.c,[2,-1],R270), ([3,-2], BA.Ccc,[3,-2],R90), ([-1,0], BA.Ccc+,[-1,0],R270), ([1,-2], DG.CRr.g,[1,-2],R180), ([3,3], BB.F.b,[3,3],R0), ([1,1], BA.Cc.1,[1,1],R270), ([-1,1], TB.CcRR.w,[-1,1],R0), ([4,-1], BA.CC.2,[4,-1],R0), ([2,1], TB.CR,[2,1],R0), ([5,0], DG.C.d,[5,0],R270), ([-2,0], BB.Cccc.b,[-2,0],R0), ([4,-2], BA.CccR+,[4,-2],R270), ([0,-1], DG.F.v,[0,-1],R0), ([4,1], TB.RRC,[4,1],R270), ([5,2], DG.RFr.v,[5,2],R180), ([4,-3], BA.CRr,[4,-3],R180), ([6,2], DG.RFr.d,[6,2],R0), ([6,1], BA.Cc+,[6,1],R90), ([7,2], BA.Rr,[7,2],R0), ([6,3], BE.CcR,[6,3],R180), ([7,3], TB.CRc.w,[7,3],R180), ([-2,1], BA.CcRr,[-2,1],R90), ([-1,2], BB.RFR.bi,[-1,2],R180), ([1,-3], BA.Rr,[1,-3],R270), ([2,-3], DG.RRR.g,[2,-3],R0), ([2,-4], BA.RFr,[2,-4],R0), ([3,-3], BA.RCr,[3,-3],R180), ([4,-4], TB.CccR.w,[4,-4],R0), ([5,-2], BA.RFr,[5,-2],R0), ([0,2], DG.CC.v,[0,2],R0), ([-1,-1], TB.Cc.g,[-1,-1],R270), ([6,-2], BA.CRRR,[6,-2],R90), ([-3,1], TB.CRc.g,[-3,1],R270), ([0,-2], FL.Rr.d,[0,-2],R270), ([0,-3], TB.LRRR,[0,-3],R90), ([-3,0], TB.CcRC.c,[-3,0],R180), ([-2,-1], BA.CcRr,[-2,-1],R180), ([0,-4], DG.Rr.d,[0,-4],R270), ([-4,1], BA.Cc.1,[-4,1],R270), ([-3,2], TB.CcCC.c,[-3,2],R270), ([7,-2], BA.Ccc,[7,-2],R0), ([7,1], BA.Cc.1,[7,1],R0), ([5,1], BB.R.bi,[5,1],R90), ([-2,2], TB.CcR.c,[-2,2],R270), ([-1,3], DG.Rr.d,[-1,3],R90), ([1,2], TB.CCc.w,[1,2],R90), ([-2,3], BA.CRRR,[-2,3],R0), ([6,-3], BA.CcRr+,[6,-3],R90), ([0,1], TB.CcR!.w,[0,1],R180), ([1,-4], BA.RFr,[1,-4],R0), ([5,-1], BA.LR,[5,-1],R270), ([1,3], BA.CFC.2,[1,3],R0), ([6,-1], BA.CRr,[6,-1],R180), ([3,4], BA.RFr,[3,4],R0), ([-2,4], BA.RRRR,[-2,4],R0), ([7,0], BA.CC.2,[7,0],R270), ([6,0], TB.CCc.c,[6,0],R270), ([7,-3], DG.Ccc.p,[7,-3],R270), ([2,4], BA.RRR,[2,4],R270), ([8,-2], BA.RCr,[8,-2],R270), ([7,-4], DG.CRRR.p,[7,-4],R180), ([2,3], BA.Rr,[2,3],R0), ([-2,-2], BB.LRFr,[-2,-2],R90), ([1,4], TB.Cc.w,[1,4],R0), ([-1,-3], BA.RFr,[-1,-3],R0), ([6,-4], BB.CCCR,[6,-4],R270))

On the second merging the game state placed tiles contains::
LinkedHashMap(([0,0], R2.I.s,[0,0],R0), ([1,0], R2.III,[1,0],R0), ([2,0], R2.CIcI,[2,0],R270), ([3,0], R2.CcII+,[3,0],R90), ([3,1], R2.CIRI,[3,1],R90), ([3,2], R2.II+,[3,2],R90), ([4,2], R2.RrII,[4,2],R0), ([1,-1], R2.IFC,[1,-1],R270), ([4,3], R2.LIFI,[4,3],R270), ([4,4], R2.RIrI,[4,4],R0), ([4,5], R2.II,[4,5],R180), ([5,5], R2.I.v,[5,5],R0), ([3,-1], BB.Cccc.b,[3,-1],R0), ([4,0], DG.CFc+.d,[4,0],R0), ([2,-1], TB.CCc.c,[2,-1],R270), ([3,-2], BA.Ccc,[3,-2],R90), ([-1,0], BA.Ccc+,[-1,0],R270), ([1,-2], DG.CRr.g,[1,-2],R180), ([3,3], BB.F.b,[3,3],R0), ([1,1], BA.Cc.1,[1,1],R270), ([-1,1], TB.CcRR.w,[-1,1],R0), ([4,-1], BA.CC.2,[4,-1],R0), ([2,1], TB.CR,[2,1],R0), ([5,0], DG.C.d,[5,0],R270), ([-2,0], BB.Cccc.b,[-2,0],R0), ([4,-2], BA.CccR+,[4,-2],R270), ([0,-1], DG.F.v,[0,-1],R0), ([4,1], TB.RRC,[4,1],R270), ([5,2], DG.RFr.v,[5,2],R180), ([4,-3], BA.CRr,[4,-3],R180), ([6,2], DG.RFr.d,[6,2],R0), ([6,1], BA.Cc+,[6,1],R90), ([7,2], BA.Rr,[7,2],R0), ([6,3], BE.CcR,[6,3],R180), ([7,3], TB.CRc.w,[7,3],R180), ([-2,1], BA.CcRr,[-2,1],R90), ([-1,2], BB.RFR.bi,[-1,2],R180), ([1,-3], BA.Rr,[1,-3],R270), ([2,-3], DG.RRR.g,[2,-3],R0), ([2,-4], BA.RFr,[2,-4],R0), ([3,-3], BA.RCr,[3,-3],R180), ([4,-4], TB.CccR.w,[4,-4],R0), ([5,-2], BA.RFr,[5,-2],R0), ([0,2], DG.CC.v,[0,2],R0), ([-1,-1], TB.Cc.g,[-1,-1],R270), ([6,-2], BA.CRRR,[6,-2],R90), ([-3,1], TB.CRc.g,[-3,1],R270), ([0,-2], FL.Rr.d,[0,-2],R270), ([0,-3], TB.LRRR,[0,-3],R90), ([-3,0], TB.CcRC.c,[-3,0],R180), ([-2,-1], BA.CcRr,[-2,-1],R180), ([0,-4], DG.Rr.d,[0,-4],R270), ([-4,1], BA.Cc.1,[-4,1],R270), ([-3,2], TB.CcCC.c,[-3,2],R270), ([7,-2], BA.Ccc,[7,-2],R0), ([7,1], BA.Cc.1,[7,1],R0), ([5,1], BB.R.bi,[5,1],R90), ([-2,2], TB.CcR.c,[-2,2],R270), ([-1,3], DG.Rr.d,[-1,3],R90), ([1,2], TB.CCc.w,[1,2],R90), ([-2,3], BA.CRRR,[-2,3],R0), ([6,-3], BA.CcRr+,[6,-3],R90), ([0,1], TB.CcR!.w,[0,1],R180), ([1,-4], BA.RFr,[1,-4],R0), ([5,-1], BA.LR,[5,-1],R270), ([1,3], BA.CFC.2,[1,3],R0), ([6,-1], BA.CRr,[6,-1],R180), ([3,4], BA.RFr,[3,4],R0), ([-2,4], BA.RRRR,[-2,4],R0), ([7,0], BA.CC.2,[7,0],R270), ([6,0], TB.CCc.c,[6,0],R270), ([7,-3], DG.Ccc.p,[7,-3],R270), ([2,4], BA.RRR,[2,4],R270), ([8,-2], BA.RCr,[8,-2],R270), ([7,-4], DG.CRRR.p,[7,-4],R180), ([2,3], BA.Rr,[2,3],R0), ([-2,-2], BB.LRFr,[-2,-2],R90), ([1,4], TB.Cc.w,[1,4],R0), ([-1,-3], BA.RFr,[-1,-3],R0), ([6,-4], BB.CCCR,[6,-4],R270), ([-2,-3], BA.Rr,[-2,-3],R270), ([-3,3], BA.CccR+,[-3,3],R270), ([0,4], BA.C,[0,4],R90), ([-4,3], BA.CFC.2,[-4,3],R270), ([6,-5], BA.RrC,[6,-5],R180), ([0,3], BA.Rr,[0,3],R270))


This suggests that the BA.Rr tile was added to the board twice and to the same location, but that doesn't seem to be the case: the turn number was still 76 during the second merge and later in the game the Rr tile is only in the GameState once.

The PlaceTile apply() method looks to be where something is going wrong, but I can't be certain.

I think when the tile is added, both the north and south sides of the tile are merged to the greater farm and in the process both are merged together again (double folded)
It could also be something to do with that Bridge on the neighbouring tile, as the two adjacent farms NORTH/SOUTH are actually the same reference.  So maybe North merged to North, South Merged to South and then a check that both sides are merged took place..... I'm not sure I'm speculating.

Possibly something to do with the Bazzars offering the same tile twice bug too - Dan and Steve do you remember anything weird happening when you played that FFRR tile from the base game?

I'll move this over the the JCZ forum