Skip to content

Improve anti-repetition to prefer repeating maps played longer ago #1036

@Askaholic

Description

@Askaholic

Sometimes there is no choice but to repeat a map. Currently the way that the repetition system works, how far back a map was played in the history is not taken into account. So it is possible to end up in a situation where the system can choose between a map that was played 1 game ago or a map that was played 2 games ago and will randomly pick with a 50/50 chance. In this situation it would be better to always pick the map that was played 2 games ago.

Probably the way to do this would be something like changing the Counter in MapPool.choose_map to count some arbitrary 'tokens' instead of counting occurrences. Then we can give more tokens to recently played maps than to maps played longer ago. Maybe some sort of exponential scale would work well for this. It goes a little crazy for large histories, but in practice our history is always length 2, and it is unlikely to be higher than that.

Maps played in chronological order:
----------------
A   B   C   D

1   2   4   8
----------------
Tokens to count (2 ^ i)

I think it also does represent a player's desire to not be playing those maps pretty well, if you just played 10 games, you really don't want to repeat the last map, but you don't care at all about the map you played 10 games ago. The exponential scale captures that pretty well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions