Search found 1860 matches

by mar
Mon Jan 21, 2019 9:16 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

this:

Code: Select all

        ttEntry.Score = beta;
by mar
Tue Jan 15, 2019 9:16 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

Just out of curiosity, can you please post the corresponding images for MS-rand and ISO-rand using the 8 LSBs from the RNG directly for each byte, i.e. with one RNG call per byte and so that the LSB of the RNG is also the LSB of the greyscale value? The image I had made was something entirely diffe...
by mar
Sun Jan 13, 2019 3:08 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

I meant in actual usage. When you want a small variation, say +/- 50 centipawns, then the usual idiom is to mod the rand() result down like in noise = rand()%101 - 50; Ok, not to mention that getting a random in interval by using modulo is not a good idea, you don't get uniform distribution this wa...
by mar
Sun Jan 13, 2019 9:03 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

Completely irrelevant for this application, and also bear in mind that it's mod'ed down to have the desired small variation. For image and audio processing, that would be another issue, of course, especially where you don't mod down. There's no variation whatsoever, the modulo simply reduces the ou...
by mar
Sat Jan 12, 2019 7:46 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

A very long time ago, probably last century, I wanted to make a random texture for artistic purposes. I knew that Microsoft's rand() was bad, but I thought it would be good enough just to make a random texture. The result was disastrous. You mean something like this? :) LCG (microsoft), 256x256 8-b...
by mar
Sat Jan 12, 2019 4:42 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

It isn't "bad", it's at worst unsuited for certain applications. The one in question here simply doesn't belong to them. The issues that Chris was experiencing had nothing to do with the LGC, but with how the state is managed. Yes, I already explained the issue he was having. As for wordplay, if fa...
by mar
Sat Jan 12, 2019 2:50 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

The reason for the masking is that otherwise, no numbers will repeat throughout the whole period of (in this example) 2^31. Therefore, anything somehow related to the birthday paradoxon would fail. Also, any application that just wants a random yes/no and tests that for checking the LSB of the outp...
by mar
Sat Jan 12, 2019 4:57 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

Well, the results do appear to show that python random.randint() does perform differently. I wonder why/how. Like I said, this is likely due to the fact that you have to use multiprocessing in Python Basically the calling process is forked n times (in your case 8 = number of "cores"). How fork work...
by mar
Fri Jan 11, 2019 5:59 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

Ok, seriously: you forgot to reseed, no big deal.
This is suspicious as well:

Code: Select all

engine_weights += initial_weights + random(small_variation)
as it would skyrocket the weights quickly. I believe the first += should actually be =
by mar
Fri Jan 11, 2019 4:58 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Writing bugs
Replies: 66
Views: 2412

Re: Writing bugs

Each parallel batch contains identical games is (was) the problem int random() {return 42;} Wait - could this possibly be related to the fact that you used Python, where threads are completely useless due to GIL and you have to use multiple processes? :roll: Then your "bug" is directly related to t...