mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2019-11-24, 20:34   #1
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

326810 Posts
Default Python3 Why Can't I Get a Good Random?

This has stemmed from the November IBM Challenge located in a thread in the Lounge area.

I know that random isn't a real random, but I'm experiencing results based on my starting the program. I would like the program to create results based on the loops. I have tried seeding based on epoch time within the loops and it has had no discernible affect. My understanding is that random.randint() uses the epoch time itself, if no seed is used. Is that possibly my issue?

What's happening:

The program is supposed to find the greatest determinant based on matrices juggled by random integers. But, based on my starting of the program, it will sit a long time with a different maximum value.

Run 1 example: It sits with 916e6 for hours, until a restart.
Run 2 example: Restart sits with 921e6, until restart.
Run 3 example: Restart sits with 914e6, until restart.

Within the program, I have a reset that places the initial matrix back to an original state and runs the random workings over again. I am getting different processes and the 9xxe6 values take different times to reach, but those maximums appear to be based on my starting the program, rather than on its processing.

Shouldn't there be a way to truly reset the randomness for each loop?

Or, is there something else in effect that I am totally ignorant about?
EdH is offline   Reply With Quote
Old 2019-11-24, 22:55   #2
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

22·19·43 Posts
Default I "Think" I Have the "Real" Culprit. . .

A variable I was expecting to remain unchanged, since I had nothing changing it within the code, appeared to either be changing, or, also possible, the variable that relied on being reset to the "unchanged" variable wasn't being reset.

In either event, I "think" I have remedied the situation
EdH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
random comments, random questions and thread titles made for Google jasong Lounge 46 2017-05-09 12:32
GPU and Random P-1 jocelynl Factoring 1 2016-11-25 05:14
Good air-cooler good enough for overclocked i7-5820K RienS Hardware 17 2014-11-18 22:58
About random number (random seed) in Msieve Greenk12 Factoring 1 2008-11-15 13:56
Random LMH link Bundu Lone Mersenne Hunters 0 2007-10-01 01:17

All times are UTC. The time now is 00:19.

Thu Aug 13 00:19:22 UTC 2020 up 26 days, 20:06, 0 users, load averages: 1.48, 1.48, 1.46

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.