News for hackers. Stuff that matters.
Re:Five million people see a classic case of calling random(... by chipsy on Friday October 23, 2009 @10:07PM (#900013)
This is partly the fault of Flash itself. It doesn't provide control over seeding the API's PRNG.

A diligent coder can of course implement their own PRNG method, but that is not an excuse for providing a half-broken feature.

Re:Five million people see a classic case of calling random(... by tesseract on Saturday October 24, 2009 @02:20AM (#900190)
The regular random number generator in Flash is automatically seeded and you can't specify a seed. This article, though, talks about using BitmapData.noise() which takes a seed as a parameter, and normally when I see people discussing the use of that API for general purpose random number generation it is precisely because it allows control over seeding.
Re:Five million people see a classic case of calling random(... by antirez on Saturday October 24, 2009 @04:37AM (#900277)
rc4 is a prefect algorithm to build a fast and very high quality PRNG for instance.
Re:Five million people see a classic case of calling random(... by snorkel on Friday October 23, 2009 @09:31PM (#899987)
Reminds me of this classic cautionary tale of poor PRNG seeding, How We Learned to Cheat at Online Poker, http://www.cigital.com/papers/download/developer_gambling.ph...
Re:Five million people see a classic case of calling random(... by known on Friday October 23, 2009 @11:09PM (#900060)
In PHP 4.2.0 and later, there is no need to seed the random generator with mt_srand(). This is done automatically.

http://www.w3schools.com/php/func_math_mt_rand.asp

Re:Five million people see a classic case of calling random(... by streety on Saturday October 24, 2009 @02:47PM (#900804)
Although factually correct I don't see the relevance given that this game is Flash based and written in actionscript. Am I missing something?

Also, why not link directly to the php site? http://php.net/mt_srand

Re:Five million people see a classic case of calling random(... by hugothefrog on Saturday October 24, 2009 @05:10AM (#900289)
Funny, I was just watching a colleague play this at work the other day.

He'd written an app to play the game for him - takes a screen shot, scans the bitmap, figures out the pieces, then determines an optimum set of moves.

Re:Five million people see a classic case of calling random(... by brunov on Saturday October 24, 2009 @04:55PM (#900930)
Just like Sweeperbot! http://sweeperbot.org/
Re:Five million people see a classic case of calling random(... by Keyframe on Friday October 23, 2009 @10:13PM (#900022)
well I have tried to see if this is true and it seems like it isn't anymore.
Re:Five million people see a classic case of calling random(... by pbhjpbhj on Saturday October 24, 2009 @07:27AM (#900362)
I had the same board as in the article, but it seems to be fixed now.