TITLE: How do you create a nonlinear game that the player can always win?
QUESTION [13 upvotes]: I thought a lot about this question — and initially, I intended to ask this on gamedev.stackexchange.com — but due to its rather theoretical aspects, I think it might be more appropriate to address a rather mathematical spectrum of readers.
Imagine you had to design a dungeon in a game that comprises many puzzles that are mutually dependent from one another. If you lack an example, just think back to the times you've played Zelda or any other video game of this sort:

Rules:
The player may freely wander around the dungeon; some rooms are locked, some aren't. The main goal is to solve puzzles in rooms $\{R_0, ..., R_n\}$ to either achieve keys that help the player enter a locked room or in order to achieve an item that may allow the player to solve a puzzle in some room $R_k$ that, before, wasn't solvable without the ability of the item.
Every key works with every door. Once a key is used, the door is unlocked forever and the player loses the key. In the end, the player needs to reach a specific room $R_b$ where he can fight the dungeon's end boss in order to finish the dungeon. The dungeon is solvable iff the player:

can reach rooms $R_0$ to $R_n$, regardless of the order chosen 
has collected all items $I_0$ to $I_m$ that he needs to fight the dungeon's end boss once the player enters $R_b$

The goal:
Your goal is to design the dungeon in a way that guarantees maximum nonlinearity, i.e., the player should, at any point of time in the dungeon, be able to try to solve as many puzzles as possible and thus be able to explore as many regions as possible without harming the solvability of the dungeon.
The problem:
For example, imagine the player has two keys, but then utilizes both of them in order to get through two consecutive doors. The player then finds himself in a puzzle room whose solution requires some item $I_\alpha$ that he should actually have gotten using the two keys that he now does not possess anymore. Unfortunately, the player finds himself in a gridlock — the dungeon is now unsolvable.
Can you guarantee that your dungeon design is free of gridlocks?
Disclaimer
I am not asking for any implementation, code or any of the like. This is a strictly theoretical question that I want to consider from a strictly mathematical point of view. Any suggestions that exceed these limitations (by providing any material such as the previously mentioned) are — albeit highly appreciated — explicitly not asked for.

REPLY [2 votes]: The maximum non-linearity is achieved by allowing the player to tackle all of the puzzles in any order. This means that all of the puzzles can be accessed without using any keys, and that the keys must all be used in a linear corridor which separates the area containing the puzzles from $R_b$.
However, I suspect this isn't what you're looking for, so you may need to refine the question.