44 coaches online • Server time: 18:44
Forum Chat
Log in
Recent Forum Topics goto Post Blackbox Teamsgoto Post Secret Stunty Cup IVgoto Post FUMBBL HAIKU'S
SearchSearch 
Post new topic   Reply to topic
View previous topic Log in to check your private messages View next topic
Quod



Joined: May 03, 2004

Post   Posted: Sep 06, 2004 - 03:21 Reply with quote Back to top

Is there a way to parse the dice roll results of a game?

I have not been able to find anying in the forums (but probably just am blind)

_________________
Teams
Vae, puto deus fio!
kurre



Joined: Oct 14, 2003

Post   Posted: Sep 06, 2004 - 03:33 Reply with quote Back to top

Found this in the forum.
"
thecoyote wrote:
...As for rolling dice being equally random as the generator: I think not. I have personnally counted 5 GFI rolls in one turn for each player that came up 1s. That's with rerolls too, folks. Think about the proability of that. That's 1 chance in 262,656 that will happen.

I'm not sure what you are talking about here. You saw someone make 5 GFIs and then fail one? That's exactly 1 out of 6 that failed. That can't be the point you're trying to make, so what's this all about again?

thecoyote (my emphasis) wrote:
Come on. Those of you who are proponents of the "javabbl is random" faction will undoubtedly say "well, yes, you just happened to be in the wrong place at the wrong time", but this is not the first time I've seen this. Though I have never noticed the same amount of failed GFIs in a row, I havevs. frequently seen strings of 3 or 4....

This is what we like to call anecdotal evidence. If you want numbers, take a log at your log files. Pick any particular match you wish from your "results" folder. Then open the .zip file and find "Xxxxvs.Yyyy.log". Open that file in a text editor. Notepad, simpletext, text edit, whatever.

Scroll down to the end and you'll see something like this:
some log file wrote:
D6: 1(176) 2(172) 3(180) 4(196) 5(178) 6(190) Total(1092)
D8: 1(6) 2(3) 3(2) 4(1) 5(9) 6(4) 7(2) 8(2) Total(29)

It's about 10 lines up from the bottom. That's the number of times that you rolled each number on each die. In the case I posted here, my opponent and I rolled a combined 1092d6. See how the numbers are all close, but not necessarily exactly the same? That's what you want to see.

Now here's the tricky part. Any idiot could look at that log file and say, "AH-HAH! I told you they weren't random! You rolled more 6s than 1s and therefore it's broken!" Yes, the idiot can say this and no, it doesn't make them any less of an idiot.

If you had an infinite number of die rolls, you would end up with an exact distribution of numbers. Since there is no way to roll an infinite number of dice in our finite universe, we have to settle for getting closer to infinity. This means that the more dice you compare, the closer you will get to an exactly even distribution. If you were to take 100 log files and add them up, the percentage difference between each number would be tiny. A thousand log files and it's microscopic. Ten thousand log files and it would be infinitessimal. That means really, really small, by the way.

In the example above, the average would be 182 of each number. the 172 twos is the farthest from the average and that's just over 5% off. This is from just one game. Now you can feel free to run through the 100/1000/10,000 log files as I described in the last paragraph and watch how that percentage shrinks. Maybe I'll write a script for people to upload their log files and get a percentage... hmm...

It's random enough, your perceptions are just biased. Check your own log files and quit bitching. Really. It's wasted effort to argue and then hide behind ignorance rather than listening to reason. Sorry to be so short with you, but this has been done a million times before and every time it's new faces saying the same old flawed arguments. It wears a man down.
"
Quod



Joined: May 03, 2004

Post   Posted: Sep 06, 2004 - 05:05 Reply with quote Back to top

thanks kurre, just the type of thing I was after.. I wonder if there is a way to split this down to just "my" rolls, any ideas anyone?

(btw kurre, what did you search to get that result (want to know if I was dyslexic, or just stupid /grin)

ps. If you were wondering why I wanted this, it's not to try to prove disprove randomness, I just want it as a fluffy stat to put in my coach info.

_________________
Teams
Vae, puto deus fio!
BadMrMojo



Joined: Aug 02, 2003

Post   Posted: Sep 06, 2004 - 07:03 Reply with quote Back to top

ps. I already wrote a script to do just what you're asking. The source code is on there if you want to do it yourself, too.

_________________
Ta-Ouch! of BloodBowl
Condensed Guide for Newbies
CircularLogic



Joined: Aug 22, 2003

Post   Posted: Sep 06, 2004 - 09:52 Reply with quote Back to top

The script doesn´t do the interesting part... splitting up between your roll and the rolls of your opponent...
BadMrMojo



Joined: Aug 02, 2003

Post   Posted: Sep 06, 2004 - 16:11 Reply with quote Back to top

Doh. Next time I suppose I should actually read the interesting bits.

You could probably do it, I believe... I haven't looked into it but if the .log file consistently identifies which rolls are made by the player with the current turn and which are the opponent's, it should be possible. Ugly, but possible.

I think that the block dice are out, however. It just says "Skull" or "Push", I believe, which means you can't tell your 3 from your 4.

_________________
Ta-Ouch! of BloodBowl
Condensed Guide for Newbies
Zy-Nox



Joined: Aug 02, 2003

Post   Posted: Sep 06, 2004 - 16:43 Reply with quote Back to top

Take a pen and paper and write them down Very Happy

_________________
"Who made that girly Zy-kNox Mod?"
Anarchy Online
BadMrMojo



Joined: Aug 02, 2003

Post   Posted: Sep 06, 2004 - 18:07 Reply with quote Back to top

Zy-Nox wrote:
Take a pen and paper and write them down Very Happy

Only problem with that is that everyone will forget to write down all the 3s and 4s... just like when they try to remember how their game went. Suddenly everyone will be claiming that they have proof that the game is broken! "I wrote down three 2s in a row! I was robbed!"

Meh.

_________________
Ta-Ouch! of BloodBowl
Condensed Guide for Newbies
Quod



Joined: May 03, 2004

Post   Posted: Sep 07, 2004 - 00:28 Reply with quote Back to top

Th only way i've thought to do it is to get your upponents upload, make a script to remove all lines that don't start with
Verified Opponent Roll =
and then parse it.

This would give you your total dice rolls, obviosly if you do this for the block dice, there will (should) be a double average of pushbacks.

(just noticed the LONG list of "Verified Opponent Roll =" at the very end of the log, any idea what these rolls are for? they don't marry up with rolls during the game.)
(in the 3 of my results i've looked at, this long list of rolls has been 97 rolls, And i have not been able to match the order to the order of rolls in game, tried backwards and forwards.)

_________________
Teams
Vae, puto deus fio!
BadMrMojo



Joined: Aug 02, 2003

Post   Posted: Sep 07, 2004 - 03:08 Reply with quote Back to top

The "Verified opponent roll=" idea is a really good one. Easy to implement.

As far as the list at the end, I assume that's the postgame (FF and winnings) rolls. Any idea if you or your opponent hosted the result files you're checking? Might be that the host makes all those rolls... I'm not sure.

Also, make sure you leave the "verbose dice sync" option on to keep that "verified" part in the log file. Otherwise it might not print that.

_________________
Ta-Ouch! of BloodBowl
Condensed Guide for Newbies
Quod



Joined: May 03, 2004

Post   Posted: Sep 08, 2004 - 13:17 Reply with quote Back to top

Bah, i'm useless, I've tried creating a script or batch file that will remove all lines in a text file that DO NOT contain xxx
or a script or batch that copies all lines that DO contain xxx into another file.
However, my skills seem to be rather lacking, any guru's out the want to have a go?

_________________
Teams
Vae, puto deus fio!
Dementor



Joined: Apr 06, 2004

Post   Posted: Sep 08, 2004 - 14:12 Reply with quote Back to top

On Linux: grep -i "verified" messages.log > verified.log
On Windows: find /i "verified" messages.log > verified.log
Quod



Joined: May 03, 2004

Post   Posted: Sep 08, 2004 - 16:08 Reply with quote Back to top

Thanks for the pointer Dementor, got me going in the right direction.
I'm sure i'm just confusing myself now though. Windows is what I'm working with. (all files involved placed on the root of e:)
Rename the log file to parse to messages.log

whatever.bat
find /i "verified" d:\messages.log > d:\verified.log

sort /+26 d:\verified.log /o d:\verified.log

find /i /c "1" d:\verified.log > d:\1.log
find /i /c "2" d:\verified.log > d:\2.log
find /i /c "3" d:\verified.log > d:\3.log
find /i /c "4" d:\verified.log > d:\4.log
find /i /c "5" d:\verified.log > d:\5.log
find /i /c "6" d:\verified.log > d:\6.log
find /i /c "pow" d:\verified.log > d:\pow.log
find /i /c "pow/skull" d:\verified.log > d:\pow-skull.log
find /i /c "pushback" d:\verified.log > d:\push.log
find /i /c "pushback/pow" d:\verified.log > d:\push-pow.log
find /i /c "skull" d:\verified.log > d:\skull.log

This is as close as I can get, what I want is all of those counts in the 1 file labelled so I can recognise what the count is of, along with a total no. of rolls.
I cannot find an append command or any formatting/sum commands =(
Do I need to give up on batching it and try to figure out how to script? Or am I missing something else obvious.

_________________
Teams
Vae, puto deus fio!
Dementor



Joined: Apr 06, 2004

Post   Posted: Sep 08, 2004 - 16:16 Reply with quote Back to top

To append to a file replace the ">" with ">>". And with echo you can write your own text. So between finds you can add "echo "number of 1s" >> result.txt, ...
Quod



Joined: May 03, 2004

Post   Posted: Sep 09, 2004 - 03:42 Reply with quote Back to top

thank you for the assistance.

Here is a copy of the final batchfile I created, feel free to throw it on your website Mojo

####################################################################
# This batch file will parse and count all your dice rolls
# You need your opponents zip result (or the log from the zip)
# The count will be placed in a file called d:\logs\results.log
#
# create the directory d:\logs
# place woop.exe, this batch file, and the log to be parsed in it
# rename the log to be parsed to d:\logs\bb.log
# run this batch file
#
# (http://www.kik-it.com/index.php?P=woop)
# (woop is needed for correct count on pow, pushback, skull)
####################################################################

find /i "Verified Opponent Roll" d:\logs\bb.log > d:\logs\tmp.log

WOOP d:\logs\tmp.log /C="POW/SKULL" /N="pow/skull"
WOOP d:\logs\tmp.log /C="PUSHBACK/POW" /N="pushback/pow"

echo number of 1's >> d:\logs\results.log
find /c "1" d:\logs\tmp.log >> d:\logs\results.log
echo number of 2's >> d:\logs\results.log
find /c "2" d:\logs\tmp.log >> d:\logs\results.log
echo number of 3's >> d:\logs\results.log
find /c "3" d:\logs\tmp.log >> d:\logs\results.log
echo number of 4's >> d:\logs\results.log
find /c "4" d:\logs\tmp.log >> d:\logs\results.log
echo number of 5's >> d:\logs\results.log
find /c "5" d:\logs\tmp.log >> d:\logs\results.log
echo number of 6's >> d:\logs\results.log
find /c "6" d:\logs\tmp.log >> d:\logs\results.log

echo number of pow's >> d:\logs\results.log
find /c "POW" d:\logs\tmp.log >> d:\logs\results.log
echo number of pow/skull's >> d:\logs\results.log
find /c "pow/skull" d:\logs\tmp.log >> d:\logs\results.log
echo number of pushback's >> d:\logs\results.log
find /c "PUSHBACK" d:\logs\tmp.log >> d:\logs\results.log
echo number of pushback/pow's >> d:\logs\results.log
find /c "pushback/pow" d:\logs\tmp.log >> d:\logs\results.log
echo number of skull's >> d:\logs\results.log
find /c "SKULL" d:\logs\tmp.log >> d:\logs\results.log

del d:\logs\tmp.log

_________________
Teams
Vae, puto deus fio!
Display posts from previous:     
 Jump to:   
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Log in to check your private messages View next topic