« first day (1316 days earlier)      last day (3530 days later) » 

3:12 AM
@NathanMerrill CodeBots2Java needs to handle division and modulus by zero in some way
I'm just returning zero, for now
 
3:31 AM
All( BotAt(D) , None( BotAt(Add(D,1)) , BotAt(Add(D,2)) , BotAt(Add(D,3)) ) )
that should trigger if there's a bot in front of me and no bots on other sides of me, right?
@NathanMerrill this doesn't seem to work ^^
 
3:59 AM
@NathanMerrill also, I think the search for valid conditions after Start doesn't loop back to the beginning
 
4:24 AM
@Sparr I don't know of a better way to handle divide by 0. I'll check tomorrow as to why that isn't working and I'm fairly positive that looping back around works, but I'll double check tomorrow
 
returning zero seems the easiest course
making the whole line a noop is also an option
 
oooh...I think I know why the condition doesn't trigger
hmm...maybe I don't
Yes, the search for valid conditions does loop back to the beginning
I'll test/figure out the other one tomorrow
 
Something is wrong with bots that don't Start at the beginning, I think
simply adding a "Flag" line at the top of my bot ruins its performance
and it has no absolute line numbers
 
4:52 AM
also, I think this is top of the leaderboard next time you run it: codegolf.stackexchange.com/questions/37308/…
 
 
1 hour later…
6:15 AM
hi @MartinBüttner
 
 
1 hour later…
7:18 AM
@MartinBüttner Not sure. I think that if someone wants to do that as a challenge they should first write a reference implementation to get a feel for how trivial it is.
 
 
3 hours later…
10:24 AM
@PeterTaylor I might try a naive implementation in Julia an see if it's possible to find any that way at all
 
 
1 hour later…
11:37 AM
@user2179021 I'm trying to work on a proper submission for your challenge. But I seem to be misunderstanding something. Say, for every point in Y, I try to rotate the first point in X onto that point. Shouldn't there be one rotation where the second point in X falls exactly (to machine precision) on another point in Y?
 
 
2 hours later…
1:12 PM
@MartinBüttner hi
 
@PeterTaylor okay, it's trivial to find them for 16-bit floats (they start around magnitude 40-50). and not too hard for 32-bit floats either (the first pair is (i,j) = (2897,2896); (x,y) = (3220,2532)). however, this challenge has the same problem as the euler brick one: every integer multiple of a solution is also a solution. so I need a way to encourage searching for more than just multiples of a few hardcoded ones
@user2179021 hi
 
@MartinBüttner let me check something about the data creation. I am slightly worried I didn't update the code in the question
@MartinBüttner in relation to your question
 
@PeterTaylor there was a bug in my code. float16 collisions start at (i,j) = (24,22); (x,y) = (31,10) and float32 at (i,j) = (1483,1471); (x,y) = (1675,1248)
 
@MartinBüttner ok back.. are you not finding the second point which matches exactly?
 
@user2179021 no, they are usually by about 10^-2 or 10^-3 off, and if I take that match I still get an overall distance about as bad as your generic optimiser
there might be a bug in my code of course
but I thought I'd check with you that this should actually be the case in the first place
 
1:29 PM
@MartinBüttner It is possible I mucked something up. Would you mind if I just recreated the data?
 
@user2179021 no, go ahead. I'll give it another go then.
 
ok.. let me do that
ah.. found the problem
@MartinBüttner The data creation code was missing "+np.random.random()"
it should all make sense now
sorry about that
so in answer to your question.. no :)
@MartinBüttner let me know if it makes sense now please
 
ah I see.
that does make sense
otherwise the challenge would probably have been quite trivial
 
or at least easier :)
also.. what a "python-bashing" tag :)
 
does random.random() return in [0,1)?
 
1:36 PM
what about a...
@MartinBüttner "Return random floats in the half-open interval [0.0, 1.0)"
so it doesn't include 1.0
yes :)
 
so "yes" :D
 
what is your approach going to be? I am intrigued
 
not sure I'll still be bothered to work it out with that change :D ... but I think I should be able to figure out a handful of candidate rotations, about which I can minimise.
 
sounds cool (not that part about potentially giving up !)
it occurred to me that there is probably an exactly O(n^2) solutuion
an exact O(n^2) solution I mean
which is fairly useless for my largest test of course
I hate to think this problem has defeated the Internet :)
 
well how exact can it be? in the end you still need to figure out the best exact rotation which is going to be different from your rotation due to the random offsets
 
1:50 PM
@Sparr I believe that the conditions are working properly, but that the highlighting I give them at the beginning is not
I'm not sure about that though
 
Next time I'm working on bots I'll make some test cases
I ended up just replacing my All(x,None(x,x,x)) with All(x,Not(x),Not(x),Not(x)) and it worked fine
 
well, its interesting because I had my BotAt condition return False every time
and that line you gave me to test always showed blue on the first turn
but Insidious does fantastic
188.1
 
yeah :)
I'm sorta sad at how stagnant the field is after a few hundred turns in CB2
 
0
A: Sandbox for Proposed Challenges

Von IlyaStill Trying To Think of a Good Name Prior to the discovery of fingerprints and DNA testing, the British police used an anthropometric system to identify repeat offenders. It involved a certain parts of the human body. It was believed that the size of these body parts did not change after adulth...

 
most bots stop moving
it's a lot easier to get frozen in CB2
 
1:53 PM
for sure
also, I made a pretty major fix with the latest release. only a few of the O-arguments were working. I just pushed the fix
 
@PeterTaylor Okay, finally found some pairs for 64-bit floats. I estimate that they all appear beyond magnitudes of 10^7. so by starting at 50M, I found (e.g.) (i,j) = (50000000,45000018); (x,y) = (50682794,44229583)
 
2:42 PM
@COTO you might be interested in this ^
(this is about false positives on a circle lattice)
 
3:17 PM
@MartinBüttner: Indeed. Confirmed that the former vector has magnitude `0.6726813227673505132725932e8` and the latter has magnitude `0.6726813227673505876019945e8`, differing in the 17th digit (would be the 16th in a normalized float).

I'm not a great student of algebraic geometry, but perhaps there's an efficient way to determine all integer solutions to the Diophantine equation `x^2+y^2-w^2-z^2=n`, in which case you could simply step `n` over a reasonable range of values to determine different potential sets of false positives.
@Sparr: I've been thinking of different ways to put together a bot for CB2, but I'm having a hard time with the freezing issue too. There are multiple ways to freeze now, and no efficient ways to block instructions.
 
@MartinBüttner I meant exact to within machine precision
hi @COTO
has anyone asked question that requires limited memory? I would like to specify that the space usage has to be "constant" which makes sense from a theory point of view but I am not sure how to specify that for code
any idea?
 
Hi, Lembik.
 
@COTO Do you have any interest in my question by any chance? codegolf.stackexchange.com/questions/37269/…
it is feeling slightly lonely and I love it so much :)
 
3:34 PM
You state that the measure of distance between the points isn't symmetric, but how so?
Given any point in X, it will have a closest partner Y, with a corresponding distance D.
If we use Y as a reference, its closest partner will be X, also with difference D.
The various distances may be summed up in different ways, but they should still sum to the same total.
 
@COTO oh I can explain that :)
let X have [1] and Y have [2,3]
the distance from X to Y is 1
from Y to X it is 3
1+2
 
Oh, you're saying that the number of points might not be equal.
No, actually you're right. I just worked up a counterexample.
OK, false alarm. My apologies.
 
no problem :)
I hope this has inspired you to post an answer :)
 
I'll submit something this afternoon.
 
the number of points may well not be equal. In the data I give they are not
cool!
if you look at the data creation code you will see timesY has 10 times as many points as timesX
 
0
A: Sandbox for Proposed Challenges

LembikProduce a factorization picture The task is simple. Your code should take in one positive integer n less than 1000 and output a picture in any standard graphical format (jpeg, png etc) of the factorization of n. What is this picture? It should look exactly like the corresponding picture from htt...

 
 
2 hours later…
6:12 PM
...who controls the twitter for code golf?
@StackCodeGolf, The Stack Exchange network
A Q&A site for programming puzzle enthusiasts and code golfers
2k tweets, 178 followers, following 0 users
aka...who wrote the program to do it?
 
 
2 hours later…
Vi.
8:22 PM
Should there be a Capture The Flag challenge on PPCG?
0
A: Sandbox for Proposed Challenges

Vi.Capture the flag king-of-the-hill Basic rules There is a rectangular map of cells, each bot has current cell. Bots compete 1 vs 1 at a time, let's call them red and blue. There are N instances of red bot and N instances of the blue bot on the map. Additionally, there is unmovable red base and ...

 
8:44 PM
I haven't read your spec yet, but I think @Geobits was working on one, too
 
9:31 PM
0
A: Sandbox for Proposed Challenges

Martin BüttnerFalse Positives on an Integer Lattice fastest-code arithmetic Background When working on a grid of integer coordinates, you sometimes want to know whether two vectors (with integer components) have the same magnitude. Of course, the Euclidian norm of a vector is given by √(Δx² + Δy²) So a n...

 

« first day (1316 days earlier)      last day (3530 days later) »