« first day (1283 days earlier)      last day (2127 days later) » 

11:00 PM
it flows much better in programming that way, too.
If they want to know about a certain square, rather than having to input and process all of the squares at the beginning, they can just request it
 
I like all information when it is practical. The problem is I'd like an arena that all players can be in at the same time, so if there were hundreds of entrants (or a few entrants with a standard 100 entities each) then anything more than just local information could get out of hand
Maybe as a compromise the players could be fed the information nearest first, so they can decide how far through the data to process before making a decision.
Any of you interested in a quick c++ mystery?
 
very quickly please
 
I'm going crazy with my DLA code...
I've narrowed it and narrowed it
I use a variable taking integer values from 0 to 4 to determine direction
if I choose it using
d=rand()%4
it gives bias towards 3 and 4
but if I use
d=rand()%4002%4
the bias disappears
but
d=rand()%4000%4
 
do you still have rand in a macro?
 
gives the same bias as originally
I'm just using rand() directly until I golf it
 
11:15 PM
is % right-associative by any chance?
no that would give division by zero
 
The difference in bias between %4000%4 (no bias) and %4002%4 (hardly any bias) should be imperceptible, but the version with no bias shows a huge bias in the results
I narrowed that down:
if %4002%4 was equivalent to %2 then there would be movement in only 2 directions. I'm not seeing that so I ruled it out.
Either %4002%4 or %4000%4 gives results indistinguishable from unbiased if the image side length is not 512 or 1024
511 or 1023 or 1025 work fine
then making the image side length 512 or 1024 suddenly introduces huge bias
 
hmmm
it might have something to do with the fact that rand is just really bad and linear
 
I thought maybe I'd used DIM somewhere I shouldn't but if I take out the rand() and use
d=(d+1)%4
it all works fine
I just looked up rand to try and see how bad it is
I'll check RAND_MAX
 
@m.buettner: With GLIBC's rand(), there's a simple algebraic relation between bytes of your program's output: Viewing the output as an array x, you have x[i] == (x[i - 3] + x[i - 31] + c[i]) % 256, where c[i] is 0 with probability 0.75 and 1 with probability 0.25. This pretty much means that it can't generate any of the things you mentioned. — Dennis Mar 23 at 17:04
 
Ha! I just checked and RAND_MAX is set to 32767
That's shockingly low
 
11:21 PM
wow
 
No wonder
So throw a couple of powers of 2 in and bias shows up almost immediately
 
well... I should sleep... I'm sure you'll find a decent workaround ;)
looking forward to seeing the results tomorrow morning!
 
Now that I know it should be OK - thank you!
sleep - see you again
 
11:48 PM
These angels
still not chosen between BFS or DFS
 
Would breadth first mean checking all routes even if one of them is successful?
I'm guessing they take the same time if there is no solution?
Like eating the whole cake to find the penny inside it, rather than just stabbing it in random places until you find something
 

« first day (1283 days earlier)      last day (2127 days later) »