[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] How to calculate snowie error rate from logged database data

From: Misja Alma
Subject: [Bug-gnubg] How to calculate snowie error rate from logged database data
Date: Sat, 15 Aug 2009 16:54:07 +0200


I've been trying to reconstruct my Snowie error rate from a match that
I've logged in the database with gnubg.
I found the columns snowie_moves and snowie_error_rate_per_move in the
match_stat table, so I tried multiplying them to get my desired
It appears that I still have to multiply the result with a factor 10,
but even then the result is not what gnubg shows itself;
In this particular case the error rate is shown as 0.718 while gnubg
shows it as 0.8. I found bigger differences in other matches.

I then checked what the value for snowie_moves was for my match, and
it was the total number of (forced or unforced) moves of me and my
opponent added up.
I don't know how I can reconstruct my error rate if only the sum of my
and my opponent's moves is logged; for one thing, the number doesn't
have to be equal, also, if I divide the snowie_moves by 2 to count
only my own moves, the error rate is even more off.

So is there a way to query my snowie error rate from the database, or
is not all the data logged?

By the way here is my query:

select matchstat.snowie_error_rate_per_move * matchstat.snowie_moves *
10 as error_rate, matchstat.snowie_moves,  player0.name, player1.name
from matchstat, player player0, player player1, session
where matchstat.session_id = session.session_id
and session.player_id0 = player0.player_id
and session.player_id1 = player1.player_id
and matchstat.player_id in (2, 4, 23, 28)  -- There player id's refer to me :)
order by matchstat.matchstat_id desc


reply via email to

[Prev in Thread] Current Thread [Next in Thread]