« first day (1466 days earlier)      last day (3370 days later) » 
00:00 - 20:0020:00 - 00:00

8:06 PM
@Rainbolt Could "ordered answers" include partial orders? Maybe that's pushing it.
 
I don't get Abba in the regex golf.
 
@randomra Answer tree : Answer chain :: Answer branching : Answer chaining
 
@Rainbolt yes
I thought I'd explicitly said that in the post
"When voting, keep in mind, that in general, answers won't necessarily just depend on the answer, but potentially on some or all or the existing answers (we didn't really have that yet, but we might not want to preclude the tag from including those)."
 
I thought = I know and I'm about to quote where I said it in 1.5 seconds
 
no
I went looking it up after the first message
since you'd posted the link that didn't take much longer than a couple of seconds though
 
8:12 PM
In that case, your copy paste open close tab skills are impressive
 
plus, there's always the uncertainty whether we're talking about the same thing :P
 
You two? Never...
 
I don't get why answer-dependent is unclear so I upvoted it
 
hm, I wonder if I should make the mean and variance parameters for the next round of Random Golf of the Day (random numbers from a normal distribution), or whether I should just say mean = 0, variance = 1.
 
8:29 PM
@trichoplax thanks.. I also don't think they worry about whether you can actually reach an orientiation without overlapping during a rotation
 
@Lembik I'm pretty sure they don't worry about that, no
 
edited in a spec draft for the normal distribution
 
@trichoplax good :)
@trichoplax you are breaking new ground :)
 
@Lembik Well, I'm hitting new ground. It's showing no signs of breaking so far...
 
:)
 
8:37 PM
@Martin I think your "choose a random partition" hole is a dupe of this, with trivial changes.
 
@Geobits I think partitioning an integer is a bit different from partitioning a list.
 
Oh, right, I was thinking about this the wrong way.
 
and I'm thinking about requiring space complexity O(1)
(and uniform distribution)
 
So, something like a function to generate the Xth partition without enumerating them?
(where X is a random grabbed from PRNG)
 
well in that case you'd first need to figure out how many of them there are. and I think there are approaches that are more efficient
 
8:42 PM
@MartinBüttner Huh? If the output doesn't fit in O(1), how does that make sense?
 
There are this many :P
 
@PeterTaylor sorry, I meant O(N)... basically such that you can't first find all of them and then pick one at random.
@PeterTaylor do you happen to know the complexity of a) the number of partitions of n and b) algorithms to get figure it out?
 
@MartinBüttner what is the function exactly? The number of ways of partitioning as set of size n?
 
to partition an integer
 
into factors?
or terms that sum to it?
 
8:46 PM
terms that sum to it
 
I think is a Bell number
i.e. the number of histograms
 
The number grows exponentially. I'm not sure what the best complexity to calculate it is, but the code which I said could be trivially adapted fills a quadratic number of elements in a table.
 
assuming that is the same question
 
@Lembik Not Bell numbers.
 
@Lembik, PartitionP
 
8:47 PM
@PeterTaylor right, so polynomial space and time would be sufficient to rule out enumeration approaches
 
@Geobits ah ok
@PeterTaylor I can't find "PartionP" in google
 
I say screw it and let Mathematica figure out the O(x): reference.wolfram.com/language/Combinatorica/ref/…
;)
2
A: How do I generate a uniform random integer partition?

Jason OrendorffHere is some code that does it. This is O(n2) the first time you call it, but it builds a cache so that subsequent calls are O(n). import random cache = {} def count_partitions(n, limit): if n == 0: return 1 if (n, limit) in cache: return cache[n, limit] x = cache[n...

Not exactly the same, but quite adaptable.
 
BTW I was thinking about the random shuffle question while I walked home, because "You know what I mean" is a bit lower than the standard we normally hold questions to, and someone might come along who hasn't seen the whole discussion in chat.
I think that the simplest way of removing ambiguity is to say that a) you may assume that a library function which is documented to return elements (approximately) uniformly selected from a given set does actually select them uniformly; b) you must ensure that each individual conversion from elements uniformly selected from one set to elements approximately uniformly selected from another has a factor of no more than 65537/65535 between the highest and lowest probabilities.
That essentially requires 48 bits of entropy, so prohibits directly using random 32-bit floats to Fisher-Yates shuffle 2^31 elements, and it still falls a long way short of actually requiring the stated requirement "Every possible permutation must be returned with the same probability", but at least it's unambiguous and doesn't rule out any existing answer.
 
Lol the output of my own controller made me laugh.
, , , , , , , , ,
, , , , , , , , ,
, , , , , , , , ,
, , , , , ,N00b, , ,
, , , , , , , , ,
,N00b, , , , , , , ,
, , , , , , ,N00bWFlag, ,
, , , , , , , , ,
N00b, , , , , , , , ,
, , , , , , ,N00b, ,
 
9:06 PM
@PeterTaylor I'm pretty sure that'll put a lot of people of who have no clue why I'm requiring such specific probabilities... like Rainbolt said earlier "I'll just revoke my submission because I have no clue what random functions I may or may not use" (paraphrased)
 
Hey look guys, someone on Board and Card Games posed a "List of tips" question: boardgames.stackexchange.com/q/22854/6692
For a guy whose name is ghosts_in_the_code, he didn't do a very good job convincing me to answer his question.
 
I always thought the best strategy for Connect Four was "use common sense" ;)
 
I just unearthed this question
 
I like the words "probably optimal" in a spec.
 
Hmmm... I should make a challenge like "Write a connect four bot in less than 1000 bytes. Submissions will round robin each other a hundreds times. Winner has the highest win rate."
Do you think less than 1000 bytes makes it interesting enough?
 
9:16 PM
I dunno. It's a solved game IIRC, so I guess it just depends on how much it takes to make it optimal. Once an optimal one comes out, the challenge is boring.
 
@Geobits CV as unclear
 
Right. That's the point of the 1000 byte limit
I don't think an optimal solution can be implemented in 1000 bytes
 
I'm just saying I don't know if 1000 bytes is a good limit or not. I haven't read any papers on the algorithm.
 
And if one can, I think it would be an interesting piece in our little corner of the Internet
 
Sure, but you could also just make a straight code golf out of it if it's feasible in that size.
 
9:18 PM
Errrr... I just realized you could (probably) brute force it in far less than that. So I'd have to impose a time limit in addition to a byte limit.
And I hate time limits :-/
They lead to questions like "Well what machine are you running on?"
It meets the spec on my supercomputer. What's wrong with you?
 
-1 This busts the time limit on my Tandy.
 
@MartinBüttner If they're puzzled by that, they'd already be puzzled by the bit about each call being O(1).
 
The call is O(1) because Martin said it is. That doesn't puzzle me.
It may not actually be O(1) in reality, but I can pretend that it is.
 
It's better that people be unsure about the "why" of a requirement than that they be unsure about the "what".
 
9:36 PM
@Doorknob if you handle my mod flag, can you please keep comments after the flagged one?
 
Needs custom flag ^
 
I had used a custom flag, but the text I think I wrote probably covers more recent comments as well
 
9:52 PM
@MartinBüttner For shuffle, will the input array ever be empty?
 
no, specifying that now might break some submissions
 
Awesome, there goes two bytes :D
 
If I write a connect four challenge, do I need to explain how connect four works? Or will Martin close that as unclear?
 
You'd need to explain your choice of colours if they aren't red and yellow.
 
red and black?
 
9:54 PM
why would you not include it? not everyone knows it, and the rules are so simple that they don't even blow up the spec
 
Can anyone reverse this regular expression?: .*(.)(.)\2\1.*
 
Why explain anything when you can link?
 
@TheBestOne "reverse"?
 
invert?
 
As in a regular expression that matches everything that particular one doesn't match.
 
9:57 PM
^(?!.*(.)(.)\2\1)
 
These regular expressions are looking at me funny
 
@MartinBüttner How would you make this clearer?
1. Ask Red for move X.
2. Drop a Red token into column X.
3. If Red has not won, then ask Black move Y.
4. Drop a Black token into column Y.
5. If Black has not won, repeat this process.

Tokens fall down a column until they collide with another token beneath it. You win a match if you connect four tokens in a row.
 
sounds pretty good, although "row" implies horizontal to me
 
"...in a row vertically, horizontally or diagnonally"
or in a line?
Is the 3d version a solved problem?
Just searched and they actually make boards for that - that was unexpected
 
I own a 3D tic tac toe board
 
10:00 PM
Wow :)
But you can't just drop pieces in for that. Does it have little shelves?
 
The columns are all poles, and the pieces slide down the poles
Like little firemen
 
I'm making progress on my hovercraft battle physics. When the hovercraft is accelerating purely linearly or rotationally, I can calculate each tick exactly.
 
Ah so the rules are almost like connect 3?
 
@trichoplax You know what... I never noticed that it isn't like tic tac toe at all lol
 
lol
 
10:02 PM
So yea. Like connect 3
 
Cool
 
I would be interested in knowing the simplest unsolved game.
 
Is there a word for orthogonal + diagonal?
ELU here I come!
 
@PhiNotPi Simplest unsolved Connect m in n-D? Or just simplest unsolved game in general?
 
either, really
 
10:04 PM
@Rainbolt for single steps it's the Moore neighbourhood I think
doesn't really help in this context though
 
I'd like to know too if there is
 
upboated
 
10:25 PM
@Rainbolt This question has considerably less than 1000 bytes per answer, but only covers one move so they are a bit smaller than a program to play a complete game. Probably gives you an order of magnitude estimate though
(ignore the title - it's not really connect four factorial)
Doesn't show up in the SE search due to using 4 instead of four. Probably best to use both "connect four" and "connect 4" at some point in your question if you want to maximise the chance of being found by an in-site search
 
@trichoplax Oh dang. I might have just duplicated that question in the sandbox. Didn't find it because of the "4" instead of "four"
 
Um, octoflectively returns exactly one result with Google
And it's not a definition...
However, I did learn that octoflexagon is a word...
 
I returns 2 results now. :)
 
"octoflective" returns that answer
alone
 
Somehow that person managed to invent a completely new word.
 
10:39 PM
Whoah
 
But not completely new - I get one result, which is a page of near-gibberish from the kentucky gazette
(that's not insulting their journalism - it's a page of random strings of words and non-words)
 
coin a new term
"diagnorectally"
 
I tried modifying the word, octoflexive returns a single result
 
@EricTressler Unfortunately that sounds more like a medical term
 
you mean fortunately
 
10:41 PM
A new answer suggests "panoramically."
 
lol
 
I don't like the panoramic either, makes me think it could move to any tile, not just ones in each of the 8 directions
 
I suspect that even if there is a correct word, it will confuse the readers more than simply saying "orthogonally or diagonally"
 
0
A: Sandbox for Proposed Challenges

RainboltWrite a Connect Four Bot Your task is to write a Connect Four bot. Connect Four is solved, and so to avoid optimal solutions, your submission must be no longer than 1000 bytes. Gameplay Your submission will play against each other submission one hundred times. Each player will play first for...

 
i assumed the question was just for curiosity's sake
 
10:43 PM
No, ELU has real world applications :)
@Rainbolt will this count as a KotH?
 
we're all nerds. if none of us knows a technical word, it's probably not a useful word to use
 
indeed
 
It apparently needs invented
 
maybe there's a word that describes not only the cardinal directions, but also the 4 intermediates
like "semi-cardinal"
 
ordinal?
 
10:46 PM
yeah, i had to google it
but maybe there's a word for all 8 taken together
 
I'd probably default to octagonal, as it would at least be easy to understand
 
8-directional ;)
 
On a compass rose, the eight directions are the "principal winds."
 
@trichoplax Oh, I guess so.
 
Yay!
 
10:50 PM
I can make up words too!
Actually that's just a misspelling. Octantal may be the right word.
 
@PhiNotPi the 8 principal directions sounds reasonable to me, although it has a different mathematical meaning
 
I just realized that a compass rose has 8 directions
Four ordinal, and four cardinal
Could that be a lead on a better word?
 
ordicardinal!
 
cardiordinal!
 
That's spectacular.
 
10:57 PM
Well that worked out perfectly.
 
@Geobits is that any direction of your heart's desire? :P
 
Not my heart, an ordinary one, amirite?
 
lol
"along the 8 directions of the compass" is not a single word (and not even shorter than "orthogonally or diagonally") but it's a single phrase and pretty clear I think
 
Maybe we don't need to golf the Koth spec...
 
I don't know why you're bringing in a compass to the chess tournament.
 
11:00 PM
I like to know which way the wind is blowing in a tournament. So a compass and a windsock would be better.
 
@trichoplax no, I'm just saying it's not a valid answer to the ELU question, since it's specifically a single word request
 
so we're not going to go with "diagnorectally"? :(
 
@Rainbolt I'm glad you edited that comment on ELU ;)
btw, maybe you should just add connect four as another example, so people don't get too caught up on something that fits chess specifically
 
@MartinBüttner What did it say before I edited it?
 
I don't remember exactly, but it sounded very rude ^^
 
11:09 PM
Great, it's a KotH. Now I have to enter, or face losing my spot on top of the answerer list :(
 
@Rainbolt you guys have probably discussed this earlier, but did you check that one can't golf an optimal solution into 1000 bytes? 1k bytes is a lot
 
I glanced around for an implementation, but the best I found was an 8-or-so depth negamax. It was around 8k in JS, but terribly bloated. I'm sure it could be golfed down to the limit. I don't know how fast it runs, though. The one-second limit in addition to the 1k bytes probably works pretty well.
 
@MartinBüttner the single move connect four question had answers with under 500 bytes
(not optimal though)
 
Yea, making something is short. I might look around more later for a good optimal algorithm.
 
yeah a time limit seems necessary. I'm sure you could easily brute force it otherwise
 
11:15 PM
I have an interface problem
 
@MartinBüttner I could go for 250 bytes. Admittedly I didn't check.
 
I started to write a 3d fractal tree generator. It's basically a render window, and two smaller XZ and YZ views where you can move the tips of the branches around (which will then recurse)
but I just realized that each branch also has to have a rotation with respect to the trunk, and I don't know how to represent it in a way that's obvious in the two views. an arrow pointing to the "right" will look really strange and not helpful in the side views
 
@Rainbolt the problem with the size limit is that at some point you'll actually get golfed koth entries, which I don't think you're interested in. so a 1k byte limit seems reasonable to tell people "you can't just encode a lookup table". but the time limit is probably more important to rule out optimal algorithms. even so, I think it shouldn't be too hard to solve a 4x4 board optimally... the tree is only up to 4 moves wide and up to 16 deep (but in practice you can probably prune a lot)
 
I do want golfed entries. I want people to do as much as they possibly can with their limited number of bytes
Oh wait
 
okay, fair enough.
 
11:18 PM
You said the time limit is enough to rule out optimal algorithms. In that case, I will remove the character limit
 
It's 7x6, not 4x4. Ignore his shoddy example input :P
 
@Geobits oh okay, I admit I skimmed it a bit
@Rainbolt you should really make sure that it actually is enough though
I had the same problem with Vector Racing, and at least there I still had a sort of tie breaker between optimal solutions
in a KotH you don't have that
 
@MartinBüttner Removed character limit. Edited the bullet point to say:
- Failing to output anything to STDOUT within one second
double freaking indent - This should eliminate optimal entries. Thoughts on this?
 
I do kind of like the idea of a golfed KotH. Maybe with your golf score affecting how much resources you start with
 
kk... although my thoughts are you should implement a minmax solver yourself and make sure it doesn't complete in 10 times your time limit to be sure ;)
if it turns out not to be possible, I'll probably try MCTS... it should perform pretty well on this kind of small state space
 
11:26 PM
Or just make the board bigger. 14x12 should alleviate that worry nicely.
 
Ooooh I just had an unrelated idea
 
squirrel!
 
lol
 
@Geobits "We'll need a bigger board!"
 
What if you only limit the horizontal, but not the vertical?
 
11:27 PM
If I want to cut down on test time, I can run it for X rounds and then eliminate all of the crappy entries
 
And the number of pieces you start with is inversely proportional to your code length
 
How about 1) Run all pairwise matches once 2) Eliminate those with below-median wins 3) Repeat ?
 
@Geobits Yes, exactly like that
Well, Change 1 to Run all pairwise matches a few times
 
That would certainly cut down the time.
 
One round robin probably isn't enough to accurately gauge strength
 
11:29 PM
Yea, if there are only a few entries, you'd definitely need to run them a few times each.
If there were 100 or so, it would be okay.
 
You could be generous and only drop the lowest 10% or so each time, to allow for varying performance
 
Oh I'll do the math behind it and figure out how many rounds I need to run to be X% sure that you are crappy at Connect Four
 
I can usually tell just by playing someone once if they're that crappy :P
 
@Rainbolt am I allowed to remember anything between turns?
 
00:00 - 20:0020:00 - 00:00

« first day (1466 days earlier)      last day (3370 days later) »