Darwinbots Forum

Code center => Suggestions => Topic started by: Testlund on November 11, 2014, 12:21:31 PM

Title: The randomizer
Post by: Testlund on November 11, 2014, 12:21:31 PM
The randomizer runs every 2 seconds and freezes the sim for 10 seconds each time, which pretty much puts the sim to a stand-still. It would be nice if the randomizer worked a lot less often. What is it randomizing exactly? The dna?
Title: Re: The randomiser
Post by: spike43884 on November 12, 2014, 11:01:53 AM
Theres a randomiser? (do you mean .rnd?)
+ It doesnt freeze sim for me, and my computers pretty basic.
Title: Re: The randomizer
Post by: Shadowgod2 on November 12, 2014, 11:37:54 AM
It's not .rnd just rnd. You use a "." only when you are referring to a sysvar like .eye5
Title: Re: The randomizer
Post by: spike43884 on November 12, 2014, 01:50:40 PM
ahh god, you remind me of a dirty minded inuendo from one of my friends to do with american punctuation lessons:
Quote
Never forget your periods and fingerspaces kids!
Title: Re: The randomizer
Post by: Testlund on November 12, 2014, 04:21:53 PM
NOO! I'm talking about the exe file "DarwinTrue2.48.25.exe"! It connects to random.org to generate random numbers that is supposed to affect DB somehow.

I wanted to test this how it works, but I'm only running the sim with this exe for a few seconds, then I save and load the sim with the other exe, hoping that the sim will have been affected by random.org.
Title: Re: The randomizer
Post by: Shadowgod2 on November 12, 2014, 04:27:56 PM
Ok what it might be is it is connecting to random.org to get the random numbers and send it back to you. This could take some time to do it all especially if your Internet is slow.
Title: Re: The randomizer
Post by: Peter on November 12, 2014, 04:49:56 PM
vb6 random number generator is pseudorandom (http://en.wikipedia.org/wiki/Pseudorandomness). Random.org is truly random.

Pseudorandom means it's not really random and with enough research you'll find somewhat of a pattern in it. You won't have that with a real random number.

I know somewhat predictable pseudo random number generators are often a weakness in encryption protocols. I'll let botsareus explain the advantage of random.org over the normal vb6 rng in darwinbots2. I think all it does is use the random.org random numbers instead of the normal random numbers, you'll likely won't see a difference between vb6 random and random.org random.
Title: Re: The randomizer
Post by: Testlund on November 13, 2014, 10:04:53 AM
vb6 random number generator is pseudorandom (http://en.wikipedia.org/wiki/Pseudorandomness). Random.org is truly random.

I know and it's a really cool idea to use this service in DB. It's something I've wanted for a very long time. Too bad though that right now it causes DB to only be able to run for 2 s every 10 s.

Quote
I'll let botsareus explain the advantage of random.org over the normal vb6 rng in darwinbots2.

I hope he'll get back here soon. I'm curious to know exactly how it works.
Title: Re: The randomizer
Post by: Botsareus on November 26, 2014, 02:06:25 PM
Don't be too enthusiastic about that one Testlund. There are many things I wanted to have now too. Like freedom of speech, freedom to publicly publish code. Based on my latest zerobot experiments, I do not think the world is ready for this. I will have to review code publishing on university levels someday, if I ever consider making any of this stuff fully public ever again.
Title: Re: The randomizer
Post by: Botsareus on November 26, 2014, 02:34:25 PM
I just hope to have recoverable code when the magic moment finally arrives. I am going to worry about my mental health in the mean time.
Title: Re: The randomizer
Post by: Testlund on November 26, 2014, 03:38:19 PM
...freedom to publicly publish code.

You must be talking about something other than Darwinbots here. So far there is nothing threatening the development of DB here.
Title: Re: The randomizer
Post by: Botsareus on November 26, 2014, 03:44:08 PM
This conversation is seriously getting old but, freedom is power in my book, and with great power there is also responsibility.
Title: Re: The randomizer
Post by: Botsareus on November 26, 2014, 03:55:50 PM
Proof of point http://forum.darwinbots.com/index.php/topic,6699.0.html
Title: Re: The randomizer
Post by: spike43884 on November 27, 2014, 11:19:47 AM
This conversation is seriously getting old but, freedom is power in my book, and with great power there is also responsibility.
But you have to power, to deny you of that freedom, requiring greater responsibiltiy, and along with denying yourself the freedom to publish the code you be denying others the freedom to read it.

Also, your link I do not understand how this proves any point. Its pointing out that everyone is inactive and that you were inactive for a while...

Better quote though bot:
"With Knowledge comes power, with power comes one of two things, the pride and then the fall, or the simple sharing to enlighten those around."
Title: Re: The randomizer
Post by: Botsareus on November 27, 2014, 12:08:53 PM
Yea looks like you have serious case of the pride and the fall going on.  :)
Title: Re: The randomizer
Post by: spike43884 on November 27, 2014, 01:56:19 PM
Yea looks like you have serious case of the pride and the fall going on.  :)

I don't claim to know anything, and I've shared ALL of my code on these forums, to get fixed, or to aid others.
And I might link to that post you linked to a few comments ago, Because I won't bother with the SAME long reply again http://forum.darwinbots.com/index.php/topic,6656.0.html (http://forum.darwinbots.com/index.php/topic,6656.0.html)
Title: Re: The randomizer
Post by: Botsareus on December 02, 2014, 09:30:52 PM
Not until I actually care to explain.
Title: Re: The randomizer
Post by: Botsareus on November 01, 2015, 05:17:57 PM
There is ALOT of stuff in DB2 that uses random numbers. Everything from shots to the way the DNA mutates to weather patterns. At first I was grabbing random numbers from a service similar to random.org but had a free API. It worked ok but a bit slow. I wanted a way to use more common data sitting on the internet. I ended up compressing pictures that I get from a set of URLs using my portable hack of 7z and feeding that trough the randomizer. Most of the code is in the beginning of MDIform1 if anyone wants to take a look. I needed a place to host the inet control, that is why it is in a form instead of a module.
Title: Re: The randomizer
Post by: Testlund on March 28, 2016, 08:04:01 PM
So is the Randomizer finally working now?
Has anybody seen any interesting result when using this?
Is the randomizer only running the first time when you start DB?
What are all those .bin files for?
What's the maximum simulation size that the Randomizer can handle?
Title: Re: The randomizer
Post by: Testlund on March 29, 2016, 07:39:59 AM
Is the randomizer only running the first time when you start DB?

This question I can answer myself. The Randomizer will try to connect every once in awhile and if the computer is not connected it will cause DB to freeze permanently.  :glare:
Title: Re: The randomizer
Post by: Botsareus on March 29, 2016, 05:30:28 PM
Quote
The Randomizer will try to connect every once in awhile and if the computer is not connected it will cause DB to freeze permanently.

I was hoping users will figure out that if it says "seeding randomizer" that they need an active internet connection. As soon as you reestablish an internet connection the program should resume. Remember this is an alpha feature, and probably will remain in alpha as after I have a way to track bugs better I will probably switch to a simple scheme again. (read more below) With the simpler randomness source I will be able to figure out if there is an internet connection easier because it is a simple html request.
Quote
So is the Randomizer finally working now?

The randomizer was always working really. I just thought I'd like to experiment with it. I initially used a "Quantum Random Number Server" for it. That worked well, however, I was not able to run it in safe mode because safemode needs consistent data to be able to recreate a sequence of events within a simulation. I am using bytes from compressed pictures instead.

Let me also note that I am getting picture data from all kinds of websites, some not as clean as others. I did not really care because it is just data. But a simpler scheme will definitely fix this. Once again I explain that this is a really early alpha feature, just a little experiment I had going (this leads to my next pointer)

Quote
Has anybody seen any interesting result when using this?

The results are definitely "more interesting" but a little less "random" so generally it takes longer for robots to evolve, but when they do, the mutation is way more interesting imo. My zerobot was evolved using this randomizer. Also, I am evolving my zerobot further with my survival fitness function also using this randomizer.

However, I had to stop evolving after finding some bugs and improvements that will be published with 2.48.29 soon.

Quote
What are all those .bin files for?

The program collects a bunch of pictures from the internet, compresses them, and splits the data into separate .bin files. Then the randomizer reads one file at a time converting the bytes within the file into randomizer seeds. Safemode is also hooked to this process. The idea is if a crash happens, it will be related to the seeds in a given .bin file. So to recreate a bug I will need the .bin file.

Quote
What's the maximum simulation size that the Randomizer can handle?

Nothing to do with simulation sizes really. Any size.



I am also planning to restart PeterIM. All I really need to figure out is setting up a server and having the program draw nice pretty charts in 1 hr , 1 day and 1 week intervals. I also need access to a security team just incase. So the best time to do it will be in a computer club or from assistance from a professor who has a server to spear. So it is definitely something I am looking forward to doing when I actually get to a uni. Right now I am just studying to retake the "American College Test" I bought the pre-"common-core" version, so hopefully when I take the actual test it will be easier than the test prep.

If I do not make it to the uni. I will probably end up pestering Numsgil to host some kind of IM. Hopefully he will have enough patience left for me to help me out.  :redface:

So yea, as I expected fixing IM is definitely on my radar, and most likely the last feature I will contribute to the vb6 version of DB2. The sad thing is DB2 will probably never really make it out of Beta, vb6 is a difficult language to track complex bugs in. I am embarrassed, but it really did seriously burn me out.



I have some ideas in ways of balancing chloroplasts so there are predictor prey cycles that do not take 10 years to happen. But that is a research topic on its own. I think I gathered enough research here as is to publish at least 2, maybe 3 papers. So if I really ever consider seriously adding brand new features to Darwinbots, it will not happen under vb6.