Author Topic: Finished study of randomness  (Read 2190 times)

0 Members and 1 Guest are viewing this topic.

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Finished study of randomness
« on: January 19, 2020, 10:36:00 pm »
Hello all,

Well, this whole randomness thing came full-circle, and I can probably say a milestone has been reached, for me at least. Thanks everyone from danilin, Fellippe, and Pete for specifically encouraging this pursuit, and thanks for everyone else - thinking of Steve, bplus, dimster, Pete again - for responding to this with your deep thoughts. Hope you got some sleep Steve. Y'all kept the fire going for sure.

So what I've done is:
i) Created a suitable notation to handle the study at the top of this post: https://www.qb64.org/forum/index.php?topic=2095.0
ii) Generalized that notation to handle any kind of list with any kind of complexity.
iii) Redid the calculation from step (i) and got different numbers, beware.

... and onto the good stuff. The part that won't put you to sleep is:

iv) Cooked up a batch of pseudo-random data using an intentionally bugged RND function in QB64.
v) Without using any foreknowledge of the bug, devised a method to find non-random features in the data set.
vi) Demonstrated the method and got results using QB64 and Gnuplot.

EDIT:

Removed attachment so old notation doesn't spread, click the link below for now on:

http://barnes.x10host.com/ordo%20ab%20chao/Ordo%20Ab%20Chao.pdf
« Last Edit: January 22, 2020, 10:37:03 pm by STxAxTIC »
You're not done when it works, you're done when it's right.

Offline romichess

  • Forum Regular
  • Posts: 145
    • View Profile
Re: Finished study of randomness
« Reply #1 on: January 20, 2020, 02:41:37 am »
Magic bitboards in chess is the strangest randomness related topic I know of. The question is, is there some random magic number that can be multiplied by the occupancy then shifted some amount say on a rook's rank and file that will produce an index into a lookup table that will give the bitboard of possible rook moves. Here is that function from the chess programming wiki.

U64 rookAttacks(U64 occ, enumSquare sq) {
   occ &= mRookTbl[sq].mask;
   occ *= mRookTbl[sq].magic;
   occ >>= 64-13;
   return rookAttacks[occ];
}

Think of all the number of possible occupancies on a rank and file. And it does not matter what it is because there is one number out of millions that has a bit pattern that when multiplied and shifted with the occupancy produces when combined with the other magic numbers for the other 63 squares a perfect hash to lookup the moves bitboard. And that means without a single miss or collision. That might not be the type of randomness you are looking at. But it is a rather random thing nonetheless. For some of the squares it took weeks of processing to find a good number.
My name is Michael, but you can call me Mike :)

Offline DANILIN

  • Forum Regular
  • Posts: 128
    • View Profile
    • Danilin youtube
Re: Finished study of randomness
« Reply #2 on: January 20, 2020, 05:45:34 am »

? how many numbers are there in studied sequences ?

? at least 1 thousand numbers ?
« Last Edit: January 20, 2020, 09:03:17 am by DANILIN »
Russia looks world from future. big data is peace data.
https://youtube.com/playlist?list=PLBBTP9oVY7IagpH0g9FNUQ8JqmHwxDDDB
i never recommend anything to anyone and always write only about myself

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Finished study of randomness
« Reply #3 on: January 20, 2020, 08:00:57 am »
The sample case worked out takes N to be at least 10000. I tested it out for millions of numbers, it works all the same.
« Last Edit: January 20, 2020, 08:04:58 pm by STxAxTIC »
You're not done when it works, you're done when it's right.

Marked as best answer by STxAxTIC on January 22, 2020, 05:57:47 pm

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Finished study of randomness
« Reply #4 on: January 22, 2020, 10:55:26 pm »
Okay, I think I've decided on how the notation should look, and I also rearranged things for clarity. Shred your old copy.

Just a few comments:

1) This thing requires no foreknowledge of math whatsoever. The syntax is all invented, all explained, there are no mysteries. There's pretty much no reason to not be able to follow what's going on.
2) There are examples to go along with each concept introduced.
3) The entire argument / discovery can be boiled down to this:

If you're handed a sequence S_1 = 0 1 1 0 0 0 1 0 1 1

Define A=00, B=01, C=10, D=11 such that the sequence becomes

S_2 = B C A C D

... which lends itself to richer analysis than the raw sequence S_1.


That's it. If you can get beyond that argument, you can follow how I was able to find bits of order planted in random data and reconstruct the ordered part correctly.

No more attachments, the document is here:

http://barnes.x10host.com/ordo%20ab%20chao/Ordo%20Ab%20Chao.pdf

« Last Edit: January 23, 2020, 05:20:49 am by STxAxTIC »
You're not done when it works, you're done when it's right.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Finished study of randomness
« Reply #5 on: January 22, 2020, 11:48:45 pm »
Hold yar horseys thar, varmint...

S_1 = 0 1 1 0 0 0 1 0 1 1

with A=00, B=01, C=10, D=11

S_2  = B C A B D wood be 0110000111 and thatz not ther same iz  0 1 1 0 0 0 1 0 1 1 butt I gez either way yas gots three of ee kind wit one mur kard ta be delt. In meth class, I shots me way right to the top!

- Sam



Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline DANILIN

  • Forum Regular
  • Posts: 128
    • View Profile
    • Danilin youtube
Re: Finished study of randomness
« Reply #6 on: January 23, 2020, 02:25:09 am »
a=00 b=01 c=10 d=11
Origin = 0110001011
Result = bdcaabcbd
Russia looks world from future. big data is peace data.
https://youtube.com/playlist?list=PLBBTP9oVY7IagpH0g9FNUQ8JqmHwxDDDB
i never recommend anything to anyone and always write only about myself

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Finished study of randomness
« Reply #7 on: January 23, 2020, 05:19:30 am »
Ah, thanks fellas - this is why I outsource proofreading to you guys. Its fixed now.

@danilin: the resulting sequence should contain just 5 terms
« Last Edit: January 23, 2020, 07:16:30 am by STxAxTIC »
You're not done when it works, you're done when it's right.

Offline DANILIN

  • Forum Regular
  • Posts: 128
    • View Profile
    • Danilin youtube
Re: Finished study of randomness
« Reply #8 on: January 23, 2020, 07:54:18 am »
I have: the study offset follows the same rules

my Origin 1 = 01100011
my Result 1 = bdcaabcbd

my Origin 2 = .110001011
my Result 2 = .dcaabcbd

but according to your rules the codes will change
« Last Edit: January 23, 2020, 05:21:49 pm by DANILIN »
Russia looks world from future. big data is peace data.
https://youtube.com/playlist?list=PLBBTP9oVY7IagpH0g9FNUQ8JqmHwxDDDB
i never recommend anything to anyone and always write only about myself

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Finished study of randomness
« Reply #9 on: January 23, 2020, 07:56:26 am »
Correct danilin, offsets have an interesting effect. This is studied and accounted for in the linked PDF. In fact, offsets are essential to stacking the results and make the answers really pop out.
You're not done when it works, you're done when it's right.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Finished study of randomness
« Reply #10 on: January 23, 2020, 12:19:13 pm »
No worries Bill. I gather we are around the same age, and I'm really impressed at your ability to stay focused with just a few "senior moments" in a long involved project. Hell, I'd like to roll the clock back a decade, to where I simply forgot where I put my car keys. Now I still have that problem, but when I find them, I forget what the hell I needed them for in the first place.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Finished study of randomness
« Reply #11 on: January 23, 2020, 12:38:05 pm »
I'm 35 fwiw. Came into Qb64 in my late 20s.
You're not done when it works, you're done when it's right.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Finished study of randomness
« Reply #12 on: January 23, 2020, 12:46:40 pm »
 - OK, but what does that have to do with where I put my car keys?

Well lucky you! I'd kill to be 35 again, which reminds me, where is Clippy?

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline DANILIN

  • Forum Regular
  • Posts: 128
    • View Profile
    • Danilin youtube
Re: Finished study of randomness
« Reply #13 on: June 03, 2020, 08:30:08 am »
about articles on x10host

author would make a separate file of all contents
everyone articles even without hyperlinks

I made for myself a list of contents: very convenient
Russia looks world from future. big data is peace data.
https://youtube.com/playlist?list=PLBBTP9oVY7IagpH0g9FNUQ8JqmHwxDDDB
i never recommend anything to anyone and always write only about myself

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Finished study of randomness
« Reply #14 on: June 03, 2020, 09:42:37 am »
Ah, hello Danilin

So I think you're referencing my (ever-growing) personal projection on math and physics:

http://barnes.x10host.com/

Thanks for reading! Some of these items may end up hosted on QB64.org, but for now it's a separate body of work. Screenshot attached if anyone's unaware.
Screenshot from 2020-06-03 09-34-02.png
* Screenshot from 2020-06-03 09-34-02.png (Filesize: 186.72 KB, Dimensions: 1213x1076, Views: 214)
You're not done when it works, you're done when it's right.