Rubicon Forum
Welcome, Guest. Please login or register.
November 20, 2008, 07:21:31 AM

Login with username, password and session length
Search:     Advanced search
Undeletable components are now shaded blue when loading a level in.
3876 Posts in 196 Topics by 2405 Members
Latest Member: Ping
* Home Help Search Login Register
+  Rubicon Forum
|-+  Playing the Game
| |-+  Showcase (Moderator: Bucky)
| | |-+  Bargrapher
« previous next »
Pages: [1] Print
Author Topic: Bargrapher  (Read 1188 times)
jboymicro
Operator
**
Posts: 14


View Profile Email
Bargrapher
« on: December 30, 2006, 03:27:59 PM »

A simple hex bargrapher.

pecivek

EDIT: Here's an updated version that works for ye olde physics:

basidud
« Last Edit: December 31, 2006, 02:36:24 PM by jboymicro » Logged
lienne
Designer
***
Posts: 34


View Profile
Re: Bargrapher
« Reply #1 on: December 30, 2006, 03:43:09 PM »

That's one of the most elegant gate-sorts I've ever seen. Well done.
Logged
Rene
Director
*****
Posts: 444


View Profile Email
Re: Bargrapher
« Reply #2 on: December 31, 2006, 02:59:16 PM »

The question has come up before on the forum, whether the build-in random number generator is fair. That is, does it generate the different crates with equal chance?

I created the crate counter godymom to check this. It counts the number of generated crates of each type. Unfortunately, there is no room to count 'E' and 'F' as well (well, actually, there is, but it would ruin the visual comparison effect).
I ran it overnight, and got the following result:
[img=http://img278.imageshack.us/img278/9617/cratecountrq4.th.png]

The numbers of the crates in the counters are not important, but their positions are. Think of it as a binary number; the absence of a crate is a '0', the presence of a crate is a '1'. Only the binary values are not 1, 2, 4, 8, 16, etc, but the Fibonacci series: 1, 1, 2, 3, 5, 8, 13, 21, etc. If a crate reaches the far end, then it has counted up to 28657.

As you can see, the results are pretty equal for all crates. The most common in this sample was '0' with 10262 occurences. The least common was '5' with 9960 occurences. The total number of counted crates is 161722, which is on average 10108 per type. Therefore, the maximum deviation from the average is 1,46 %. Not something to worry about.....
 

« Last Edit: December 31, 2006, 03:02:31 PM by Rene » Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Rubicon Forum | Powered by SMF 1.0.8.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!