[April Fool's] Wesnoth Random Number Generator Changes

General feedback and discussion of the game.

Moderator: Forum Moderators

User avatar
Captain_Wrathbow
Posts: 1664
Joined: June 30th, 2009, 2:03 pm
Location: Guardia

Re: Wesnoth Random Number Generator Changes

Post by Captain_Wrathbow »

Y'know, I'm kinda starting to like the AI. :D
Pp2
Posts: 37
Joined: February 19th, 2010, 10:03 pm

Re: Wesnoth Random Number Generator Changes

Post by Pp2 »

Well, he is so powerfull that it is really hard to defeat him even on a 1 vs 0 game :roll:
501st_alpha1
Posts: 14
Joined: January 28th, 2010, 4:48 am

Re: Wesnoth Random Number Generator Changes

Post by 501st_alpha1 »

Whoops... I probably should have read this thread first (as in, before the poll), but yeah... this is one elaborate April Fools joke... at least, I hope it is. :P
User avatar
ivanovic
Lord of Translations
Posts: 1149
Joined: September 28th, 2004, 10:10 pm
Location: Germany

Re: Wesnoth Random Number Generator Changes

Post by ivanovic »

Before I forget to mention this:

Happy April Fools Day!

No, the random number generator we do use (no matter if on the server or on your computer) has no bias, it is the default random number generator that the programming language C++ comes with. Sure, if this is broken on your platform, then random numbers in Wesnoth are broken, but this is very unlikely. The AI is not able to cheat with random numbers either. In fact the AI has no idea which difficulty level is currently selected, though different parameters might be supplied to the AI in different difficulty levels. But this does solely depend on what the WML creator codes. For example the AI might only consider exactly one attack and the outcome or it might consider 5 attacks before sending a unit into battle. Beside this there is no plan for premium Wesnoth in the near future. Hey, which features should we really offer there? There is nothing!

Beside this the idea about the RNG done as hashsum over the everchanging internet is technically not possible. The Wesnoth AI is no mutating SkyNet (cf the popular movie series "Terminator") like AI.
User avatar
ivanovic
Lord of Translations
Posts: 1149
Joined: September 28th, 2004, 10:10 pm
Location: Germany

Re: Wesnoth Random Number Generator Changes

Post by ivanovic »

Since some people will probably still say "but hey, the results of the script...", here is the content of the two scripts Dave wrote and put online:

rand-old.pl:

Code: Select all

#!/usr/bin/perl
use strict;

print "Content-Type: text/plain\n\n";

print "Wesnoth random numbers\n";

my $last = int(100*rand);
for(my $i = 0; $i != 100; ++$i) {
        my $num = int(100*rand);
        if(($last-$num) > 10 or ($num-$last) > 10 and (rand > 0.2)) {
                redo;
        }

        print "$num\n";
        $last = $num;
}
rand-test.pl:

Code: Select all

#!/usr/bin/perl
use strict;

print "Content-Type: text/plain\n\n";

print "Scanning pages...\n";

my $sum = 0;

srand(time);

for(my $i = 0; $i != 10; ++$i) {
        $sum += int(10000000 + 100000000*rand);
}

sleep 20;

print "Scanned $sum pages...\n";

print "Scanning of pages completed; generated check sum. Random number stream follows\n";
for(my $i = 0; $i != 100; ++$i) {
        my $num = int(100*rand);
        print "$num\n";
}
And yes, this code is *not* what is used anywhere inside of Wesnoth. Those scripts are crude hacks to make you believe some stuff...
User avatar
CheeseLord
Posts: 147
Joined: February 19th, 2009, 11:07 am
Location: Knagla

Re: Wesnoth Random Number Generator Changes

Post by CheeseLord »

I believed it until this:
Dave wrote:"Of course, it's possible the AI will make an illegal access to the memory page with the random number generator"
Super Robots for the win!! :lol2: At this point, I realised that it's probably a April Fools joke..........

Damn!!! I just realised that Wesnoth replacing Age of Empires was a joke too :| :augh:
Lord of Cheese.....especially Parmesan!!!
None shall stand against the Dwarfs in their homeland

Top 3 quotes by a developer:

1. Locked
2. Do it yourself
3. "No"
User avatar
Captain_Wrathbow
Posts: 1664
Joined: June 30th, 2009, 2:03 pm
Location: Guardia

Re: Wesnoth Random Number Generator Changes

Post by Captain_Wrathbow »

I'm afraid I have to admit it- this one did fool me.
I knew from the start that the "Premim Wesnoth" was totally fake, it had more holes than walls. And it was obvious you all were kidding about an RNG-hacking AI, but I honestly believed Dave had found some issue with the RNG and was rewriting it.
I'm impressed that you went so far as to put the "new" RNG online for testing- that really added to the believability. Congrats Devs and all those who didn't believe it!
joshudson
Posts: 501
Joined: January 17th, 2006, 8:04 pm
Contact:

Re: Wesnoth Random Number Generator Changes

Post by joshudson »

Uhh, the AI has integrated http://c2.com/cgi-bin/wiki?TheKenThompsonHack and become http://c2.com/cgi-bin/wiki?HyperBug.

Don't bother reading the source code, the AI RNG cheat's not there.
CHKDSK has repaired bad sectors in CHKDSK.EXE
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: [April Fool's] Wesnoth Random Number Generator Changes

Post by Mabuse »

yeah, this one was realy well made, he really got me.

Edit:
he really got me, though i couldnt belive that this was the wesnoth rng, and i just thought to myself:
"if i would have found out that my rng is complete crap, i wouldnt have admitted this in public and would have just fixed it in secrecy, i think the devs went crazy and dont realize what damage this could do to BfW and their credibility, if they now admit their rng is crap after all that discussions and treads about it"


it was a realy relief for me to realize this was an aprils joke :) :lol2:
The best bet is your own, good Taste.
uzy5o
Posts: 52
Joined: March 9th, 2008, 2:39 am

Re: [April Fool's] Wesnoth Random Number Generator Changes

Post by uzy5o »

I don't know if it's just me, but it seems like the user ihatewesnoth is actually a set-up for this April Fool's joke.
HomerJ
Posts: 812
Joined: April 25th, 2008, 1:22 pm
Location: Hannover, Germany

Re: [April Fool's] Wesnoth Random Number Generator Changes

Post by HomerJ »

If only it was... :augh:

Greetz
HomerJ
Six years without a signature!
Post Reply