
128 Character Calculations: Wolfram Single-Line Contest Winners
- Transfer
The article mentions new features from the future 12th version of the Wolfram language. Copyable code and downloadable notepad will be published after release.
Each year, the Wolfram Technology Conference hosts a one-line contest for Wolfram language programs with a maximum length of 128 characters. Our employees are forbidden to participate in it, but every year they receive applications and requests that have to be rejected. To give them the opportunity to prove themselves and show how cool they are doing, this year we organized the first one-liner contest for the first time.

We awarded the first, second and third places, six honorable and one shameful mention. And the winners became ...
Danny's work is a completed game in 128 characters. Some judges found it so exciting that they continued to play after the end of the refereeing session.
The code selects a random word and collects a collage from images found on the Internet for this word. Then displays a dialog with a collage and input field so that the player can guess the word. When a player enters it, he correlates the semantic features of his conjecture with the semantic features of the word. The higher the correlation, the closer the meaning of the answer to the guess. A lot of functionality in one line of code!



Danny deserves a second honorable mention for the code that infects your notebook with smallpox. Probably, the author would have deserved a shameful mention if he had not yet provided a medicine (see the second part).
Danny could save seven characters by eliminating the unnecessary



Sarah's work combines image search and a neural network to transform images of the tropics into a snowy forest. The ListAnimate issue shows a set of images of a snowy rainforest.


Like Danny, Sarah also received two honorable mentions. The second is for work that combines image search and a combination of neural networks that remove stripes from tigers. ResourceObject in code is a CycleGAN neural network for converting zebras to horses . The neural network is trained on the ImageNet dataset. The name of the neural network would eat 72 out of 128 characters if it were not used a compact numerical identifier. While the original network was trained to convert zebras into horses, Sarah applied it in a new area: on white tigers, and got an interesting effect.


Brian's program makes video effects on the fly with a compact image processing code that creates color traces when moving an object. When the subject is stationary, the superimposed color tracks are added together to accurately recreate the original image.


Having racked their brains over the analysis of some of the previous problems, the judges found the meditative waves of Daniel very pleasant.


John’s Minesweeper was the first to crack the jury’s notebook, namely the character counting code. This is a good example of why the annoying “Turn on dynamics” button is needed when opening a Wolfram notepad with a dynamic code:

When you open John’s program, you see 2000 with something of a full-blown Sapper game. It starts like this:

Despite the enormous amount, the counter at the top shows that the program size is only 47 characters:

The accompanying note says: “An amazingly short Minesweeper code. It may look larger, but actually only 47 characters. Check it out for yourself! And I honestly did not change the jury template, you can copy the code into a fresh one-liner and see. ”
How did he do that? John didn’t really change the source code built into the notepad for filing an application, but he redefined some functions that this code defines. This can be seen through Cell> Show Expression on the cell with the code.
The first “0” in the code is wrapped in a DynamicWrapperBox with new definitions of functions for counting the number of characters in a notebook. Instead of counting the characters in the program, new definitions count the characters in the line “Of course, deserves a shameful mention [sic] !!!” (47 characters):

The first time John’s program appears on the screen, the DynamicWrapperBox code activates and breaks the notepad to apply. Truly worthy of a shameful mention, John!
In the works of the winners, the Wolfram Language language components are used in such a way that they give beautiful, useful and amazing results. The Jofre program meets all three criteria. He finds the intersection of the class of mammals with the class of endangered species (i.e., the class of mammals that are endangered), takes an image of each of them and collects the images into a collage - a graphic reminder of the biological wealth that we risk losing.


It was really fun to study Lou’s application, which pulls photos of employees from the company’s catalog and, with Classify, finds the celebrity that they look most like.


A surprisingly large number of people in the company are identified as "Stephen Wolfram" (including Stephen himself). Hmm ...

Our colleague, who deserved a shameful mention in this contest, also won first place. The elegant and concise 68-character John McLoon program captivated the judges with a high ratio of graphic diversity to code length. This animation and attractive graphics. It is interesting to see how the image evolves:


John used a complex repetition effect. The result is a program that does much more than one might think by looking at the number of characters. Congratulations John!
There are many more works submitted to the competition: a total of 34 pieces. All of them will be published in a notebook after the upcoming release of version 12 of the Wolfram language. Thanks to everyone who participated. Thank you for showing us once again the power of the Wolfram language.
Each year, the Wolfram Technology Conference hosts a one-line contest for Wolfram language programs with a maximum length of 128 characters. Our employees are forbidden to participate in it, but every year they receive applications and requests that have to be rejected. To give them the opportunity to prove themselves and show how cool they are doing, this year we organized the first one-liner contest for the first time.

We awarded the first, second and third places, six honorable and one shameful mention. And the winners became ...
Honorable mention
Danny Finn, Consultant
ImageGuessr (Wolfram Pictionary) (128 characters)
Danny's work is a completed game in 128 characters. Some judges found it so exciting that they continued to play after the end of the refereeing session.
The code selects a random word and collects a collage from images found on the Internet for this word. Then displays a dialog with a collage and input field so that the player can guess the word. When a player enters it, he correlates the semantic features of his conjecture with the semantic features of the word. The higher the correlation, the closer the meaning of the answer to the guess. A lot of functionality in one line of code!



Honorable mention
Danny Finn, Consultant
Notebook Pox (123 characters)
Danny deserves a second honorable mention for the code that infects your notebook with smallpox. Probably, the author would have deserved a shameful mention if he had not yet provided a medicine (see the second part).
Danny could save seven characters by eliminating the unnecessary
System`
before BackgroundAppearance
: this is probably the rest of some experiment.


Honorable mention
Sarah Stanley, Senior Consultant
Rainforest Winter (126 characters)
Sarah's work combines image search and a neural network to transform images of the tropics into a snowy forest. The ListAnimate issue shows a set of images of a snowy rainforest.


Honorable mention
Sarah Stanley, Senior Consultant
Changing Tigers' Stripes (128 characters)
Like Danny, Sarah also received two honorable mentions. The second is for work that combines image search and a combination of neural networks that remove stripes from tigers. ResourceObject in code is a CycleGAN neural network for converting zebras to horses . The neural network is trained on the ImageNet dataset. The name of the neural network would eat 72 out of 128 characters if it were not used a compact numerical identifier. While the original network was trained to convert zebras into horses, Sarah applied it in a new area: on white tigers, and got an interesting effect.


Honorable mention
Brian Wood, Lead Technical Marketing Writer
A Little Fun with Motion (117 characters)
Brian's program makes video effects on the fly with a compact image processing code that creates color traces when moving an object. When the subject is stationary, the superimposed color tracks are added together to accurately recreate the original image.


Honorable mention
Daniel Carvalho, Executive Director, International Business Development
Wave (93 characters)
Having racked their brains over the analysis of some of the previous problems, the judges found the meditative waves of Daniel very pleasant.


Shameful mention
John McLoon, Director of Technical Communications and Strategy
Amazingly short Minesweeper code (47 characters?)
John’s Minesweeper was the first to crack the jury’s notebook, namely the character counting code. This is a good example of why the annoying “Turn on dynamics” button is needed when opening a Wolfram notepad with a dynamic code:

When you open John’s program, you see 2000 with something of a full-blown Sapper game. It starts like this:

Despite the enormous amount, the counter at the top shows that the program size is only 47 characters:

The accompanying note says: “An amazingly short Minesweeper code. It may look larger, but actually only 47 characters. Check it out for yourself! And I honestly did not change the jury template, you can copy the code into a fresh one-liner and see. ”
How did he do that? John didn’t really change the source code built into the notepad for filing an application, but he redefined some functions that this code defines. This can be seen through Cell> Show Expression on the cell with the code.
The first “0” in the code is wrapped in a DynamicWrapperBox with new definitions of functions for counting the number of characters in a notebook. Instead of counting the characters in the program, new definitions count the characters in the line “Of course, deserves a shameful mention [sic] !!!” (47 characters):

The first time John’s program appears on the screen, the DynamicWrapperBox code activates and breaks the notepad to apply. Truly worthy of a shameful mention, John!
Third place
Jofre Espigule-Pons, Consultant
Endangered Species (122 characters)
In the works of the winners, the Wolfram Language language components are used in such a way that they give beautiful, useful and amazing results. The Jofre program meets all three criteria. He finds the intersection of the class of mammals with the class of endangered species (i.e., the class of mammals that are endangered), takes an image of each of them and collects the images into a collage - a graphic reminder of the biological wealth that we risk losing.


Second place
Lou D'Andria, Lead User Interface Developer
Wolfram Celebrities (123 characters)
It was really fun to study Lou’s application, which pulls photos of employees from the company’s catalog and, with Classify, finds the celebrity that they look most like.


A surprisingly large number of people in the company are identified as "Stephen Wolfram" (including Stephen himself). Hmm ...

First place
John McLoon, Director of Technical Communications and Strategy
Evolving Abstract Art (68 characters)
Our colleague, who deserved a shameful mention in this contest, also won first place. The elegant and concise 68-character John McLoon program captivated the judges with a high ratio of graphic diversity to code length. This animation and attractive graphics. It is interesting to see how the image evolves:


John used a complex repetition effect. The result is a program that does much more than one might think by looking at the number of characters. Congratulations John!
There are many more works submitted to the competition: a total of 34 pieces. All of them will be published in a notebook after the upcoming release of version 12 of the Wolfram language. Thanks to everyone who participated. Thank you for showing us once again the power of the Wolfram language.