Something is UP.
Moderator: Forum Moderators
@Cod: Do you really think the RNG on your machine is broken? Can you do some kind of stat test to see if it is?
Nope, that's not how it works.Ankka wrote:In Civilization 3 the RNG was made so that if you did everything in the same order again you got excectly the same results.
I wonder if it's the same in BfW: if you do no other battles before the mage one it will always be the same result..?
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
- Elvish_Pillager
- Posts: 8137
- Joined: May 28th, 2004, 10:21 am
- Location: Everywhere you think, nowhere you can possibly imagine.
- Contact:
Re: Something is UP.
Wow.Cod wrote:For 31 CONSECUTIVE ATTEMPTS, I hit him no more than 2 times out of 4 with my magical attack.
First, why is it that almost every multiplayer game you play, you attack or have attacked 70% defense units? There's only a few of them...Cod wrote:On average, there is at least one incident per MP game where a character at 70 defense will be hit at least four, often five straight times.
Second, there's about a 1% chance of that happening, which means that in a game with at least 100 attacks against them (which is not a particularly large amount) that this should happen about once. So, it is statistically accurate in most cases, as long as there are a lot of 70% defense units around.
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
Is there any reason to assume the RNG is not ergotic? We're assuming it is, right?
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
perhaps we could modify the 'random' number generator to keep the average deviation within a certain range from average? it would, of course, change a lot of things (such as how much you can rely on luck, etc) but it would keep people from complaining (I hope). This (and the range) could also be added as an option. There are technical difficulties involved, such as that the RNG is just a built in function which has no idea why it's being called, but it could be done (I think).
2B |! 2B = 3F
I've gotta say that considering how often I've seen people complain, and how little it is backed up by anything that looks like a rigorous mathematical criticism of the number generator, I am really jaded enough to disregard anything that looks the least bit 'anecdotal'.
However, perhaps just to please people we should switch the RNG to a uniform one rather than relying on rand() in the implementation's standard library.
GNU Go (http://www.gnu.org/software/gnugo/gnugo.html) seems to have a nice enough random number generator that we could poach and use. (Actually their developer wrote to me a long time ago and recommended we do precisely that; it sounds like he researched it pretty thoroughly).
Of course, even if we did this, we'd still get someone complaining about the RNG every month or two.
David
However, perhaps just to please people we should switch the RNG to a uniform one rather than relying on rand() in the implementation's standard library.
GNU Go (http://www.gnu.org/software/gnugo/gnugo.html) seems to have a nice enough random number generator that we could poach and use. (Actually their developer wrote to me a long time ago and recommended we do precisely that; it sounds like he researched it pretty thoroughly).
Of course, even if we did this, we'd still get someone complaining about the RNG every month or two.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Depends on your OS; the RNG used is the default one for whatever system your using. No specific RNG is actually packaged with Wesnoth.Cod wrote:Who made the one currently being used?Dave wrote: However, perhaps just to please people we should switch the RNG to a uniform one rather than relying on rand() in the implementation's standard library.
David
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
The C Standard defines a function called 'rand()' which returns a random number. That's what we use.Cod wrote:Dave wrote: However, perhaps just to please people we should switch the RNG to a uniform one rather than relying on rand() in the implementation's standard library.
David
Who made the one currently being used?
It's up to the implementor of the C/C++ implementation to provide the rand() function, so rand() was written by the vendor that supplied the C standard library that was used in compiling the version of Wesnoth you're using.
That is to say,
- if you are using the Windows binary supplied, it was Microsoft
- if you are using the Mac binary supplied, it was probably Apple
- if you compiled on GNU/Linux or used a GNU/Linux binary, it was probably the GNU C compiler team.
Personally I would trust any of these vendors to be able to write a decent random number implementation. Apparently other people don't....
Well, not quite -- it depends on the C standard library used in compilation; not the OS. For instance, if you use Windows, there are C++ implementations available from Microsoft, Borland, and GNU, among others, each of these likely has its own standard library implementation, including rand(). Even with GNU/Linux, there is a compiler available from Intel, which I believe has its own standard library implementation (actually I'm not sure about this, it might just use the GNU implementation).turin wrote: Depends on your OS; the RNG used is the default one for whatever system your using.
The basic point though is, are we going to decide we need to write our own sorting routines next, because we don't trust those supplied by the vendors?
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
I've seen some bizarre results with the standard rand() in Borland's C++ 3.1 (which is pretty old, it compiles DOS programs), for instance. It didn't behave well with some seeds, instead doing strange things like having rand() return the same value over and over and over... That was the bizarrest one, but it also did other strange things.
It should be pretty simple to whip up a program to test to see if the RNG is putting out results which are fairly evenly distributed statistically. Of course we'd have to test with a bunch of different seeds, because it could give sensible results for some seeds and totally ridiculous results with others.
It should be pretty simple to whip up a program to test to see if the RNG is putting out results which are fairly evenly distributed statistically. Of course we'd have to test with a bunch of different seeds, because it could give sensible results for some seeds and totally ridiculous results with others.
-
- Posts: 719
- Joined: December 9th, 2003, 9:31 pm
- Contact:
Like Dave, I'm not convinced a new RNG is needed, but I would put in a vote for the Mersenne Twister if rand() does get replaced. As I understand it, it is public domain now (used to be GPL), so its certainly available. Also I think there are some Angband Variant(s) that use it. Angband makes extensive use of the RNG, more so than even most other roguelikes I believe. If its good enough for them, its most likely good enough for us.
However, I know nothing of the Go game's RNG implementation, and it could very well be significantly better than the Mersenne Twister. If the devs do go through with this, they should be extensively compared to each other so we get the best one for the job. Speed is probably the biggest factor to consider, but the ability to tweak it for balance and additional uses like the random character names, town names, and multiplayer maps would all weigh heavily too.
However, I know nothing of the Go game's RNG implementation, and it could very well be significantly better than the Mersenne Twister. If the devs do go through with this, they should be extensively compared to each other so we get the best one for the job. Speed is probably the biggest factor to consider, but the ability to tweak it for balance and additional uses like the random character names, town names, and multiplayer maps would all weigh heavily too.
Signature dropped due to use of img tag
Indeed, and this has already been done by several people, including myself, all of whom found that the RNGs are good quality.SL wrote: It should be pretty simple to whip up a program to test to see if the RNG is putting out results which are fairly evenly distributed statistically.
All we need is for someone to produce a program which shows that there is a serious problem with the RNG on a major platform for our purposes, and we will concede that we have a problem and try to do something about it.
But, no-one has yet done this...
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming