English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 22 November 2010, 09:09   #181
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 45
Posts: 2,659
Quote:
Originally Posted by Thorham View Post
No, I don't want a huge library, and it's not going to be like that. The idea is to implement some good, well known generators. In my case those are: xorshift, mwc, cmwc and Mersenne twister. After that there's a seeder, a hardware state based generator and Durstenfeld's shuffling algorithm. That's it.

For Amiga purposes this is quite a good setup, and it doesn't result in thousands of lines of code, and is therefore not too big at all.

All routines except the hardware state based generator are already written, and just need testing, and it wasn't much work at all
Ok, this is your way. I personnally don't think rngs are worth a library for just that. A single function does the job for me...
meynaf is offline  
AdSense AdSense  
Old 22 November 2010, 09:47   #182
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 41
Posts: 2,977
Quote:
Originally Posted by meynaf View Post
Ok, this is your way. I personnally don't think rngs are worth a library for just that.
It all depends on ones needs and wants. Some people may prefer a library with ready to use routines, because they don't want to dive into the subject.

Furthermore, the library is small. I would agree with you if it would be large and bloated
Quote:
Originally Posted by meynaf View Post
A single function does the job for me...
That's understandable. However, your generator uses the hardware state, and this can be annoying for debugging purposes. While you're still debugging a program that uses your generator, you may want to consider temporarily swapping it with a generator that generates the same sequence for the same seed. Getting a different sequence each time might be a problem when you're working on a program. A good one is the complementary multiply with carry generator by George Marsaglia. It's short, has a long period, and it uses your favorite, the multiply

This is one reason to not limit yourself to a hardware state based generator. There are other reasons, but they're not really important here.
Thorham is offline  
Old 22 November 2010, 13:19   #183
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 45
Posts: 2,659
Quote:
Originally Posted by Thorham View Post
It all depends on ones needs and wants. Some people may prefer a library with ready to use routines, because they don't want to dive into the subject.

Furthermore, the library is small. I would agree with you if it would be large and bloated
That's understandable. However, your generator uses the hardware state, and this can be annoying for debugging purposes. While you're still debugging a program that uses your generator, you may want to consider temporarily swapping it with a generator that generates the same sequence for the same seed. Getting a different sequence each time might be a problem when you're working on a program. A good one is the complementary multiply with carry generator by George Marsaglia. It's short, has a long period, and it uses your favorite, the multiply

This is one reason to not limit yourself to a hardware state based generator. There are other reasons, but they're not really important here.
I have used my generator in several programs and never needed to swap it with anything while debugging.

One of the main design choices of my include library is that nothing must be inside without being used by some programs so that i'm sure it only contains USEFUL things. As long as i have no use for anything pseudo-random related, i won't add more of that in my library.
meynaf is offline  
Old 29 November 2010, 19:48   #184
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 41
Posts: 2,977
Well, that concludes another very long thread I just hope you can think of something else that's worth a long discussion
Thorham is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Random question 251Mario project.EAB 1 16 May 2013 02:19
HELP! A600 number 2 down! :( Snowy support.Other 5 04 December 2011 22:12
Help needed!!Random octal numbers generator(asm) sheryn88 Coders. General 6 01 August 2010 07:19
Random crashes ami_stuff support.WinUAE 8 06 February 2009 16:51
D/Generation IanMac support.Games 2 04 November 2002 16:47

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:12.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Page generated in 0.18258 seconds with 15 queries