mesa / mesa/mesa-examples

Example: Add luck vs skill gambling model

Open
#321 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
252
Forks
279
Avg merge
8d 9h
Merged PRs (30d)
2

Description

This PR proposes a new example demonstrating how short-term gambling outcomes are dominated by stochastic variation even when agents differ in skill.

In the model, agents have fixed skill levels that slightly bias their probability of winning a bet. Agents repeatedly place fixed-size bets, and outcomes remain noisy. After a short number of rounds, agents are ranked by wealth, and the average skill of the top and bottom performers is compared.

The example shows that, over short horizons, early winners are not reliably more skilled than early losers. The skill distributions of these groups overlap substantially, illustrating why short-term success is a poor indicator of true ability. This captures phenomena such as beginner’s luck, overconfidence after early wins, and misattribution of success in gambling and similar domains.

The example is intentionally simple and pedagogical. It focuses on a single mechanism with small skill advantages and avoids additional behavioral assumptions or long-term dynamics. This makes the model simple and easy to understand.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing existing Python examples in the repository to understand their structure and how agents, bets, wealth, and skill are represented. Implement the described short-horizon gambling model and verify that top and bottom performers show overlapping skill distributions, demonstrating that early success is not a reliable measure of ability.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.