Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Askaholic opened this issue Jan 1, 2025 · 0 comments
Open

Comments

@Askaholic
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant