Mastery by Use
In mastery by use, a skill grows from being used, not from spent points. Every use adds experience to that skill only. Tasks far below the skill teach nothing, tasks harder than it teach no extra, and a tired skill learns little. Rest brings the gain back, so spamming one move earns less than varied practice.

Paste this to your AI
Copy it into Claude, Cursor or ChatGPT. It already has good values and the usual mistakes in it.
Add "Mastery by Use" to my game.
What it should do: Mastery by use makes a character grow in the way the player plays. Swing a sword often and you get better with the sword, and the game never asks the player to choose from a menu what they have already shown.
Build it exactly as this state machine. First check that it fits my game, then build it like this:
```mermaid
stateDiagram-v2
[*] --> fresh
fresh: Learning well
worn: Worn down
mastered: Mastered
fresh --> worn: repeats wear it down
worn --> fresh: rest brings it back
fresh --> mastered: reaches the top level
worn --> mastered: tired, reaches the top
mastered --> [*]
```
Use these starting values:
- baseXp: 10 xp
- xpGrowth: 1.3 x
- maxLevel: 10 levels
- baseGain: 1 xp
- easyGap: 3 levels
- tirePerUse: 0.15
- recovery: 0.5 per s
- minFreshness: 0.1
Watch out for these common mistakes:
- Grinding something trivial: Tell your AI: let a use teach less the further the task is below the skill's level, and nothing at all past a set gap.
- Spamming the same move: Tell your AI: let each use tire the skill a little and rest wear it off, so quick repeats teach less than spaced ones.
- Leftover experience thrown away: Tell your AI: subtract what the level needed and keep the rest for the next one.
- One gain, several levels: Tell your AI: keep levelling up in a loop until the experience is below what the next level needs.
- Hard tasks that teach more: Tell your AI: cap the lesson at a task of the skill's own level, and let danger be its own reward.
- Tiredness from a use that taught nothing: Tell your AI: a use that teaches nothing changes nothing, no tiredness, no experience.
Do not change anything else in the game. Do not claim anything without proof: model what it takes, and show me what your solution rests on and how I can see that it works. If you cannot show something, say you do not know. When you are done, tell me in plain words how to try it.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP
What it does
Mastery by use makes a character grow in the way the player plays. Swing a sword often and you get better with the sword, and the game never asks the player to choose from a menu what they have already shown.
How it runs, as a diagram
Everything it can be in, and what moves it on. Your AI builds from exactly this.
How it runs, as a diagram
- Learning well → Worn down: repeats wear it down
- Worn down → Learning well: rest brings it back
- Learning well → Mastered: reaches the top level
- Worn down → Mastered: tired, reaches the top
Good starting values
| Value | Start with | What it changes |
|---|---|---|
| baseXp | 10 xp | What the first level needs. At one experience per fresh use, ten well-spaced uses bring the first level. |
| xpGrowth | 1.3 x | Each level needs this many times the one before. The early levels come quickly, so the player sees the skill grow, and the late ones take more practice. |
| maxLevel | 10 levels | The top level. A skill with no top level can be ground for ever, and a top level gives the player something to finish. |
| baseGain | 1 xp | What one fresh use of a task at the skill's level teaches. Everything else in the mechanic scales down from this. |
| easyGap | 3 levels | How many levels below the skill a task must be before it teaches nothing. Three keeps easy practice useful for a while, but not for ever. |
| tirePerUse | 0.15 | How tired one use makes the skill. At 0.15 about seven quick uses in a row wear it down, and zero turns tiredness off. |
| recovery | 0.5 per s | How much tiredness goes each second. At the default a worn skill is rested again in two seconds, so a short pause between uses is enough. |
| minFreshness | 0.1 | The least a tired skill still learns, as a share of a fresh use. Above zero, because a skill that learns nothing at all feels broken instead of tired. |
What usually goes wrong
Grinding something trivial
If every use counts the same, the player trains a high skill by hitting something harmless for an hour.
Fix: Tell your AI: let a use teach less the further the task is below the skill's level, and nothing at all past a set gap.
Spamming the same move
Pressing the same action a hundred times a minute beats playing the game, and the player does it, even though it is dull.
Fix: Tell your AI: let each use tire the skill a little and rest wear it off, so quick repeats teach less than spaced ones.
Leftover experience thrown away
A use that takes the skill from 9.5 to 10.5 of a 10 needed resets to zero, so the player loses the half point and feels cheated.
Fix: Tell your AI: subtract what the level needed and keep the rest for the next one.
One gain, several levels
A big gain on a low level, such as a boss fight, can pay for more than one level, and a single check promotes only one and leaves the skill sitting above its next level.
Fix: Tell your AI: keep levelling up in a loop until the experience is below what the next level needs.
Hard tasks that teach more
If a harder task always teaches more, the player throws the character at something too strong, dies, and learns the wrong thing: that risk is how to improve.
Fix: Tell your AI: cap the lesson at a task of the skill's own level, and let danger be its own reward.
Tiredness from a use that taught nothing
If a trivial use tires the skill, a player doing something easy in the background finds the real practice slowed.
Fix: Tell your AI: a use that teaches nothing changes nothing, no tiredness, no experience.
How to check it works
- A new skill at level 0. It is used once on a task at its level: It gains 1 experience, is 0.15 tired, and is still level 0.
- A new skill and a rest of ten seconds before each use. It is used ten times: It is level 1 with no experience left over, and the first four levels need 10, 13, 17 and 22.
- A skill used once just now. It is used again straight away: The second use teaches 0.85 instead of 1.
- A skill used once just now. Two seconds pass and it is used again: Its tiredness is gone and the use teaches the full 1.
- A skill as tired as it gets. It is used: It teaches 0.1, a tenth of a fresh use, and not nothing.
- A skill at level 5. It is used on a task of level 2 or lower: Nothing changes, not the experience and not the tiredness.
- A skill at level 3. It is used on a task of level 2: It teaches two thirds of a full use.
- A skill at level 3. It is used on a task of level 9: It teaches exactly what a task of level 3 would, which is 1.
- A level 0 skill holding 9.5 of the 10 it needs. It is used once: It is level 1 and holds 0.5 experience.
- A skill at the top level. It is used: Nothing changes.
Works well with
- Stamina System: Tiredness here belongs to the skill, stamina belongs to the character. Keep them apart, or a tired character will seem to forget how to fight.
- Experience and Levels: A character level can still exist beside the skills. Let the character's level come from the sum of the skill levels, so every use counts towards both.
Clashes with Skill Tree: A skill that grows with use and a skill bought with points both answer the question of how the character gets better, and the player does not know which to do. Keep the two for different things: use to deepen what a character already does, points to choose what new things it can do.
Common questions
what do i tell my ai to add mastery by use
Paste this: Add mastery by use: each use of a skill adds experience to that skill only. Tasks well below the skill's level teach nothing, tasks above it teach no extra, each use tires the skill and rest wears the tiredness off, leftover experience carries to the next level, and the top level stops gaining.
how do i stop players from grinding a skill by use
Make practice worth less the easier it gets, and nothing past a gap. Add a tiredness that wears off with time, so repeating the same move quickly teaches less than spreading the practice out.
should a use on a very hard task teach more
Not beyond the skill's own level. If it did, the player would be pushed into fights that are too dangerous to learn from. The risk itself is the reward for a hard task.
how is mastery by use different from experience levels
Experience levels are earned by the whole character and spent as points. Mastery by use ties each bit of growth to the skill that earned it, so a character who sneaks a lot becomes a better sneaker and nothing else.
Where it comes from
We could not find a reliable origin for this one yet.
What was checked
- 17 tests pass on the reference code.
- The state diagram was checked against the code, at the default values and at every listed low and high value.
Your AI gets the code
Tested example code comes through the Spielerando connection, so your AI can use it right away. How to connect it