« first day (1578 days earlier)      last day (3276 days later) » 

9:00 PM
In parentheses are the "normalized" scores. For the random bots, as expected, they are all around 0. The ExampleBots did much better, from a statistical-significance point of view.
That is from a simulation of 1,000,000 elections.
 
okay, I am assuming that answer to my question is no..
 
6
Q: Permutations of the Fifteen Puzzle

BrainSteelThe Challenge Consider the following diagram of the Fifteen Puzzle in its solved state: _____________________ | | | | | | 1 | 2 | 3 | 4 | |____|____|____|____| | | | | | | 5 | 6 | 7 | 8 | |____|____|____|____| | | | | | | 9 | 10 | 11 | 12 | |____|___...

 
I'm also guessing flawr wasn't talking to me...
So everything I've said was rather out of context.
:/
 
@PhiNotPi yes i was talking to you=)
currently reading throu the challenge
 
I just had a thought for a challenge
there is a complete sudoku board but it is completed incorrectly
and the program should swap different numbers to solve the board
 
9:07 PM
is brute force allowed?
 
what kind of challenge is it?
 
code-golf probably
 
code golf and fastest algorithm are very very different there
 
i haven't written up a spec yet, just had an idle idea
although thinking about it, code-golf would probably just yield "random swapping" methods
 
Has there been a [restricted-source] that asks for a set of programs where each one represents and outputs a non-negative integer, but w/o using digits 0-9.
 
9:09 PM
What do you mean by "represents"?
 
But with the added req that two concatenated programs need to output the sum. e.g. +0, +1, +2, etc. would trivially work in a lot of languages but they of course require digits.
@BrainSteel Like P0 is the program representing 0 and it outputs 0 as well, Same for all Pn, n >= 0
 
so if i had a program a that outputs 4, and a program b that outputs 6, the program ab should output 10?
 
@Calvin'sHobbies so a bit like Zgarb's multiplication, just with concatenation instead of input and addition instead of multiplication?
 
@Calvin'sHobbies that's a neat idea.
 
also does it have to work for concatenating more than two programs?
 
9:12 PM
@PhiNotPi Do I understand correctly: Each time when all the players vote for one of the candidates, all players have different payoffs for the three candidates?
 
@Katya Right. Like in my trivial example +4+6 outputs 10.
 
that would trivial in CJam if the empty stack was 0.... (@aditsu hint, hint)
 
@flawr yes
 
@MartinBüttner I'm thinking yes, but I might choose otherwise if that seems too difficult
 
This fifteen puzzle challenge is basically exactly the same as the chess challenge from yesterday.
Should be really easy to adopt my solution.
 
9:14 PM
@PhiNotPi And how exactly are the payoffs determined? The cannot each be uniformly random when they do have to add up to 100?
 
@Calvin'sHobbies ]_W?~ followed by N )
what's the scoring for an infinite number of programs though?
 
@flawr I should probably add a description of how exactly I'm generating them...
public int[] createPlayerPayoffs()
{
    int cut1 = rnd.nextInt(101);
    int cut2 = rnd.nextInt(101);
    if(cut1 > cut2)
    {
        int temp = cut1;  //swapping stuff always feels rather verbose
        cut1 = cut2;
        cut2 = temp;
    }
    int[] set = new int[]{cut1, cut2-cut1, 100-cut2};
    shuffle(set);
    totalPayoffs[0] += set[0];
    totalPayoffs[1] += set[1];
    totalPayoffs[2] += set[2];
    return set;
}
^ relevant code
 
@MartinBüttner I have answered most of Peter Taylors comments on codegolf.stackexchange.com/questions/50761/… .. could you unhold it know as most things are sorted out?
 
Thanks, I suspect that it is not as random as you might think=)
 
@MartinBüttner Not sure. Though it's actually not that hard as you show. Python could be something like +len('xxxx') for 4
So maybe not that interesting
Unless the scoring was based on total length and the range restricted to 0-1024 or something
 
9:19 PM
@flawr I've already determined that the first step isn't exactly correct (the averages were like 33,34,33), so I added in the shuffle to make it even.
Here's what they look like:
 932 877 891 - Total
  48  52   0 - ExampleBot269
  14  32  54 - ExampleBot464
  68  30   2 - ExampleBot368
  58  11  31 - RandomBot56
  41  43  16 - RandomBot918
  11  25  64 - RandomBot301
  11  25  64 - RandomBot826
  15  17  68 - RandomBot960
  65   8  27 - RandomBot352
  67   0  33 - RandomBot799
  79  15   6 - RandomBot24
   3  41  56 - ExampleBot578
  21  39  40 - RandomBot813
  19   1  80 - RandomBot556
  70  26   4 - RandomBot62
   0  82  18 - RandomBot360
  20  33  47 - ExampleBot564
  14  48  38 - RandomBot974
 
@PhiNotPi I considered a shuffle, but that's not really an answer. Even if it produces the right averages, the distribution is still wrong.
 
The error in my original method comes from the fact that I'm dealing with integers and not real numbers.
If they were real numbers it would actually be the way to do it. But they aren't.
 
@Calvin'sHobbies at that point, I'll just shift the ASCII characters for the numbers away from the digits (or base encode them in all the ascii characters beyond 9)
 
Yeah, I can see that happening
 
@PhiNotPi if you were dealing with real numbers you wouldn't need the shuffle :p
 
9:24 PM
(yeah, I know)
There is a second method of randomly assigning them.
 
@Plarsen I think you could tone it down a bit. Peter was trying to be helpful in pointing out parts of the challenge that were unclear, especially since he wrote three full comments to address specific problems instead of just close voting without a comment or saying "I don't understand what you're asking." Condescending replies aren't really a nice way to respond to that.
 
While the current method isn't exactly a correct distribution, this new method creates a completely different (yet fair) distribution.
int[] set = new int[]{0,0,0};
for(int i = 0; i < 100; i++)
{
    set[rnd.nextInt(3)]++;
}
totalPayoffs[0] += set[0];
totalPayoffs[1] += set[1];
totalPayoffs[2] += set[2];
return set;
This is what it looks like:
 858 960 882 - Total
  36  35  29 - RandomBot882
  35  34  31 - ExampleBot393
  29  39  32 - ExampleBot876
  30  32  38 - ExampleBot820
  38  36  26 - ExampleBot791
  28  38  34 - RandomBot612
  27  39  34 - RandomBot999
 
isn't that what I recommended in psudocode?
 
Yeah, but I don't actually like the resulting distribution.
 
@MartinBüttner As I see it, it was not helpful at all since I could very easy meet most of his comments with references to the text in the question, and without any editing. He payed the commenting full attention, but didn't bother to try understand. Actually, I don't beleive he even read the whole question.
 
9:30 PM
The payoffs for each candidate are too similar.
 
oh, err, can you describe what you do want, then?
 
@MartinBüttner Did you read the uestion, and didn't understand it either?
Or why did you vote it on hold? Please comment on the uestion your reason, and I will answer
 
if you just do set[0]=rand(100), set[1]=rand(100-a), set[2]=(100-a-b), then shuffle set, you might get a distribution you're happier with. one number will tend to be about twice as high as the other two, I think.
 
@MartinBüttner I am looking to improve it, but can't if you don't comment why you vote it on hold.
 
@Sparr Actually, one nubber doesn't end up being twice the other.
 
9:33 PM
well with the original method you'll get this distribution
 
It's more like 33, 34, 33
 
(i am not sure about the first bucket, perhaps i did something wrong, but it should be about that generally)
 
@PhiNotPi That can't be right. if set[0]=rand(100) then the average of one of the values will be 50.
 
@Plarsen PeterTaylor is a trusted member of our community. I, too, read the question and did not understand how many of the parts worked. I felt Peter's questions were perfectly justified. Either way, it is clear a trip through the sandbox would have helped the question.
 
@Plarsen your question is interesting, but very very complicated. You could probably remove half of the game mechanics and it would still be an above average complexity question.
 
9:37 PM
@BrainSteel That may be true. But now I have given answers in the comments, and @MartinBüttner if he still thinks it should be on hold, or if more things is unclear ... that's what to do, right? Ask what is wrong and fix it?
 
 
@PhiNotPi however, the three totals will still tend to be the same. do you want that to be more widely distributed, too?
 
@Sparr Yes, it is complex.
 
This is what your distribution looks like with the second method
 
@Plarsen I'm reading your post from the point of view of someone who plays a lot of board games with complex rules, and a lot of it is unclear or doesn't make sense.
 
9:39 PM
@Sparr Okay? Even after reading the comments? Can you point out any unclear detail that doesn't make sence?
 
0
A: Sandbox for Proposed Challenges

KatyaSudoku Swapping Shenanigans code-golf? fastest-code? Honestly, there's not many shenanigans in this challenge but I wanted that sweet tautogram title. Introduction Imagine you're on a train, and there is a Sudoku grid that's already been entirely filled in left on the seat. We'll represent ...

 
@flawr I'm not using set(0) = rand(100)
(also, I had to leave for like five minutes)
I'm placing two random numbers 1..100, and set(0) is the minimum of the two.
 
@Plarsen I shouldn't have to read the whole problem AND the comments to make sense of sentences at the beginning of the problem. That's bad writing.
"If you move your Hero(H) into the reach of any enemy piece" <-- does this mean adjacent, or to the squares the enemy piece can capture with a chess move? which way are enemy pieces facing? can pawns in the fourth rank capture en passant?
Later in that paragraph it mentions moving adjacent to other pieces, which is confusing if pieces capture at range.
 
@Sparr Well, reading the comments is not neccessary. All questions Peter Taylor asked is really answered in the text. "If you move your Hero(H) into the reach of any enemy piece" means the squares the enemy piece can capture with a chess move. You are correct, that description can be improved, thanks!
 
The wording confused me about piece pushing vs piece movement.
 
9:48 PM
@Plarsen About Peter's comments:
in 1. and 2. he wasn't implying that he didn't understand these things. He was making suggestions for how to make the post clearer by reordering the information. If you read the entire thing it *is* clear how traps and stonewalls work, but you reference them long before you introduce them, which makes those earlier sections harder to understand.
His 3. was probably based on the misunderstanding that the initial input might contain stonewalls. (Which it doesn't, okay.)
 
@Sparr Not seing the confusion there, if the Hero is moving adjacent to a chess piece, there is nothing strange about that?
 
The triangular distribution was what I'm aiming for, I think.
 
One point I'd like to add is that the section "Piece movement" implies that pieces can only be moved if there is no wall between the hero and the piece, but when you move the first pawn in the example, there is a wall between the hero and the pawn.
 
@Plarsen When you say "you cannot move the hero adjacent to an enemy Queen() or Rook(R) unless there is a wall between the Hero(H) and the piece," by "adjacent" do you mean "in the same rank or column as", rather than "next to"?
 
@MartinBüttner No, there is no wall there
 
9:50 PM
@Plarsen I am confused about where stone walls exist and how they get left behind. You repeatedly describe them as existing on edges, not on squares, but you say they get left behind when a piece moves, and your examples show non-parallel walls.
 
@Plarsen hold on, never mind, i understand
I thought a wall occupied a tile instead of being between the tiles
 
you just pushed the pawn. you even display the wall in the last two visualisations.
@Sparr they're between the original and final position of the pushed/pulled piece
it's buried somewhere in there
 
oh, so a piece moving vertically leaves horizontal walls along the edges it crosses?
that's not clear at all
 
"so when pushed or pulled they will leave a line of stones between the square they come from and the square they are pushed or pulled onto"
 
@Katya Adjacent mean next to the piece, orthogonally.
 
9:52 PM
@MartinBüttner sure, I read that, but I naively assumed that vertical movement would leave vertical walls
 
@Sparr No stonewalls are created by a standard chess move, only by a push or a pull of one square
 
so I was expecting either whole-tile walls in the squares the piece moved through, or parallel edge walls
 
@Sparr Imagine a chess-table, walls is the edges betwee the squares.
 
@trichoplax ooooooooooh
 
9:53 PM
 
I went through a number of comments myself earlier, which I've now deleted, before understanding that...
 
That is the distribution produced with my current method (the two random numbers and shuffling)
 
Ok nice, then that peak was due to my faulty implementation=)
@PhiNotPi I'll have to think about it tomorrow, I'm too tired now=)
 
@Plarsen ok, I think I understand the challenge now. I think I stand by what I said before. You could eliminate half the mechanics of this puzzle and it would still be something worth golfing.
 
The distribution without shuffling is almost identical.
 
9:56 PM
@MartinBüttner I only visually the state at 4 different timeframes, not for all 43 moves. I have visualised a vertical stonewall after pushing a pawn to the east, and yet another vertical stonewall after pulling another Pawn west. If I should visualise all 43 oves as Peter Taylor suggests, the question description would be huge
 
@Plarsen no you shouldn't
 
@Plarsen you could remove the stone and piece movement and walls, leaving only hero movement and piece pushing, with the goal just being to get to the target square, and this would still be a puzzle worth golfing a solution to.
 
So, like I was saying, my current method really isn't that faulty, just not perfect.
 
nevertheless there is a stone wall between the hero and the pawn after you've pushed him, and hence, when you try to move him
(unless you step around the wall)
(which would be great to mention in the explanation then)
 
9:59 PM
@MartinBüttner If Hero pushes a piece East, the Stonewall appears between the Hero and the Pawn, yes. I think I have explained that in the question.
 
let me try to rephrase what I said
here is your step 5: "Push the pawn at F5 one step east, and then move it one step north" ... when you push it, that creates a wall between the hero and the pawn (as you just said). then why are you allowed to move the pawn north afterwards if there's a stonewall now?
 
Although a step by step series of diagrams would be excessive for the long example, it might help to have a much shorter example that shows the relevant types of move
 
you could also link to a pastebin with the step by step visualisation
 
@MartinBüttner Oh well, same for that.. that is the "description", I donät fully describe all 43 exact moves there.
 
same for what?
 
10:02 PM
@MartinBüttner If I've understood the rules correctly that would require the Hero to move around the wall and become adjacent to the pawn from a different direction before moving it
 
yeah exactly
it would help the explanation a lot if it mentioned that
 
@Plarsen I think the missed moves in the description may be the source of most of the problems
There's nothing incorrect, but it is presented in a way that will allow people to misinterpret it, which will make for a lot of questions for you
 
Maybe put in a snippet that shows the example in an animation?
step through 43 "frames"
with caption explanation of the move
 
@MartinBüttner That is a 8 point description on how to solve the puzzle, not exactly every move the Hero takes. You miss the part where the Hero rounds the stonewall? Fine, that 8 point description can be more verbose into a 43 point description... but that was not the point there, I was introducing the concept there.
 
having to move around the stonewall is a very important concept here, I think
 
10:05 PM
@Sparr Yeah, an animation should clear ost things up I guess
 
@Plarsen if you aren't going to illustrate it with an example, you need to mention somewhere that walls block the hero from moving a piece. More generally, you should mention early that walls block adjacency
PS: I totally want to play this game during a chess match :)
 
What SE site would be the appropriate place to ask my algorithm question?
 
I think we're at the point where everything makes sense, but the next person who reads the question is going to ask all these questions again, so we just need a way of making it easier to grasp. I think a series of bullet points might help
 
@Plarsen Ultimately, we're just trying to help you. There's no need to get defensive and throw "but it's all there in the spec" at everyone. We're trying to make suggestions how you can make the challenge clearer such that others can understand the challenge in the first pass.
 
@MartinBüttner Well, another person thinks avoiding the pieces capture squares is a very iportant concept. And some other thinks something else is very important.. after all, the logic is complex, and everything can't be explained into extreme detail
 
10:08 PM
yeah, what trichoplax said
 
Okay, after reading through it a few more times i think i get it
 
@Plarsen I think you should write the challenge from scratch, incorporating the questions and feedback you've gotten here.
@Plarsen You could actually convey the mechanics of your challenge in fewer words if they were organized more intentionally.
if I were re-writing it, I'd probably intermingle the parts about output and the problem description. You don't need to explain the (E)ast (W)est (S)outh (N)orth thing twice.
tell us how to move the hero when you tell us we can move the hero. tell us how to move pieces when you tellus we can move pieces.
 
I guess the answer to my question is "no."
I guess I'm going to have to cave and go over to SO.
 
10:30 PM
@PhiNotPi I think you need to better describe what you're looking for. It won't be a hard question to answer if you can actually ask it. Personally, I like #math on freenode for questions about producing distributions.
 
I'm thinking of calling it "Selecting a random grid point on a ternary plot"
Because I had a moment of realization that that was is the same distribution as I was thinking of aiming for.
 
key observation of that article: a triangle is half of a quadrilateral, and distributing points uniformly in a quadrilateral is easy :)
although, this will only get you the target distribution for each player's payouts. the totals are still going to average to 33/33/33
if you want the totals to follow the distribution you're looking for, then things get trickier if you really care about accomodating your discrete integers instead of reals.
 
It might just be easier to... just drop the integer requirement.
 
10:54 PM
public int[] createPlayerPayoffs()
{
    int cut1 = rnd.nextInt(101);
    int cut2 = rnd.nextInt(101);
    while(cut1 + cut2 > 100)
    {
      cut1 = rnd.nextInt(101);
      cut2 = rnd.nextInt(101);
    }
    int rem = 100 - cut1 - cut2;
    int[] set = new int[]{cut1,cut2,rem};
    totalPayoffs[0] += set[0];
    totalPayoffs[1] += set[1];
    totalPayoffs[2] += set[2];
    return set;
}
 
yay, I've made some progress on my Fission monstrosity
          /             \
   ;                /   \       @    [~   &\
R'x{+L  /$     \/\/          \
  /A@[  % \                  /;  &        K}`;
     \  A$@S  S\/            />\    /Z]  @A/
           X  X    /> \      +\  A\ \ /
      /   ~A\;     +;        @
  ZX [K    / {/    @  @ }  \ X @
     \AS   </      \V /    }SZS S /
       X   ;;@   \/;X  /> \ ; X X
       \@+  >/ }$S SZS\+;    //\V;
           0\  / ; X X @  @  \~K{
           X /     /~/V\V /    W/
  \        Z      [K \  /      0
 
Based off the "half a rectangle" approach.
What were you trying to do, anyways?
 
that's a port of this Mathematica snippet: SelectFirst[ Reverse@Divisors[ 2 n],(OddQ@# == IntegerQ[n/#] && n/# > (# - 1)/2) &] where n is hardcoded to 120.
 
Are folks up for another team based stack snippet koth? I thought BBBF would get a better response but I'm not sure if it was just too complex or if the genre got tired after RvB.
 
from my point: too complex + JS
 
11:02 PM
1
Q: Packing Wood Pieces

randomraThere are two pieces of wood. Both consist of a straight body and some extra blocks below the body. An example piece with extra blocks at (0-indexed) positions 1,4,7,9,10: XXXXXXXXXXX X X X XX The piece can be represented as a 01 binary sequence with the ith character showing if there is a ...

 
I love them FWIW. (Then again, I'm biased toward JS)
 
@Calvin'sHobbies I think people are getting tired of the "pixel"-like challenges.
 
but I see how it could be a great game, so I'm hoping some people are more enthusiastic than I am, so I can watch it..
 
now the hard part: building a recursive algorithm on top of that snippet up there
 
It also can be that RvB was team-based between people and BBBF is team-base in the sense that each bot has a team
But I'd love to participate if I had more time
 
11:03 PM
Team based with people definitely generates a better "community" response.
 
However I have lots of works these days
 
@randomra I wish the js could be avoided. The animation/easy autorunning seems like a reasonable trade though
 
@Calvin'sHobbies agree
 
Right now I'm thinking team based again: 4 teams/colors (based on id) on toroidal grid. The move around and try to paint the grid their color. Hopefully simpler than RvB or BBBF.
 
One thing to be wary of is that the more teams there are, the more variation there will be between teams.
Although 4 teams is probably reasonable.
 
11:08 PM
@Calvin'sHobbies if you use a small own language like CodeBots did you can use JS without people having to write their code in it
 
I don't know if this really warrants its own language.
 
not sure what the challenge would be, just an idea...
@PhiNotPi not for this, but a different challenge, e.g. CodeBots could have been fully JS-based I think
 
@PhiNotPi That's possible. Theyre just the most "animatable" I think. I'm open to more fluid games though
 
I have quite a wide variety of KOTH ideas in the sandbox, many of which are similar in that:
1) Each entrant is a single, movable, "player" in the game
2) Bots have a wide variety of moves, like short-ranged and long-ranged moves
3) Often, different bots have "customizable" strengths and weaknesses
Movement is often "smooth"-er than a pixel grid.
 
@randomra I wouldn't want to make a new language just to translate it into js. Lots of people already know js so why bother.
 
11:15 PM
Hmm... maybe I can pull up some stuff for your inspiration.
2
A: Sandbox for Proposed Challenges

PhiNotPiASCII Robot Wars This idea is based off of the game "Besiege" (which I've never played) and a previous sandboxed idea of mine called "Epic Customizable Tank Battle." The main idea is that your program is the AI that controls a robot equipped with various weapons. In this challenge, however, yo...

5
A: Sandbox for Proposed Challenges

PhiNotPiEpic Customizable Tank Battle (Work-In-Progress) This is an idea I have been working on in conjuction with users @Trimsty and @githubphagocyte in the chat room. It is inspired by the flash game "Bubble Tanks" by Armor Games. This will be a king-of-the-hill challenge. Main Idea The main idea...

4
A: Sandbox for Proposed Challenges

PhiNotPiReal-Time Hovercraft Battle king-of-the-hill Hovercrafts are cool. Hovercrafts with rail guns are even cooler. In this challenge, you will write a program to controller a battling hovercraft. The hovercrafts in this game obey the laws of physics. A hovercraft with no acceleration will conti...

0
A: Sandbox for Proposed Challenges

PhiNotPiSuper Smash Bots king-of-the-hill This is an idea for a KOTH based off of the Super Smash Bros video game series by Nintendo. The basic mechanics of this KOTH would be an every-man-for-himself battle between a large number of players simultaneously. Players can execute a variety of moves, lik...

Get the point?
 
@Calvin'sHobbies I meant it in cases where the game requires its own language anyway (like codebots)
 
@PhiNotPi Yeah. I like the smash bros idea.
But having lots of complex moves/rules isn't alwasy best. Especially for team based things where answers should be easy.
Though I'm for a continuous 2d grid
 
I think the priority-queue-based time-steps may be something else to look at.
 

« first day (1578 days earlier)      last day (3276 days later) »