Sub topic 2
Scarcity, Dominance, and Uncertainty in Player Choices
This chapter assumes you know basic game terms such as resource and player goal, and that you can read short Python code.
Scarcity: limited resources force decisions
A resource is scarce when the player cannot have everything they want. If a player has 10 gold and each item costs 10, buying one item means giving up the others. That lost option is what makes the choice matter.
Scarcity works when the limit is visible and each option's cost is clear. A player who can see the budget can compare trade-offs. A player who cannot see it feels punished rather than challenged.
Dominant and dominated options: when a choice is no choice
An option is dominated when another option is at least as good on every axis and strictly better on at least one. A rational player never picks a dominated option. A dominant strategy is an option that wins in every case, which removes the decision entirely.
The script below flags dominated weapons.
from dataclasses import dataclass
@dataclass(frozen=True)
class Option:
name: str
damage: int
defense: int
cost: int
def dominates(a, b):
"""True if a is at least as good as b on every axis and better on one."""
at_least_as_good = (
a.damage >= b.damage and a.defense >= b.defense and a.cost <= b.cost
)
strictly_better = (
a.damage > b.damage or a.defense > b.defense or a.cost < b.cost
)
return at_least_as_good and strictly_better
def dominated_options(options):
return [
b for b in options
if any(dominates(a, b) for a in options if a is not b)
]
weapons = [
Option("Sword", damage=5, defense=2, cost=3),
Option("Axe", damage=8, defense=0, cost=3),
Option("Rusty Sword", damage=4, defense=2, cost=3),
]
print([o.name for o in dominated_options(weapons)]) # ['Rusty Sword']Information and uncertainty: deciding without full knowledge
Players often choose without knowing the outcome. Hidden stats, unknown enemy weaknesses, and random drops all create uncertainty. Uncertainty differs from pure randomness. A player who can estimate the odds can plan. A player who cannot estimate anything is only guessing.
Exercise
In the weapons list, why does the script flag Rusty Sword?
Show answer
Sword has the same defense and cost as Rusty Sword and higher damage, so Sword dominates Rusty Sword.