buggnubg - Bugs: bug #59209, Game result is not properly...

 
 

bug #59209: Game result is not properly recorded into a relational database

Submitted by:  None
Submitted on:  Thu 01 Oct 2020 04:33:16 AM UTC  
 
Originator Name:  aldentea Originator Email:  -email is unavailable-
Item Group:  Other bug Category:  Other
Release:  1.06 Privacy:  Public
Operating System:  All Severity:  3 - Normal
Open/Closed:  Open Assigned to:  None
Priority:  5 - Normal Status:  Confirmed

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 05 Oct 2020 08:42:58 PM UTC, comment #3: 

The issue has been there since the beginning. Fixing it for new additions will be easy.

The difficulty is more with correcting existing databases. Doing it transparently from gnubg looks cumbersome. An external SQL script assuming that the imported sessions or matches had been analyzed (hence one can use the sign of actual_result in the gamestat table) would probably be simple. One that would not rely on stats availability would be more complicated.

Philippe Michel <plm>
Project Administrator
Fri 02 Oct 2020 06:34:29 AM UTC, comment #2: 

I'll attach two files.
One is a match file. Player0 won Game2, and player1 won Game1 and Game3(and this match).
The other is SQLite file, in which only this match is recorded.

> sqlite3 example.db

sqlite> .header on
sqlite> select * from game;
game_id|session_id|player_id0|player_id1|score_0|score_1|result|added|game_number|crawford
1|1|1|2|0|0|1|2020-10-02 05:48:38|1|0
2|1|1|2|0|1|2|2020-10-02 05:48:39|2|0
3|1|1|2|2|1|2|2020-10-02 05:48:39|3|0

Result is positive value for every game.

Anonymous
Thu 01 Oct 2020 07:07:34 AM UTC, comment #1: 

If you Can attach a match which isn’t recorded correctly the I’ll take a look.

Christian Anthon <c_anthon>
Project Administrator
Thu 01 Oct 2020 04:33:16 AM UTC, original submission:  

Game summary is recorded in 'game' table. However, 'result' column seems not to be recorded properly. Though the column should have a negative value when player1 won(according to a comment in gnubg.sql), actually it has a positive value no matter which won.

It looks like AddGames function(in relational.c) doesn't process the sign of the value.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #49906:  player0-player1_3p_2020-10-02.sgf added by None (151KiB - application/octet-stream)
file #49907:  example.db added by None (72KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by plm (Posted a comment)
  • -email is unavailable- added by c_anthon (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-05 plm Operating SystemWindows 10 => All
        StatusNone => Confirmed
    2020-10-02 None Attached File- => Added player0-player1_3p_2020-10-02.sgf, #49906
        Attached File- => Added example.db, #49907

    Back to the top


    Powered by Savane 3.5