This is a response to Christopher Walker's post Implicit vs. Explicit Failure for Educators and Game Designers. The post makes a distinction between two types of failure: explicit ("you have lost") and implicit ("you have not succeeded yet"), and argues that explicit failures are overused in games and education. I think that the post presents a very interesting point of view, and is well worth to read and think about.
However, roguelikes and similar games are based on a completely different philosophy. Losing is an integral part of the game. The unofficial motto of Dwarf Fortress is Losing is fun. This is based on the principle is that it is the journey that matters, not the destination (a similar thing was said by Gauss about mathematics) -- many players find roguelikes fun even if they have no hope of ever winning. Games such as Dwarf Fortress or Tetris do not even have a winning condition -- you will lose eventually. Other games do have winning conditions, and winning such a game after hundreds of failures is a great feeling.
HyperRogue mixes these two designs -- the winning conditions exist (or you can set ones for yourself), but on the other hand, you are allowed to continue the game after winning, but the game gets harder and harder, and you will have to lose eventually. HyperRogue has some puzzles which test your navigational skills in hyperbolic geometry (Princess Quest, Galápagos, Camelot, Yendor Quest). These do not need the component of losing the game explicitly -- however, they would not fit the rest of the game without it, so they also get harder and harder, and one can lose the game while doing them.
Recently, a peaceful mode has been added -- in this mode, the players can solve the failureless versions of these puzzles, or ignore all the challenges and just explore the world. This was intended to make the educational component in these puzzles more accessible to players who are less used to the brutal difficulty typical to roguelikes, and prefer puzzles that you can only win -- especially important in the case of live presentations. However, our experience from such live presentations shows that the standard game is generally much more exciting, especially for younger players.
I think that the dichotomy between explicit and implicit failures presented in the post is a bit exaggerated. In most games, you can try again after you lose; therefore, in a way, all failures are implicit. I think that, rather than avoiding losing conditions, we should teach that losing is not a failure, and minimize the psychological distress caused by it. According to a Go proverb, one should lose their first 50 games as quickly as possible; losing is not a failure, it is simply finding a way that does not work, and everyone needs to lose a lot before they master a subject. It is inevitable that one will "fail" in many situations during their life, that everyone fails, and I believe games to be a great opportunity to teach one not to be discouraged by this.
The post gives an example of a game about Greek mythology where you could lose, causing the chapter to restart, and the player to hear the 30 seconds of narration again and again. From this description, it appears to me that the main problem with the game was not the failure condition, but the fact that they forced the player to watch the story again when they lost. "Well, we need to have some kind of challenge. Otherwise it's not really a game, is it?" Well, maybe it is not really a game, but this does not matter -- not everything needs to be a game to be fun, and many games would benefit if the "challenge" was removed from them. Story and challenge do not mix. If the point of the game is to tell a story -- no challenge is necessary. A challenging game benefits from the story, but only as long as it does not get in the way. Well designed roguelikes usually keep their stories to minimum, or to pieces of lore that you can read if you want. They also rely on randomization, so that every new game will be different and interesting. This randomization sometimes causes the player to lose because of pure bad luck rather than bad decisions -- well designed roguelikes try to avoid this, however, from the "life lesson" perspective outlined in the previous paragraph, it is important to learn that losing is not always your fault.
The post also mentions the problems with stressful mathematical exams, where a single mistake with the execution of the solution makes the whole thing wrong (especially ones where the answer is a single number). Roguelikes also have this property, and there are also many real life situations where it happens -- real research in mathematics, working with computer security systems, etc. While mistakes are costly in all these situations, often there are actually parts of the work that remain valid (completing half of the game, proving useful facts on the way, code often becoming correct after fixing just a single character, etc.), and this should also be reflected in the way the exams are graded. As for games -- aren't they a great way to get one used to this, and reduce the stress?
Thus -- losing is not a failure. Losing is fun. It also makes winning even more fun. Have fun!