# AKA: The Regifting of the White Elephants

Note - I'm not sure this is on-topic or not on meta, but it seems to be as good a place as any. Comment if you disagree.

I have a few challenges that I have posted to the sandbox and then more-or-less forgotten. Some of these challenges are OK; some not so much. I think all of them could do with at least some level of polishing before they are posted to main.

So this is my christmas gift to the community this year. I don't think I have the inclination to pick up any of these challenges right now, if ever, so if you are interested, you may claim ownership and run with it.

I will post the challenges I am donating as answers to this question. If you have similar challenges you wish to donate, then please feel free to post as answers too.

If you are interested in picking up any of these, go ahead and indicate this in the comments.

Up/down-vote answers to indicate your interest solving a challenge. This will give potential new owners a feel for whether its worth picking up that challenge.

### Seasons Greetings!

If you are taking one of these challenge ideas, you should either edit the existing sandbox entry with your ideas, or perhaps create a new sandbox entry.

• Why this is off-topic? – Akangka Jan 1 '16 at 0:16
• @ChristianIrwan IMO its on-topic, and I think now its safe to say the community agrees - I just wasn't sure when I posted the question. – Digital Trauma Jan 2 '16 at 4:52
• If you take a challenge, you should edit the original sandbox post when you do, and make sure to do so when it's posted as well, so we don't end up with duplicates. – mbomb007 Sep 13 '16 at 13:56
• – Peter Taylor Jun 26 '17 at 16:37

You're welcome to take this over. I don't have time, sorry :-(

# Count the pips in a pair of dice

Here are two photographs of a pair of randomly thrown dice. (OK, they're 3D renderings, but never mind). In the photo on the left, the dice are showing one and five pips. In the photo on the right, they are showing three and four pips. Can you program your computer to count the pips automatically?

## The challenge:

Write a program that takes as its input the filename of a 240×180 JPEG image similar to the above examples, and outputs two numbers corresponding to the pips visible on the top faces of the dice (in ascending order). Your program must accomplish this in less than five seconds on an averagely specced desktop computer.

## Images:

For training and testing purposes, I have created a set of 1,000 JPEG images together with information about the number of pips visible in each image.

## Scoring:

For scoring purposes, it might be worth converting these to arrays of RGB values (or at least excluding the JPEG conversion code from the length of the submitted code). You might want to provide a randomly selected subset of these images for training, and reserve the other images for testing.

## Notes:

• There are no images with any die intersecting the edge of the image frame. However, there are many images where one die is partially obscuring the other.

• Both dice are standard right-handed dice, where each pair of opposite sides adds up to 7, and the numbers 1, 2 and 3 are arranged in anti-clockwise order around their shared vertex.

• I don't know who downvoted this, it's pretty solid – Conor O'Brien Jul 3 '18 at 4:12

# Posted

Let's Play Mafia! pending removal of this post

• I will try this. – Christopher Dec 20 '17 at 16:51
• and after a few edits i am posting O_O – Christopher Dec 20 '17 at 16:56

### Frame ASCII art

I don't know what to do about the similarity to challenges about removing leading spaces, printing a border a border, and others I know exist but am not finding in a search.

### Stitch a Picture

I think this is an interesting idea, but the comments seemed to indicate that this is a lot harder to solve than I had anticipated. Perhaps it can be modified somewhat to make it reasonably solvable.

• I want to take this one. – Akangka Dec 31 '15 at 23:59
• I actually am taking this one and posting again in sandbox – Christopher May 16 '17 at 15:11
• @Christopher Please post a link if you did. And if you did, you should comment on the original one so it gets deleted. We don't need duplicates. – mbomb007 Jun 5 '17 at 21:26
• codegolf.meta.stackexchange.com/questions/2140/… – Christopher Jun 5 '17 at 23:20

### Golf the numbers round a dartboard

In its current state, this one is fairly trivial, without a ton of creativity required for solutions. But the sequence is interesting. Perhaps there is some inspiration to had here.

• The plain 'print 20 1 18 4 13 6 10 15 2 17 3 19 7 16 8 11 14 9 12 5' will be hardcoded in non-golfing languages, and in golfing languages with permutations; indexed into permutations. For example, Pyth will just be @.pS20C"[an 8 char string]. To be interesting, we'll need to prevent both of the uninteresting solutions. – lirtosiast Dec 30 '15 at 22:00
• @ThomasKwa That pyth solution is pretty clever IMO. Once you've found the right 8-char string, I wonder how long pyth would actually take to output the right answer. – Digital Trauma Dec 30 '15 at 22:13
• It's just (19*19!+0*18!+16*17!+2*16!+...) converted to base 256, and more than a year if it doesn't run out of memory. – lirtosiast Dec 30 '15 at 22:18
• Just an idea, but maybe instead of only outputting the first 20 numbers, we output all possible dart-scores in that same clockwise rotation, going inward in terms of doubles, singles, triples, singles, and bull. So the output would be this instead. Still not too hard, but somewhat more interesting to golf. – Kevin Cruijssen Jun 27 at 9:33
• PS: Your current challenge is 16 bytes in 05AB1E with two alternative approaches: compressed list or n'th permutation (second could be 1 byte shorter by changing A to 9 and removing < if digits were allowed). – Kevin Cruijssen Jun 27 at 9:34

## Draughts KOTH

Definitely will be a fun KOTH, but I don't have the time or energy to write up the controller, so I'm giving it up to whoever wants to take it over.

### Do-nothing Polyglot

I think this one is pretty awful. But perhaps there is something to be salvaged.

• Why do you think it is awful? – TanMath Dec 25 '15 at 21:41
• @TanMath Perhaps "awful" is too strong of a word. My concern is that in its current state, it would probably be closed as unclear AND too broad. But perhaps with the right editing/sandboxing it can be fixed... – Digital Trauma Dec 26 '15 at 18:10
• I plan to take this one... would a scoring based on the versatile integer printer challenge be good? – TanMath Dec 28 '15 at 15:58
• @TanMath I assume this is the challenge you're referring to – Digital Trauma Dec 28 '15 at 18:57
• yes! that is the challenge I mean. – TanMath Dec 28 '15 at 20:33

This is a quick-and-dirty handmade ASCII art of our new logo.

Feel free to use it, either as-is or as a basis for something better. Maybe there's something interesting to do with it... or maybe we just have enough / challenges.

   .##   ###########   ##.
'#'   ## ####### ##   '#.
##   ###         ###   ##
##  #####       #####  ##
##   #####     #####   ##
##    #####   #####    ##
##     ##### #####     ##
.#'      ### #####      '#.
<#+        # #####        +#>
'#.        .===.        .#'
##      +" +++ "+      ##
##     # .#####. #     ##
##    # +#######+ #    ##
##    # +#######+ #    ##
##     # '#####' #     ##
.#.     +, +++ ,+     .#'
'##      '==='      ##'


Crazy Librarian's Interesting Numbers Game

A card game between two bots. Interesting premise, got a couple of quick upvotes, and KOTHs are generally pretty well-received. I've just realized that I don't have the time to actually put a controller together and run a tourney, and that lack-of-time doesn't look to have changed in the past year. So ... donation time!

# Is the string ASCIIbetically ordered?

Seems interesting, but I am not sure if it's a dupe or not.

# Who is the winner?

I like the idea of this but I am finding it difficult to write a spec. So if anyone can come up with a better way to run this, please, go ahead!

# Tell me my vocabulary words!

I personally really like this challenge idea but no one has really understood what I want from it yet, so if you can write a better spec for it than I, go right ahead!

Hope you don't mind me posting this here instead of linking to the sandbox post - it's more of a rough idea than something I could even begin to make a formal writeup for.

I just came up with this idea recently, but don't have the patience to work out objective rules, or even the input format.

Essentially, I recently saw Tom Scott's video on the way the internet has taken over grammatical structures, such as punctuation and capitalisation, to give them a much more complex meaning that can almost convey all of the intonation and registers we use in normal, verbal conversation. So, I thought that some sort of challenge, that takes an input somehow describing the intentions of a post (e.g "this sentence is a rhetorical question", "I'm talking formally now", "put emphasis on this phrase"), can convert it into 'internet format', using just the few examples of rules that are used in the video.

Alternatively, you may want to reverse the challenge, and make an internet-speak decoder.

Some potential ideas for input format:

• A nested object, consisting of different parts, arranged in literal order (the order they appear in the sentence). This would be a good challenge. The parts are separated according to where new info needs to be introduced, so you may have something like:
...
{
type: "sentence",
contains: [
{
type: "phrase",
text: "And how are"
},
{
type: "phrase",
text: "you",
emphasis: true
},
{
type: "phrase",
text: "today?"
}
],
...
}
...

• Potentially, it could take audio input along with a transcript, so it needs to detect intonation too. This could potentially be used in a challenge, where the number of layers/weights, as well as the accuracy, all contribute to a final score.

In the case you decide to use the reverse (decoding) challenge idea instead, simply inputting Internet-speak and outputting normal English will do too.

# C Compiler

Implement a basic C Compiler.

You do not need to implement the libraries. Compiler would output an object file containing a function, that would be linked with some libraries using GNU binutils ld and run.

No function calls, unions, structs, casts will be used in the test cases.

Test case:

int test(int i, int j) {
int x[10][20];
int i, j = 0, s = 0;
for(i = 0; i < 10; i++)
while (j < 20)
{
j += 1;
x[i][j] = i * j;
}
for(i = 0; i < 10; i++)
while (j < 20) {
s += x[1][j];
}
return s;
}