[Top][All Lists]

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

Re: [Bug-gnubg] gnubg.sql - stats from my database

From: Michael Petch
Subject: Re: [Bug-gnubg] gnubg.sql - stats from my database
Date: Mon, 15 Nov 2010 03:11:20 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20101027 Thunderbird/3.1.6


I agree with what Ian Shaw had to say about luck and what one should study to improve ones game. The database is not well documented but this might help you a bit:

The local database (gnubg.db) is a binary file so can't be queried directly.
Gnubg uses SQL Lite for storing data in the database. SQL Lite is as the
name suggests - a light and small footprint SQL engine. If you know SQL then
things are easier.

You can query gnubg.db outside of Gnubg itself with an SQL lite tool
available here:


Documentation on its use here:


This of course is much more difficult if SQL is not something you have used
before, but I present it just in case.

Unfortunately the data you seek for doing a dice study does not reside in the database (There is no accounting of every roll, and the data is pretty much on a general match level)

Your request for information seems similar to the type of data that might appear in a report like this:

If this is the type of data you seek I have python scripts that work under Linux (I have never tried them on windows), and they don't come with any documentation, and they were crude (I tossed them together to meet a need I had last year analyzing dice from a particular online BG site). Effectively the scripts use Gnubg to read MAT file, scan through every roll, categorize the roll, and produce statistical output. If you feel adventurous I can give you the scripts, but you'd be on your own, and if you are not a programmer they may be of little help to you.


On 14/11/2010 1:10 PM, address@hidden wrote:
Hallo all,

I've been playing GNU-BG for a few weeks now and am getting
on ok (well, winning about 2 or 3 out of 10 lol) but I keep feeling
like I would like to know more about why I lose so much :)

Is it
possible to query the built in database?

The stats for comparing my
rolls against the CPUs I would particularly like to see are:

1. Total
number of doubles rolled (per match / plus total all time) for me /
2. Total pip count per game / per match / total all time - for me
3. Total number of doubles rolled whilst on the bar (if this is
possible to create) for me / GNU
4. Total number of roll attempts to
'get back on' when (n=1 to 5) slots are open in opponents home area (if
this is possible to create) for me / GNU
5. Anything other stat which
you think may be useful?

'All things being equal', all of the above
figures should more or less even up, over time.

I've found this gnubg.
sql file  on my hard drive but I have no idea how to query it, and my
MS Access program will not read it.

Any help writing out these queries
and briefly instructing how to use them would be greatly appreciated.

I would like to then be able to import these results into Excel to
create graphs etc

I think that being given the transparency of these
figures and making them readily available would go a long way to
finally proving to n00bs like me that GNU-BG does not cheat, as well as
reassuring me that my computer is not possessed! :)

Many Thanks for
any help!


Bug-gnubg mailing list

reply via email to

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