[bug #27751] Negative holding counts displayed?

View: New views
7 Messages — Rating Filter:   Alert me  

[bug #27751] Negative holding counts displayed?

by Evgenii Philippov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


URL:
  <http://savannah.gnu.org/bugs/?27751>

                 Summary: Negative holding counts displayed?
                 Project: XBoard
            Submitted by: None
            Submitted on: Mon 19 Oct 2009 07:48:40 AM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

On FICS use smoves on a bughouse game e.g.:
smoves BugBug 53

When stepping throught the game you can see characters like "/" being
displayed where normally the number of pieces in the holding is shown. On a
move that inserts a black pawn the symbol for "black pawn count" is changed,
so I assume these are caused by negative counts.

Examining the same game and stepping throught doesn't show this effect.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27751>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27751] Negative holding counts displayed?

by Evgenii Philippov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #1, bug #27751 (project xboard):

When you load a bughouse game with "smoves" the ICS does not tell you what
you were holding on every move. When XBoard grabs the game from the move list,
it reconstucts the positions from the (known) initial setup of bughouse by
playing the moves from the move list. But, unlike crazyhouse, a capture in
bughouse does not put the captured piece in your own holdings. These holdings
can only be filled by what is handed to you by your partner, and this info is
not included in the "smoves" list. So the reconstruction of the game by XBoard
from the moves list will in general contain wrong holdings. And this is what
you step through using the arrows after smoves.

When you are examining the game, it is the ICS that reconstructs the game
positions, and it sends a board + holdings for every position you step
through.

I don't know how to fix the basic problem of the holdings being invalid in a
re-loaded bughouse game; it does not seem you can request this info from the
ICS. The particular problem of negative counts can of course be fixed by not
flagging drop moves in an ICS bughouse game as illegal when the piece is not
in the holding, but suppress the decrementing to negative holding counts in
that case. (Currently I think drop moves are not tested for legality at all in
XBoard, except that dropping Pawns on the 1st / 8th rank is considered
illegal.) WinBoard must already do this, as I did not see the effect you
mention there. As long as the negative counts do not crash XBoard, this is
merely a cosmetic change; the holdings will still be crap in this situation
even after I would fix this.

I will have a look why this happens in XBoard, and not in WinBoard, though.
Code preventing the counts to become negative belongs in the back-end, not in
the front-end!

H.G. Muller

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27751>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27751] Negative holding counts displayed?

by Evgenii Philippov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #2, bug #27751 (project xboard):

To me just not displaying the "buggy" characters would have been the solution
(and to make sure there are no other side effects by those unknown holdings).

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27751>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27751] Negative holding counts displayed?

by Evgenii Philippov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #3, bug #27751 (project xboard):

This was essentially what WinBoard was doing. Having negative counts can
potentially produce unpredictable effects when converting the position to a
FEN (for saving the position, or sending it to an engine with a setboard
command), so it is better to keep a consistent and valid holdings state at all
times, even i it is not the correct one.

The fixed version will appear in git soon.

H.G. Muller

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27751>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27751] Negative holding counts displayed?

by Evgenii Philippov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27751 (project xboard):

                  Status:                    None => Ready For Test        

    _______________________________________________________

Follow-up Comment #4:

uploaded the patch from HGM.

I guess we only could resolve this if we keep track of the partners game,
which is something that we should do at one point, but it will take a while
until we get there...

ARUN

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27751>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27751] Negative holding counts displayed?

by Evgenii Philippov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #5, bug #27751 (project xboard):

This fix works for me in v4.4.1.20091019.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27751>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard

[bug #27751] Negative holding counts displayed?

by Evgenii Philippov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27751 (project xboard):

                  Status:          Ready For Test => Fixed                  
             Open/Closed:                    Open => Closed                


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27751>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-XBoard mailing list
Bug-XBoard@...
http://lists.gnu.org/mailman/listinfo/bug-xboard