Adding records to the relational databaase...

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

Adding records to the relational databaase...

by Michael Petch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Adding records to the relational databaase... Hi Christian,

I’m not sure if this is a bug or was by design but it seems to go counter to what I would expect. When you add a match to the database a hash is done on the current match in memory (The hash seems to be done on all the moves and the analysis data).  If I take a MAT file, load it in from scratch. Analyze on 0 ply and add it to the database, then try to add it again right after it realizes there is already data in and asks me to overwrite. If I analyze at 0 ply, add to DB then analyze at 1 ply and then add again it doesn’t seem to know the  file I am using was already in the DB.

My question is this. Is it maybe more prudent to hash the match without any analysis data (and just use the move data) when adding it to the Database?

Michael

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

Parent Message unknown Re: Adding records to the relational databaase...

by Jonathan Kinsey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Michael Petch wrote:
> Hi Christian,
>
> I’m not sure if this is a bug or was by design but it seems to go
> counter to what I would expect. When you add a match to the database a
> hash is done on the current match in memory (The hash seems to be done
> on all the moves and the analysis data). If I take a MAT file, load it
> in from scratch. Analyze on 0 ply and add it to the database, then try
> to add it again right after it realizes there is already data in and
> asks me to overwrite. If I analyze at 0 ply, add to DB then analyze at 1
> ply and then add again it doesn’t seem to know the file I am using was
> already in the DB.
>
> My question is this. Is it maybe more prudent to hash the match without
> any analysis data (and just use the move data) when adding it to the
> Database?

That was the plan when I wrote that code - are you sure the analysis data is
included? It might be something else causing this, I'll take a look when I get
a chance.

Jon




Use Hotmail to send and receive mail from your different email accounts. Find out how.
_______________________________________________
Bug-gnubg mailing list
Bug-gnubg@...
http://lists.gnu.org/mailman/listinfo/bug-gnubg

Re: Adding records to the relational databaase...

by Michael Petch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Bug-gnubg] Adding records to the relational databaase... It probably is just a bug. I looked at play.c GetMatchChecksum() and doesn’t appear that it is using analysis data, but something must be throwing the checksum off.  Probably easiest to print out the contents of gameStr variable and see where things differ.

Michael


On 07/10/09 8:18 AM, "Jonathan Kinsey" <jon_kinsey@...> wrote:

Michael Petch wrote:
> Hi Christian,
>
> I’m not sure if this is a bug or was by design but it seems to go
> counter to what I would expect. When you add a match to the database a
> hash is done on the current match in memory (The hash seems to be done
> on all the moves and the analysis data). If I take a MAT file, load it
> in from scratch. Analyze on 0 ply and add it to the database, then try
> to add it again right after it realizes there is already data in and
> asks me to overwrite. If I analyze at 0 ply, add to DB then analyze at 1
> ply and then add again it doesn’t seem to know the file I am using was
> already in the DB.
>
> My question is this. Is it maybe more prudent to hash the match without
> any analysis data (and just use the move data) when adding it to the
> Database?

That was the plan when I wrote that code - are you sure the analysis data is
included?  It might be something else causing this, I'll take a look when I get
a chance.

Jon


       

Use Hotmail to send and receive mail from your different email accounts. Find out how. <http://clk.atdmt.com/UKM/go/167688463/direct/01/>

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

Re: Adding records to the relational databaase...

by Michael Petch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Re: [Bug-gnubg] Adding records to the relational databaase... It is In fact analysis related but very subtle. The function GetMoveString() returns the aszSkillTypeAbbr (??, ?, ?! Etc) on the end of each move. This abbr is dependent on what the current analysis produced.

On 07/10/09 8:18 AM, "Jonathan Kinsey" <jon_kinsey@...> wrote:

Michael Petch wrote:
> Hi Christian,
>
> I’m not sure if this is a bug or was by design but it seems to go
> counter to what I would expect. When you add a match to the database a
> hash is done on the current match in memory (The hash seems to be done
> on all the moves and the analysis data). If I take a MAT file, load it
> in from scratch. Analyze on 0 ply and add it to the database, then try
> to add it again right after it realizes there is already data in and
> asks me to overwrite. If I analyze at 0 ply, add to DB then analyze at 1
> ply and then add again it doesn’t seem to know the file I am using was
> already in the DB.
>
> My question is this. Is it maybe more prudent to hash the match without
> any analysis data (and just use the move data) when adding it to the
> Database?

That was the plan when I wrote that code - are you sure the analysis data is
included?  It might be something else causing this, I'll take a look when I get
a chance.

Jon


       

Use Hotmail to send and receive mail from your different email accounts. Find out how. <http://clk.atdmt.com/UKM/go/167688463/direct/01/>

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

Parent Message unknown Re: Adding records to the relational databaase...

by Jonathan Kinsey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Michael Petch wrote:
> It is In fact analysis related but very subtle. The function
> GetMoveString() returns the aszSkillTypeAbbr (??, ?, ?! Etc) on the end
> of each move. This abbr is dependent on what the current analysis produced.

Well spotted, I can sort this out.

Obviously none of my games had any errors in :)

Jon




Add other email accounts to Hotmail in 3 easy steps. Find out how.
_______________________________________________
Bug-gnubg mailing list
Bug-gnubg@...
http://lists.gnu.org/mailman/listinfo/bug-gnubg

Re: Adding records to the relational databaase...

by Michael Petch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




On 07/10/09 9:43 AM, "Jonathan Kinsey" <jon_kinsey@...> wrote:

> Michael Petch wrote:
>> It is In fact analysis related but very subtle. The function
>> GetMoveString() returns the aszSkillTypeAbbr (??, ?, ?! Etc) on the end
>> of each move. This abbr is dependent on what the current analysis produced.
>
> Well spotted, I can sort this out.
>

Great
 
> Obviously none of my games had any errors in :)
>

I guess It pays to have active contributors who make Burger King their
second home! ;-)




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

Parent Message unknown Re: Adding records to the relational databaase...

by Jonathan Kinsey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Michael Petch wrote:
> It is In fact analysis related but very subtle. The function
> GetMoveString() returns the aszSkillTypeAbbr (??, ?, ?! Etc) on the end
> of each move. This abbr is dependent on what the current analysis produced.

I've checked in a change.

Jon




New! Receive and respond to mail from other email accounts from within Hotmail Find out how.
_______________________________________________
Bug-gnubg mailing list
Bug-gnubg@...
http://lists.gnu.org/mailman/listinfo/bug-gnubg

Re: Adding records to the relational databaase...

by Michael Petch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I reviewed your change and the addition of the boolean value to exclude the
skillabbr. Built it, and it works as expected. Thanks! Now I won¹t
inadvertently add the same match to the database more than once!


On 08/10/09 11:27 AM, "Jonathan Kinsey" <jon_kinsey@...> wrote:

> Michael Petch wrote:
>> It is In fact analysis related but very subtle. The function
>> GetMoveString() returns the aszSkillTypeAbbr (??, ?, ?! Etc) on the end
>> of each move. This abbr is dependent on what the current analysis produced.
>
> I've checked in a change.
>




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