prevent multiple ladder matches on the same map

Moderator: keyser

prevent multiple ladder matches on the same map

Postby Evan_ » 06 Oct 2017, 17:17

I know it's probably just random chance and all but it can get annoying to play on the same ladder map three or four times in a row. Ladder should give the experience of all the maps in the pool, but for the last rotation or two there's been maps I didn't play on at all.

could a change be made to the map picking algorithm to prevent choosing the ladder maps that you or your opponent last played on?
User avatar
Evan_
Avatar-of-War
 
Posts: 218
Joined: 27 Feb 2016, 18:51
Has liked: 65 times
Been liked: 80 times
FAF User Name: Evan_

Re: prevent multiple ladder matches on the same map

Postby Mephi » 06 Oct 2017, 17:32

Yes! Please 8-)
My YouTube channel: https://www.youtube.com/channel/UCrS9QsyUnTXhhYw3mAjBAeA
Top Level 1v1 POV and Casts
Mephi
Priest
 
Posts: 349
Joined: 13 May 2013, 17:24
Has liked: 22 times
Been liked: 134 times
FAF User Name: Mephi

Re: prevent multiple ladder matches on the same map

Postby partymarty81 » 13 Oct 2017, 00:26

+1
partymarty81
Avatar-of-War
 
Posts: 156
Joined: 09 Aug 2016, 21:03
Has liked: 80 times
Been liked: 53 times
FAF User Name: partymarty81

Re: prevent multiple ladder matches on the same map

Postby Lieutenant Lich » 13 Oct 2017, 04:14

I already wrote an algorithm about a year ago or so that selects a 12 map pool and selections are completely random. We all know what happened next...
Don't complain about that which you aren't willing to change.

My mod:
viewtopic.php?f=67&t=12864
User avatar
Lieutenant Lich
Evaluator
 
Posts: 952
Joined: 01 Feb 2016, 05:28
Location: United States
Has liked: 992 times
Been liked: 818 times

Re: prevent multiple ladder matches on the same map

Postby PhilipJFry » 13 Oct 2017, 07:42

Erich von Manstein wrote:I already wrote an algorithm about a year ago or so that selects a 12 map pool and selections are completely random. We all know what happened next...

You made a pull request on github so someone can review the code and then merge it?
You convinced the player councilor that a 12 map pool is the way to go?
Also 12 maps in the pool don't prevent you from getting the same map several times in a row. It just makes it less likely to occur.
cats>dogs
post logs
User avatar
PhilipJFry
Supreme Commander
 
Posts: 2635
Joined: 23 Mar 2016, 21:16
Location: Austria
Has liked: 232 times
Been liked: 348 times
FAF User Name: PhilipJFry

Re: prevent multiple ladder matches on the same map

Postby Morax » 04 Nov 2017, 20:46

If you actually still think it is mathematically reasonable I have only gotten 2 out of 7 maps in ladder pool something is wrong... Not that many people play so saying "so and so got the other maps already" is just plain, not valid.

Image
Maps and Modifications Councilor

M&M Discord Channel

Come join us and help create content with the artists of FAF.
User avatar
Morax
Councillor - Maps and Mods
 
Posts: 2865
Joined: 25 Jul 2014, 18:00
Has liked: 1167 times
Been liked: 662 times
FAF User Name: Morax

Re: prevent multiple ladder matches on the same map

Postby ThomasHiatt » 04 Nov 2017, 21:41

Code: Select all
(map_id, map_name, map_path) = random.choice(self.game_service.ladder_maps)

game = LadderGame(self.game_service.createUuid(), self.game_service, self.game_stats_service)
self.game_service.games[game.id] = game

player1.game = game
player2.game = game

game.map_file_path = map_path


Almost all module functions depend on the basic function random(), which generates a random float uniformly in the semi-open range [0.0, 1.0). Python uses the Mersenne Twister as the core generator. It produces 53-bit precision floats and has a period of 2**19937-1. The underlying implementation in C is both fast and threadsafe. The Mersenne Twister is one of the most extensively tested random number generators in existence. However, being completely deterministic, it is not suitable for all purposes, and is completely unsuitable for cryptographic purposes.


You can see that it is in fact random. It is just as reasonable that you will get the same 2 maps over and over as it is for any other sequence of maps. There was talk about changing the system in the last dev conference, so that it will not select the map that each player played last. But of course then you could still get loki->badlands->loki->badlands->loki->badlands.....

It is just that one line of code in https://github.com/FAForever/server/blo ... service.py that chooses the maps. So anyone here could watch a couple python tutorials and change the algorithm. A simple solution would be to check the map that you played last and then pick the next one in the list, and if that happens to be the map your opponent played last, then pick the next one. Then you will never play the same map twice in a row and the games will be almost perfectly distributed among all the maps in the pool. The hard part is figuring out what map each player played last, but I imagine someone on Slack can tell you how to do it. Probably by just getting the last ladder reply for each player and checking what map it was on.
ThomasHiatt
Avatar-of-War
 
Posts: 184
Joined: 02 Feb 2017, 00:24
Has liked: 116 times
Been liked: 110 times
FAF User Name: ThomasHiatt


Return to FAF Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest