« first day (1278 days earlier)      last day (3560 days later) » 

12:29 AM
Since Perl is the only language I know at a non-total-newbie level, I should make a Perl-only KOTH. I'm not sure if very many people would would participate, though.
 
Since you're giving mine a go, I'd give it my best shot
I don't know perl though
but still, I'd try
 
I'm not exactly a professional at Perl, either.
 
I would enter a perl KOTH if I liked the problem
SPOJ has spoiled me by accepting so many languages.
 
I have a KOTH in the sandbox right now, but I haven't decided what languages to accept to it: meta.codegolf.stackexchange.com/a/1893/2867
(I would appreciate comments on that sandbox proposal, since I haven't recieved any yet)
 
12:59 AM
I'll check it out
 
I just added an explanation as to why a uniform-random bot is consistently beatable.
 
ok
 
I like the challenge, it's simple but offers room for tactics
 
The thing that I haven't found is the "neutral" strategy- a strategy that neither consistently wins or consistently loses against other strategies.
 
There have been a lot of pattern recognizing koth challenges lately
 
1:06 AM
In rock-paper-scissors, a random bot will beat even the smartest bot about 50% of the time.
 
What about
throwing each low number a bit more likely than the number that's one higher
and doing the opposite with guessing
so that the expected value is independent of what the opponent does
 
so maybe throwing with probability [0.25, 0.225, 0.2, 0.175, 0.15] and guessing with the opposite probability?
 
I can run those numbers if you want to see the result...
 
increases the odds of your opponent guessing correctly
 
(the numbers are 0-5, not 1-5)
 
1:11 AM
sorry
 
but it also decreases his expected value when he guesses correctly
since your throw is more likely to be low
and a smart bot could avoid getting guessed too often, but would need to throw higher numbers for that
 
but the decrease in value is only half the in probability, since he scores his own choice too
 
True
I wonder if you can balance out the numbers.
I don't feel like working it out.
Would probably be easier to test it.
 
For example, with the probabilities {.23, .205, .18, .155, 0.13, 0.10}
 
how does it do against various bots?
 
1:16 AM
The best strategy is to guess 4 and play 0 every round, with an expected value of 0.315 points per round.
 
against this bot?
wait can't we set up a few equations demanding all expected values to be the same
and then solve for the probabilities
 
We can, but there will be 36 variables.
 
can we assume simmitry for a solution?
so that we only need to test one side of things
well, find.
 
I don't know if that would work.
 
ah no
cock
well that's no problem
with more equations than variables, you can easily find out if a solution exists
isn't it 25 equations and 5 variables?
 
1:22 AM
There are 36 possible moves each turn.
 
or 10 if you want the distribution of guessing and throwing to be different
oh right
[0, 5]
 
Ten variables if your guesses will be unrelated to your throws.
 
36 equations, 6 variables
12, no?
 
Actually, 12
 
you can assume symmetry
if the expected value of 5 2 equals that of 5 1, then the expected value of guessing 2 equals that of guessing 1
etc
 
1:37 AM
Okay
 
I gotta go
cya
 
I don't have enough time to actually do the math right now
Bye!
 
Good luck with the planes if you're still planning on writing them
 
 
6 hours later…
7:21 AM
@VisualMelon Neat! How are the others going?
 
Hi @MartinBüttner
 
@PhiNotPi If you're writing the controller in Perl, I'd suggest handling communication with the bots via command line. Each bot is a script (as in Caveman Duels) and you call it each turn with the history as command line arguments, then you read the response from their STDOUT.
@overactor morning
 
Morning @overactor and @MartinBüttner!
 
Wow, so many people in here
 
Morning @ProgramFOX, how are we all doign today?
 
7:27 AM
Fine, thanks.
 
Yeah, very unusual.
 
surprisingly knackered
 
Up late yesterday?
 
not at all
that's why I'm surprised :D
 
Makes sense, I'm surprisingly non-knackered.
 
7:29 AM
:D
 
@Sparr is dominating my challenge
 
I'm still trying to figure out how to put the perfect 2048 strategy into a solid algorithm
I always end up with stray 4s in rows I don't want them in
 
I've never really looked into 2048
what sort of scores are you achieving?
 
you should, it's totally worth a week of your life :D
you mean when I play myself?
or for the PPCG challenge?
 
Oh, there's a challenge?
PPCG I guess
 
7:37 AM
there are so many :D
I just posted a simple strategy yesterday, that gets the 1024 tile and some 3000 points (which is not the score you'd have in the game though), but that's not the optimal strategy anyway, that was just to get something working at all
I almost got the 8k tile once, and the 4096 tile quite regularly
my top score must have been around 100k I suppose
 
Not bad.
 
My top score is just 7k. :(
 
once you figure it out you can get to 2048 pretty much every time
the annoying thing is just that obviously the game length also doubles with each new tile you want to achieve, so when you're going for 8k the game can easily take 45 minutes or an hour
 
I've read a strategy of keeping the highest tile in a corner, tried that but I didn't reach 2048, only 1024.
 
Same here, didn't try for long though
 
7:42 AM
yes that's one part
 
And never pressing down key was also important (if you kept your highest tile at a top corner).
 
the other is that once you fill one row (say the bottom row, if your highest tile is in the bottom left corner), then you keep your next-highest tile in the bottom right corner so you basically create a snake through the grid
 
Interesting, will try that next time.
 
gotta catch my train to work now
see you later
 
see you!
 
7:48 AM
See ya.
Is that challenge possible?
My mind is blown
 
8:03 AM
Oh come on! I have almost a 10x10 grid for that question, just one row has 11 characters...
Ha, now it is 10x10!
 
That's impressive
How do you start on something like that?
 
Oh, but the output isn't longer than 36 characters :(
 
8:22 AM
Now it's 12x10... almost!
 
8:43 AM
And now it is an 11x11 field with two rows with 12 characters...
Yay it's 11x11 now!
 
9:05 AM
question
does this: Output all ASCCII symbols not contained in your source code, only using ASCCII symbols.
seem like a good challenge?
 
I remember there was a similar challenge, will try to find it.
 
I'll look as well
 
Yep, here:
118
Q: Print every character your program doesn't have

Joe Z.Your task is to build a program (using only printable ASCII characters and/or tabs and newlines) that prints out exactly the characters in the printable ASCII space (0x20 to 0x7e) that don't appear in your program's source code (in any order, however many times you want). The shortest code to do...

 
Oh well
 
9:38 AM
@MartinBüttner not good, the 4-bit parity checker has taken 2.5hours already, I'm pretty new to this whole solving thing, but I can't shake the feeling I'm doing something completely wrong xD
I think it's time to make use of a good old HashTable
 
9:58 AM
well good luck. I'm glad it's not as trivial to solve optimally as my last code-challenge :D
 
 
1 hour later…
11:13 AM
this guy's question titles are so obscure. but I have no idea how to improve them, for lack of a catchy way to sum up the challenges.
any suggestions?
 
I'll have a look
What about something like "Finding adjacent integers in an array" for this one?
It's not entirely clear yet, but at least it says something
and the trem 'adjacent' might get people to read the entire question
For this challenge, I'd suggest soomething like: "Locating arithmetic subsequences in an array"
Maybe drop "in an array" for the latter question
 
for the former, how about: Finding nearby "adjacent" integers in an array. ?
since his definition of adjacent doesn't seem to be the most intuitive one
the other one sounds good, although I'd probably keep "in an array" in both cases
 
It's difficult to concisely express that property
nearby might be good
what about 'neighboring'?
 
hm, they could be very far apart
btw, just to be clear with "nearby" I'm referring to the fact that he wants to find the closest pair in the array regardless of their values
whereas "adjacent" refers to the fact that they are adjacent in the sorted array
 
Yeah.
What about:
"predicting non-equal, neighboring integers in a
damn, I got stuck
I want to express that it's not shuffled but will be
 
11:29 AM
hm
 
Predicting which non-equal values will be neighbors when shuffling an array
?
bit too wordy maybe
 
Finding nearby consecutive integers in a shuffled array
do you mean "when sorting"?
 
yes
 
I think we can leave the non-equal out of the title
 
what about "near consecutive" in stead of "nearby consecutive"
Guess so
 
11:31 AM
that's just a detail that doesn't even affect the algorithm
 
Finding near consecutive integers in a shuffled array
 
I liked yours better to be honest ^^
Predict which integers will be neighbors when sorting an array
damn
that misses the point that they should be as near as possible in the original array as well
Find the closest pair of integers which will be neighbors when sorting an array
quite wordy, but at least expressive
of course, it does slightly take away the fun of parsing his definitions ^^
 
maybe you should write an example in python and use that as the title
 
@VisualMelon :D
 
Find the pair of integers that will travel the least to become neighbors when their array gets sorted.
A bit more fun
 
11:39 AM
also not quite true, because a) there could be a closer pair that has to travel further because they are swapped and b) the could both move all the way through the array ^^
 
oh damnit
maybe "how to solve this puzzle* isn't all that bad
 
:D
this guy...
asks for advice and does the opposite...
 
What guy?
ah, same guy?
 
same guy
 
fun guy
He'll be goinging places.
Not the hot page, but places.
 
It's most definitly way better
 
12:32 PM
0
A: Proposed Question Sandbox - Mark XIV

overactorThis is an Idea for a code-golf challenge When was the last time the date was divisible by n? A date can be represented by an unsigned integer as such: YYYYMMDD. What you need to do, is write the shortest program that figures out when a the date was divisible by a give number n. And then return...

 
I'll need some help further formulating this^ question.
 
Small Victories:

- My RPSLV bot isn't in last place
- My username appears to be the reason that the username column in the results has to be as long as it is
 
@overactor It sounds fun but I don't get your examples
so the program should always act relative to today's date?
and search back in time?
did you mean to write July instead of August?
 
Yes
I did mean that
I have no sense of time
 
why would the program ever turn 20140729 if it's supposed to be divisible by 4?
did you mean 28 there?
 
12:41 PM
No that was for input 7
 
then you should write that :D
 
Good point ^^
I should proofread my shit.
 
also, please add an example that clarifies if today's date is a valid output or whether it has to be before today's date
(5 say)
 
@MartinBüttner: Do you have any suggestions for my KoTH? Would you play it?
 
@overactor I'm going out for lunch... if it's not fixed by the time I'm back, I'll come and get you!
(or maybe just help you fix it)
@NathanMerrill I haven't read it in detail yet, but will do so today.
 
12:43 PM
Ok, thanks
 
@Martin, maye mixing up the date format (DDMMYYY instead of YYYYMMDD makes things more interesting?
@Nathan, I saw your challenge proposal
It seems really cool.
I see where you're going with the chosing what you want to see thing, but it might be a bit complicated
 
Any way to simplify?
I feel that if I simply give the 4 (or 9) immediate squares, it will turn into a luck match
 
Maybe
 
Line of sight is certainly better, but I'm not sure if it's enough
 
You can rest in stead of move, which increases your view?
 
12:51 PM
Ah....what if I don't force the user to pass in coordinates?
 
it's easier but still offers the option of strategic play
 
...what if I, by default pass in the 4 most immediate squares
hmm....I'm not sure I like that
 
you can only see the contents of squares you got this turn, right?
well, the updated contents
 
You see the contents of the square you are standing on
and then 4 squares you requested last turn
relative to your current position
 
how about
you always see 4 squares immediately surrounding you
and you can pass request additional squares?
and teh one you're on of course
the*
 
12:55 PM
it still complicated for anybody that wants to do well
I'd have to put a limit on the additional squares
 
but it becomes easier for someone who wants to do okay
of course
 
which is why doing the 4 immediate squares by default makes sense
but lets say I can choose them...and I'm exploring the map, and I find a dead end
should I take it?
That kind of situation doesn't happen in 4 immediate squares
also...if I am looking into other squares...I'm no longer looking on my own squares...I may run into a ghost
that situation doesn't happen with line of sight
ok question:
I have no qualms giving the user their current position
 
doesn't mean much anyway
 
would it be easier if gave them their position, and then the requested positions in absolute coordinates?
 
Might be more intuitive
Here's a question
why not give them the whole map at the beginning, without contents
and then use line of sight
 
1:00 PM
that's not a bad idea
 
You could also give each entry 10 seconds before satarting to analyze the map
starting*
Their process persists, right?
 
@overactor you've added another typo ^^
 
Or you could use your own square + 4 specified every turn
 
why line of sight instead 4 immediate squares?
 
1:03 PM
to check the contents again
 
actually, I don't like 4 immediate squares
because it gives information across walls
 
@Martin, Typo-ing is what I do, it seems.
 
Ok. So, what if I do line of sight, and map from the beginning
 
fixed it, I think.
 
1:05 PM
...now giving absolute coordinates is easier
 
yeah
 
...but the challenge of figuring out your location might be a interesting one
 
If you want more tactics
 
so typical... for once I don't check if everything I ordered is in the mcdonalds bag and they forget my free cheeseburger... bloody hell...
 
You could have pacman face in a certain direction
@MartinBüttner bugger
 
1:06 PM
@MartinBüttner The up side to that is now you have one less McDonald's cheeseburger to eat.
2
 
In that direction, you see until the next wall
in the 3 other directions, whatever's closest, 1 square or next wall
 
Oh wait, you're not in the US, are you? Nevermind, McDonald's is about 40x better in any other country I've visited.
 
@Geobits :D ... the downside is, that additional cheeseburger is usually necessary to not be hungry afterwards
 
(so 1 square or no squares)
 
yeah I'm in the UK... it's actually alright here
 
1:07 PM
No, I think I'm going with line of site
sight in all directions
and you get your absolute position
ah...line of sight, except behind you
which is determined off of your move
 
@Geobits I've edited Underwater (the mines). For now I only made their AoE only 3x3x3 because otherwise only the middle layer of shark zone is safe from them... that seemed a bit tough
 
So when you run from a ghost, you don't know if it follows you or not?
 
Sounds good to me. 3x3x3 should be plenty of death and destruction :D
 
yep
also, now with the upper and lower shark layer being threatened by mines I can probably dispense with the funky jellyfish movement pattern
(in favour of 2x diagonally up followed by 2x down... no horizontal moves)
 
1:10 PM
I would be tempted to throw in the square right behind you
Seems a bit more tactical
 
Yea, diagonal/down should be fine.
 
@overactor I don't think it makes a difference... in the end, I'll iterate through the dates using a date-library, convert each date to the required number and abort when I find one that's divisible
 
With YYYYMMDD iterating through integers is also an option though
maybe that's good
more diversity
@Martin, what do I put for Input/Output?
 
@Geobits I think I need to redefine the hunting behaviour of jellyfish though... the easiest thing seems to be to say that they always keep their up-up-down-down pattern, but if there's an animal in any of the 9 relevant cells, it will pick that cell instead of its default pattern
@overactor I prefer to be liberal with that so as not to punish languages which have long keywords for functions or a hard time reading from STDIN. let me fish out an example spec from one of my challenges
 
I thought they did that in the last revision (and chose randomly if more than one neighbor).
 
1:17 PM
@Martin, Thanks.
 
@Geobits In the current (and last) revision they would go out of their way to hunt players
 
Ah. I like the idea of keeping to the pattern except for immediate neighbors.
 
well in particular, they would have gone to the top and bottom layers of shark zone, hence affecting the neutral layers
8
Q: Golfing for Domino Day

Martin BüttnerGiven a setup of dominoes your task is to figure out which dominoes fall and which don't. Input Take a rectangular ASCII representation of a domino setup. The following characters are used for the ASCII grid: (space): empty cell |, -, /, \: dominoes Dominoes can fall in 8 directions, which...

 
But do they go back to the previous space and resume the pattern, or resume it from where the prey was? The latter would allow them to drift out of their zone.
 
^ @overactor
the sentence before and after Output
(subtly promoting my question once more before the bounty ends tomorrow)
@Geobits they would have to go back (which wasn't specified). but specifying that seems hard than just saying: they always do up-up-down-down. if there's a neighbouring animal in the destination layer, go there. otherwise go randomly diagonally when going up or straight down when going down.
 
1:22 PM
Ok, I see what you're saying. That makes sense.
 
Does this look okay?
1
A: Proposed Question Sandbox - Mark XIV

overactorThis is an Idea for a code-golf challenge When was the last time the date was divisible by n? A date can be represented by an unsigned integer as such: YYYYMMDD. What you need to do, is write the shortest program that figures out what was the last time the date was divisible by a give number n ...

 
one sec
 
take your time
 
I'll edit it a bit now, and you can roll back if you want or just keep some parts
 
Go ahead.
 
1:33 PM
have a look
 
Infinitely better.
 
how do I get 3 rep?
(question upvote + any downvote... hm)
 
I could make it happen for you
but that would be fraud
I think
 
hehe probably
don't worry
I missed 7,777 anyway ^^
 
It would be gorgeous though
 
1:35 PM
answer upvote + downvote 7 answers
 
8,888
 
@Geobits very nice idea :D
how about question upvote and I downvote 2 answers? :P
 
Seems nicer.
 
now to find bad answers
(which I haven't downvoted already)
 
Nah, you can find 7 to DV, I'm sure. There are lots of bad answers
 
1:37 PM
Make sure they're not by the same user though
 
@Geobits looking through the front page, but I can't find any really bad ones I haven't already downvoted ^^
 
Shall I post a bad answer somewhere for you?
 
It can't be so bad that it gets deleted, though. Otherwise the rep returns.
 
let's look at popcons only
@Geobits I just need it long enough for a screenshot :P
 
1:41 PM
True
 
Or you need photoshop
 
you could always doctor the screenshot...
@overactor quite :P
 
But he'll know
 
Or even MSPaint. it's a straight copy/paste of the other 8
 
not necessarily
need to be careful with sub-pixel rendering
 
1:43 PM
@VisualMelon quite what?
I'm confused.
 
sorry, it's an expression I use, I'm not sure if other people use it who are not in my circle of nutty friends, it doesn't mean anything, it's just an acknowledgement
 
@VisualMelon Depends on which rep marker he's using, I guess. The big 8 on the user page probably doesn't require subpixel accuracy.
 
What post of mine was it directed at though?
 
the photoshop comment, I shouldn't dwell on it
 
aaaaand, number 3 in my collection :D
 
1:45 PM
beautiful
 
not having 7,777 is such a stain on the perfection though :D
 
Your badges align, too. 3 gold * 20 silver = 60 bronze.
 
7,777 is quite a bit cooler than 8,888
 
@overactor sure, pour some salt in the wound
 
It's true, though. FF7 taught me that years ago.
 
1:47 PM
@Geobits the 5,555 screen shot was quite nice because it was "5,555 G 1 S 11 B 44"
 
Nice
 
by the way, @Geobits are you going to enter a serious entry toto the dogfighting challenge?
 
@overactor isn't he in 2nd place already? :D
 
@Martin, change your profile pic to an 8 ball
Yeah, but tehre's only one real serious entry
 
Maybe. I have an idea, but I don't know how well it will work in reality. If it is pretty consistent, then sure.
 
1:48 PM
@overactor nice idea... can't be bothered though
 
yeah*
 
some Pony beat Markov :( ... and I already thought I was gonna win a KotH for once
 
2nd place among a group of planes that likes to run into walls :D
 
@Geobits that's something, right?
 
well, Starfox doesn't fly into walls
just purposely into the line of fire
 
1:50 PM
Yea, but at the time I decided to write Whirlygig, all the entries were eventually suiciding.
I put it up so that contenders would actually have to shoot something to win instead of just not dying.
 
It did help to some degree
Maybe I should improve the DumbPlanes
To make things a bit more interesting.
 
unless it gets lucky, my domino circuits solver will need about 10 Exabytes of RAM to solve the 4-way multiplexer
 
How lucky is lucky?
 
@VisualMelon ask Google for help?
 
@MartinBüttner I think I'll just sit in the corner and cry
 
1:57 PM
Does it work theorethically though?
 
no, for those sizes I'm pretty system.collection.generic.list will pack up
not sure though, I never need all 1.9*10^19 solutions in one list at a time
 

« first day (1278 days earlier)      last day (3560 days later) »