[RESOLVED] Premature win declaration

Members can make suggestions for improving the site and improving the forum as well as submit bug reports to be reviewed by our support team here.
Post Reply
Message
Author
peterlund
Gold Donator
Gold Donator
Posts: 1042
Joined: Thu Oct 19, 2017 4:52 pm
Location: Sverige
Karma: 387
Contact:

[RESOLVED] Premature win declaration

#1 Post by peterlund » Sun May 13, 2018 11:20 am

Is there any progress on the adjudicator bug I reported a while ago?
peterlund wrote:
Sun Apr 29, 2018 8:28 pm
The diplomacy adjudicator is buggy! It declared a win to Germany in this game even though Spain can retreat to Portugal.

http://webdiplomacy.net/board.php?gameID=220696
4

ChippeRock
Posts: 1167
Joined: Thu Oct 19, 2017 5:36 pm
Karma: 117
Contact:

Re: Premature win declaration

#2 Post by ChippeRock » Sun May 13, 2018 12:22 pm

I agree with peterlund, even though his game might not be the best example you should change the code so that the game will detect when a solo might not occur due to a retreat.

I still like the "instant win" that currently occurs when you hit 18 SCs because it results in not having to go through an extra useless phase but sometimes that extra phase isn't useless and I think the game should detect this and allow the game to go to the Retreats phase so the player(s) are given the opportunity to prevent the solo.
1

User avatar
JECE
Posts: 1478
Joined: Sun Dec 31, 2017 4:35 pm
Karma: 393
Contact:

Re: Premature win declaration

#3 Post by JECE » Sun May 13, 2018 2:11 pm

I thought that this had been fixed years ago. :-(
1

jmo1121109
Lifetime Site Contributor
Posts: 1099
Joined: Fri Sep 29, 2017 4:20 pm
Karma: 2944
Contact:

Re: Premature win declaration

#4 Post by jmo1121109 » Mon May 14, 2018 2:59 pm

Multiple pending code reviews were just finished in the last day, so ideally this fix will be coming soon.
2

Kremmen
Posts: 53
Joined: Sun Dec 31, 2017 2:14 am
Karma: 41
Contact:

Re: Premature win declaration

#5 Post by Kremmen » Fri May 25, 2018 8:05 pm

I just lost a game due to this. I don't suppose there's any chance of erasing game results caused by the bug awarding an incorrect victory?
1

jmo1121109
Lifetime Site Contributor
Posts: 1099
Joined: Fri Sep 29, 2017 4:20 pm
Karma: 2944
Contact:

Re: Premature win declaration

#6 Post by jmo1121109 » Fri May 25, 2018 9:53 pm

Unfortunately, the fix is ready to go, but because of some bug fixes that had to go live on the server I can't make any site changes until 1 of the 2 code reviewers approve my pending PR request.

Claesar
Posts: 1965
Joined: Tue Oct 03, 2017 10:34 am
Karma: 1490
Contact:

Re: Premature win declaration

#7 Post by Claesar » Fri May 25, 2018 11:29 pm

Kremmen wrote:
Fri May 25, 2018 8:05 pm
I just lost a game due to this. I don't suppose there's any chance of erasing game results caused by the bug awarding an incorrect victory?
Usually not, but if you feel the solo could've been prevented if this bug didn't exist please email the mods at [email protected] and we'll take appropiate action.

Kremmen
Posts: 53
Joined: Sun Dec 31, 2017 2:14 am
Karma: 41
Contact:

Re: Premature win declaration

#8 Post by Kremmen » Sat May 26, 2018 3:44 am

Claesar wrote:
Fri May 25, 2018 11:29 pm
Usually not, but if you feel the solo could've been prevented if this bug didn't exist please email the mods at [email protected] and we'll take appropiate action.
OK. Thanks. (Not just prevented. The game was awarded as 18 SCs vs 14 when I had two retreats into enemy territories. Should have been 16 SCs vs 16, with my opponent having only 1 free home SC and therefore only 1 build possible.)
2


peterlund
Gold Donator
Gold Donator
Posts: 1042
Joined: Thu Oct 19, 2017 4:52 pm
Location: Sverige
Karma: 387
Contact:

Re: Premature win declaration

#10 Post by peterlund » Sat May 26, 2018 7:39 pm

Horrendous really!

That is why I abstain all diplomacy play on this server until this bug is fixed!
2

jmo1121109
Lifetime Site Contributor
Posts: 1099
Joined: Fri Sep 29, 2017 4:20 pm
Karma: 2944
Contact:

Re: Premature win declaration

#11 Post by jmo1121109 » Mon May 28, 2018 5:16 pm

Fixed, see http://www.webdiplomacy.net/board.php?gameID=223421 as proof.
Autumn 06 would have previously been a win for France.
7

peterlund
Gold Donator
Gold Donator
Posts: 1042
Joined: Thu Oct 19, 2017 4:52 pm
Location: Sverige
Karma: 387
Contact:

Re: [RESOLVED] Premature win declaration

#12 Post by peterlund » Mon May 28, 2018 6:22 pm

VERY NICE! That proves that the last known adjudicator bug has been fixed. Great work everyone involved!

User avatar
JECE
Posts: 1478
Joined: Sun Dec 31, 2017 4:35 pm
Karma: 393
Contact:

Re: [RESOLVED] Premature win declaration

#13 Post by JECE » Tue May 29, 2018 1:37 am

I think that it's time to expand the DATC test cases now to 6.H, 6.I and 6.J:
http://webdiplomacy.net/datc.php
1

CptMike
Posts: 309
Joined: Sun Dec 31, 2017 8:12 am
Location: Liège, BE
Karma: 54
Contact:

Re: Premature win declaration

#14 Post by CptMike » Tue May 29, 2018 7:25 pm

jmo1121109 wrote:
Mon May 28, 2018 5:16 pm
Fixed, see http://www.webdiplomacy.net/board.php?gameID=223421 as proof.
Autumn 06 would have previously been a win for France.
There is no more mistake but the bug is not fixed...

This game should have ended in Autumn given the retreat from Moscow can't change the final result...

Anyway that's not a big issue and certainly not as critical as the consequences of the bug!

peterlund
Gold Donator
Gold Donator
Posts: 1042
Joined: Thu Oct 19, 2017 4:52 pm
Location: Sverige
Karma: 387
Contact:

Re: [RESOLVED] Premature win declaration

#15 Post by peterlund » Tue May 29, 2018 7:47 pm

I believe that the bug fix forces the autumn retreat to always be performed regardless of whether or not there is a retreat into a SC. The possible win is only calculated after the autumn retreats. Please correct me if I got this wrong!

bo_sox48
Site Admin
Site Admin
Posts: 3901
Joined: Thu Jun 08, 2017 1:01 am
Karma: 2785
Contact:

Re: [RESOLVED] Premature win declaration

#16 Post by bo_sox48 » Tue May 29, 2018 11:32 pm

Yes, the adjudicator no longer checks for a winner until the retreat phase has been processed. That is how the bug was fixed.
1

jmo1121109
Lifetime Site Contributor
Posts: 1099
Joined: Fri Sep 29, 2017 4:20 pm
Karma: 2944
Contact:

Re: [RESOLVED] Premature win declaration

#17 Post by jmo1121109 » Wed May 30, 2018 12:40 am

peterlund wrote:
Tue May 29, 2018 7:47 pm
I believe that the bug fix forces the autumn retreat to always be performed regardless of whether or not there is a retreat into a SC. The possible win is only calculated after the autumn retreats. Please correct me if I got this wrong!
There will not always be an autumn retreat, only if there are retreat moves possible. But you are right in that it does not check out of the retreating units whether any are capable of retreating into a supply center. The reason for this is that the code would have to be unique across variants, so here, and even more so on vDip where it was coded, that isn't a feasible option.
2

jmo1121109
Lifetime Site Contributor
Posts: 1099
Joined: Fri Sep 29, 2017 4:20 pm
Karma: 2944
Contact:

Re: [RESOLVED] Premature win declaration

#18 Post by jmo1121109 » Wed May 30, 2018 12:45 am

For anyone curious, here's the added code block:

https://github.com/kestasjk/webDiplomacy/pull/322/files

Code: Select all

// If there is a diplpmacy-phase check for a retreating-phase and wait another round for the retreats to finish.
+	if ($this->Game->phase == 'Diplomacy')
+	{
+		list($retreating) = $DB->sql_row("SELECT COUNT(retreatingUnitID) FROM wD_TerrStatus WHERE gameID=".$this->Game->id);
+		if($retreating)
+			return false;
+	}
2

Post Reply

Who is online

Users browsing this forum: No registered users and 74 guests