How Kwyst works
Kwyst lets you type anything and still tells a story that was written in advance, with dice that are fair. This page explains how the game does that: what a story is made of, what happens between your typing a move and reading the result, and what the AI narrator is and is not allowed to do.
- The problem
- The rule the engine is built on
- A story as data
- One turn, step by step
- Difficulty and dice
- What the narrator cannot do
- Giving, getting round, or just asking
- How a story is tested
The problem
A text adventure with a menu of choices is easy to keep fair. The writer knows every option and can decide what each one does. But the moment worth playing for is the one where you think of something the writer didn’t, and a menu has no room for it.
A language model can answer anything you type. Left to itself, though, it makes a poor referee. It forgets what you are carrying. It lets a confident sentence stand in for a successful action. It will open a locked door because you wrote that the door was open. And it tends to agree with whoever spoke last, which in a game is always the player.
Kwyst needs three things at once: any move you can type gets a real answer, the story that was written is the story that gets told, and success is decided by a die, not by how well you argue. The engine is the part of the game that makes those three hold together.
The rule the engine is built on
The code holds the world. The model proposes and describes. The code decides and remembers.
Everything that is true in a Daily is kept as plain data by ordinary code: where you are, how many hearts you have, what is in your pack, who is in the room and what mood they are in, whether the gate is open. The model never holds any of it. Each turn it is shown the current state, asked a narrow question, and its answer is checked against that state before anything changes.
So the model can suggest that your move would calm the dog. It cannot make the dog calm. Only the code can do that, after the roll, and only if the change is one the story allows.
A story as data
A Daily is written as a small world, not as a script. It has:
- A setup: the opening, your hearts and turns, and the kit you start with.
- Three scenes, each with its own description, the things in it, and who or what bars the way on.
- A cast. Each person has what they want, what they hold, and the conditions they start with.
- Items, each in exactly one place at a time: a pack, someone’s hands, a scene, or nowhere.
- Conditions that people can have, such as asleep, angry, tied up or charmed, and what each one rules out.
- A goal written as a condition the code can test, such as “the Count is cured” or “the cake is in the keep”.
- Endings for a win, a fall and a loss.
Because the goal is a condition and not “get past scene three”, the game can tell the difference between reaching the last room and doing what you were sent to do. A scene can likewise say exactly what opens it. If a guard only steps aside for a hundred dollars, then the way is open when he holds a hundred dollars, and not before, however the conversation went.
One turn, step by step
Between your typing a move and reading what happened, six things take place. Three are questions to a language model, numbered in gold below. Three are code, numbered in dark green.
- The judge reads your move. A model is asked what the action is, which items it uses, who it is done to, how likely it is to work, and what would change if it did.
- A second reading says what kind of act it is. A separate question, asked on its own: toward whoever bars the way, does this give them what they want, get round them, or only talk to them?
- The code checks both against the world. Do you hold that item? Is that person here? Does one of your conditions rule the move out? If not, the move is stopped here, with the reason.
- The die is rolled. You see the number you need, and you tap. The roll was fixed when your attempt began.
- The code applies what the roll allows. Hearts, items, moods, doors. It then tests whether the scene is open and whether the goal is met.
- The narrator tells it. A model is given what changed and what did not, and writes the few lines you read.
The narrator comes last on purpose. By the time it writes a word, the outcome is settled. Its job is to tell what happened well, not to decide what happened.
Splitting the judging into two questions was a lesson learned. Asked “would this get the player past?”, a model answers by guessing whether the action will succeed, which is the die’s job. Asked only “what kind of act is this?”, it answers the question it was asked.
Difficulty and dice
The judge does not pick a number. It picks one of six ratings, and each rating has a fixed number on the d20: 2, 8, 12, 15, 18 or 20. The full table, with your chances at each, is on Dice and odds.
Three things keep that honest.
- A band that works at a cost. Fall a little short of the number and you still get through, for a heart. Without it, seven turns were too few: in early versions most rolls failed outright and stories that should have been finishable weren’t.
- The story can set the odds itself. A scene can say how hard one particular kind of try is, depending on what is true when you make it. Bribing a guard may be certain with the full sum in hand, hard with half of it and nearly impossible with none. Where a scene says so, the judge’s own rating is set aside.
- No roll only where nothing rides on it. The judge may call a move certain, and then there is no roll. But if a move it called certain would open the scene, meet the goal or take something from someone, the code rolls for it anyway.
The dice themselves are not random at the moment you tap. Each attempt is given a seed when it begins, and the roll on each turn is worked out from that seed. That is why reloading cannot change a roll, and why any run can be replayed exactly to see what went wrong.
What the narrator cannot do
- Decide a success. The die and the code do that.
- Invent an item. Every item is listed in the story. A move that uses one you don’t hold is stopped.
- Move a person or a thing. Changes come from a short, closed list of effects, and the code applies only the ones the state allows.
- Take your word for what others do. You say what your adventurer tries. If you write that the doctor happily hands over his blood, that is treated as a hope. The doctor decides.
- Hand over what must be given. A story can mark a thing as one that has to be given willingly. Taken by force, it stays where it was.
One ruling is powerful enough to need a second opinion. When the judge says a move is impossible, the turn is stopped before the roll, so a wrong “impossible” is costly. The engine therefore asks twice, and the ruling only stands if both answers agree. In testing, a move that truly could not be done was called impossible every time, and an ordinary move wrongly called impossible was never called so twice running.
Giving, getting round, or just asking
The second reading sorts a move at whoever bars the way into one of three kinds, and each leads somewhere different.
| The move | For example | What a success does |
|---|---|---|
| Satisfies them | Paying the toll | The way opens, and they have what they wanted |
| Gets round them | Sneaking past, a trick, a threat | The way opens, and they are left as they were |
| Only asks | “Please let me through” | No roll. They answer, stay put, and let slip one thing that would move them |
The third row is there because a request is a natural thing to type. If a request could open a door on a lucky roll, the best strategy would be to ask politely at every obstacle, and the stories would stop mattering. If a request did nothing at all, a player with no idea would be stuck. So asking is never rolled for and never wasted: it costs a turn and it buys a hint.
How a story is tested
Before a Daily goes out, it is played. Sixteen automated testers, two each of eight kinds of player, play the story through the real engine. They see only what a player sees, and after every turn they answer the same questions about it.
Three scores come out of that:
- Continuity: did the telling agree with what had already happened?
- Fairness: before each roll, the tester says how likely the move seemed. The score is the share of rolls the game rated about as the tester expected. A move rated far easier than it looked counts against the story just as one rated far harder does.
- Solvability: how many testers reached the goal.
Each score is a floor, not a ranking. Sixteen testers can tell a story nobody finishes from one most people do. They cannot tell which of two good stories is better, and they are not asked to.
Changes to the engine get the same treatment. Before a change to one of the model’s questions is kept, the old wording and the new are both asked the same fixed set of moves on every scene of every story, several times each, and compared. A paragraph added to explain one edge case once nearly doubled how often plain requests were refused, and it was this comparison that caught it.
Read on
How to play has the rules from the player’s side, About explains how each Daily is written, and The Stories shows how each one begins.
Today’s Kwyst is waiting. It takes about five minutes.
Play now