Questions tagged [radiation-hardening]

This tag is for challenges which require answers to still work when a random edit to the source code is made.

Filter by
Sorted by
Tagged with
24 votes
25 answers
3k views

Radiation Hardening KOTH

The goal of radiation hardening is to make a program still work after you remove a byte. However, what if a skilled competitor is purposefully trying to mess with you? In this game, each bot will take ...
mousetail's user avatar
  • 11.4k
19 votes
11 answers
2k views

Write a near crystalline program

A pristine program is a program that does not have any errors itself but will error if you modify it by removing any contiguous substring other than the entire program. A crystalline program is sort ...
Wheat Wizard's user avatar
  • 95.5k
6 votes
1 answer
658 views

Irradiated Polyglots

Design a function or program that, when run normally, outputs the triangular numbers. However, when any single character is deleted, the program/function should not function in the original ...
Romanp's user avatar
  • 1,357
25 votes
9 answers
5k views

Make a Hello World using as many bytes as possible

Write a program that outputs the exact string: jan ale o, toki! ("Hello, world" but in toki pona to prevent builtins.) with an optional trailing newline. ...
Wheat Wizard's user avatar
  • 95.5k
32 votes
22 answers
4k views

Pass on your radiation

The task here is pretty simple. You should write a program that takes a string as input and outputs it (that is a cat program). Additionally when the \$n\$th byte of your program is removed (without ...
Wheat Wizard's user avatar
  • 95.5k
16 votes
1 answer
584 views

How short can you get?

You are to write a program that, when given an integer between 1 and 5 (or 0 and 4 if you wish to use 0-indexing), outputs one of Code, ...
caird coinheringaahin g's user avatar
2 votes
1 answer
242 views

Number of characters skipped determines code printed [closed]

Write a program which, when every nth character is skipped, it prints n. For example, if every 2nd character is skipped, it prints 2. Example n=0 foobar Output:...
John L's user avatar
  • 21
20 votes
2 answers
744 views

Write a radiation-hardened irradiator

The task is to write a radiation-hardened irradiator. What do I mean by that, exactly? An irradiator is a program that, when given a string as input, will output all possible versions of the string ...
TheOnlyMrCat's user avatar
  • 1,349
10 votes
1 answer
294 views

Radioactive Bit Checking

Note: This is the radiation-hardening version of my previous challenge Pristine Bit Checking. This should be much more difficult than that one. Write a program/function that takes two integers in the ...
Jo King's user avatar
  • 47k
-4 votes
3 answers
141 views

Geiger counter prime generation [closed]

This challenge is quite simple to conceptualise, but likely a lot harder to execute. In this challenge, the program will have to detect the number N of its characters that have been randomly changed (...
Geza Kerecsenyi's user avatar
14 votes
2 answers
757 views

Error-detecting Self-repairing Program

Your task is to create a program where if any one character is deleted, it will detect which character was deleted and then re-insert the deleted character in its own source file. For instance, if ...
Beefster's user avatar
  • 9,861
10 votes
0 answers
579 views

Radiation is Painful

A radiation-hardened quine can take a hit and stay standing, but nobody ever said that the quine can't be a wuss about it. For this challenge, you should write a quine that: If no characters are ...
Nissa's user avatar
  • 3,596
7 votes
1 answer
359 views

A Radiation Hardened Palindromic Quine

There are radiation hardened quines, palindromic quines, but has anyone tried both?! I think not! Rules So the challenge here is to make a quine that if any symbol is deleted it prints its original ...
KrystosTheOverlord's user avatar
15 votes
5 answers
700 views

Self Scoring Program

We have a challenge to output your own score, but it seems like all the answers there just hardcode the output and that's boring1. So lets have a new challenge. Your program must output its own ...
Wheat Wizard's user avatar
  • 95.5k
31 votes
8 answers
5k views

What did we forget?

Your task is to write a non-empty computer program comprised of some sequence of bytes. If we choose a particular byte in the program and remove all instances of it from the program, the modified ...
Wheat Wizard's user avatar
  • 95.5k
38 votes
14 answers
3k views

Make a Geiger Counter

A Geiger counter is a device that is used to detect radiation. We will be making a Geiger counter program. As we all know, when radiation hits a computer program it removes exactly 1 byte at random. ...
Wheat Wizard's user avatar
  • 95.5k
20 votes
3 answers
869 views

Make a Radiation Hardened Quine

Your task is to make a quine, that is a non-empty computer program that prints it's own source without reading it. In addition if you remove any one byte from your original program the new program ...
Wheat Wizard's user avatar
  • 95.5k
29 votes
7 answers
1k views

Radiation Detector!

A radiation-hardened program is a program where, if any character of the code is removed, the program will still function the same. For this question, we'll be writing a program that detects when it ...
Jo King's user avatar
  • 47k
12 votes
0 answers
488 views

Simulate Alpha Decay

Alpha Decay is a kind of radiation decay where every time the atom "decays", it loses a helium nucleus (an alpha particle). This means that an atom loses 2 protons and 2 neutrons each time. ...
caird coinheringaahin g's user avatar
15 votes
1 answer
730 views

Mutation-hardened quine

Your task is to make a program that prints out its own source. "Hey, we already have this challenge, and tons of variations of it! Why are you making another one?" you may ask, but this one is going ...
clismique's user avatar
  • 6,972
10 votes
1 answer
417 views

Radiation hardened cyclic quine polyglot

Challenge Write two programs that: run in two different programming languages. These may not be two versions of one language. when one program is run, it outputs the second program, and vice versa....
anna328p's user avatar
  • 6,328
26 votes
5 answers
2k views

Same code different characters

Note: This challenge only allows answers in compiled languages Task Your task is pretty simple, make two different programs that when compiled result in the same output. Scoring Here is where the ...
Wheat Wizard's user avatar
  • 95.5k
14 votes
14 answers
1k views

Rearrangeable Code Bowling

Code-Bowling Challenge Write a program or function that produces the same output, no matter how you re-arrange the source code. (Output can't be an error) Pangram Scoring Your score is the amount ...
Albert Renshaw's user avatar
19 votes
3 answers
790 views

Meta radiation hardener

Background On this site, we occasionally have questions requiring programs to be "radiation hardened"; this means that the program has to be able to survive the deletion of one or more bytes, no ...
user avatar
19 votes
1 answer
2k views

Detect if your program has been mutated

Write a program that terminates without an error. If any single byte is substituted by any other byte the program should output CORRUPTED Do not read your ...
noɥʇʎԀʎzɐɹƆ's user avatar
76 votes
15 answers
6k views

Error 404: Character Not Found

Scenario One of your friends is struggling on a homework assignment. He needs a simple program which prints the first 404 natural numbers: ...
FlipTack's user avatar
  • 14.6k
40 votes
2 answers
2k views

Radiation softened quine

It's simple: Make a proper quine where if you remove any character, it's still a quine. The difference between this and a radiation hardened quine is that if your program is ...
CalculatorFeline's user avatar
46 votes
3 answers
7k views

Radiation Hardened Quine

As you should (hopefully) know, a radiation hardened quine is a quine that you can remove any one character from and still print its original, pre-modified source. The thing is, with most of these you ...
takra's user avatar
  • 843
77 votes
27 answers
8k views

More is less and less is more

Anybody can make the output of a program bigger by adding characters, so let's do the exact opposite. Write a full program, an inner function or a snippet for a REPL environment in a language of your ...
Dennis's user avatar
  • 209k
83 votes
17 answers
8k views

Fault-Tolerant Hello World

At the end of your interview, the Evil Interviewer tells you, "We make all of our applicants take a short coding test, to see if they really know what they are talking about. Don't worry; it's ...
user avatar
14 votes
12 answers
1k views

Transposed, primes, oh my!

The task is simple: your program reads an integer as an input, and prints whether it is a prime or not. You can print "yes/no", "true/false" or anything what unambiguously ...
vsz's user avatar
  • 8,119
125 votes
21 answers
18k views

Write a program that always outputs "2012" - even if it's modified!

This idea is not mine, though I don't know where it originated. I once met it in a programming contest very long ago (1998, if I remember correctly). The task is to write a program in your favorite ...
Vilx-'s user avatar
  • 1,601