We present how agent-based models can be used to correct for biases in a sample. The approach is generally useful for behavioural experiments where participants interact over time. The model we developed copied mechanics of a behavioural experiment conducted earlier, and agents in the model faced the same strategic choices as human participants did. We used the data from the experiment to calibrate agent behaviour such that agents reproduced patterns observed in the experiment. After this learning phase, we resampled agents such that their characteristics (political orientation) were similar to those found in the real world. We found that after the correction for the bias, agents produced patterns closer to those commonly found.