How are the maps selected for _new_ challenges?

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#21 » 01 Apr 2017, 10:36

So once again this morning I'm meeting mcompany always on mind game. I mean, I do not have problem to meet the same opponent due to the lack of active players, but always on the same map it is not so interesting.

I understand that the matchmaking should be "unpredictable" (well I don't understand this completely, also because even when it is predictable, it is not that the player can do anything about it, deciding to fix the matchmaking on few maps) but what about something to avoid repeating in a noticeable way the same combination of map and opponent? (we notice something that we don't like if it happens often enough)

Something like:

Code: Select all

# when a player deploys a new match, not when one picks an existing match.
next_map = player.last_map();
while ( next_map == player.last_map() ) {
  next_map = random_map();
}
# so the rest 7 maps can be choosen.


So one can end playing the same map, but at least interleaved with a different map. Just for a bit of variety.

This because the current random selection is based on the entire playerbase and not on the single player. But for the single player it counts his point of view.

And I understand that random maps are coming, but they may come in 6+ months (I don't want to make pressure), so a little fix would not be bad in my opinion.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

Kheops
Script
Script
Posts: 15

Re: How are the maps selected for _new_ challenges?

Post#22 » 01 Apr 2017, 14:20

It would be nice, if there are pending matches, that the pending matches's maps would be excluded from the random for next match.

I think that would be double benefit because having 4+ matches pending on the same map :
- is annoying
- makes you wait longer to find an opponent

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: How are the maps selected for _new_ challenges?

Post#23 » 02 Apr 2017, 22:31

A fix wouldn't be so easy considering the way map randomization is currently implemented.
I'll do my best to implement random maps as soon as possible.

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#24 » 02 Apr 2017, 23:03

GFX47 wrote:A fix wouldn't be so easy considering the way map randomization is currently implemented.


If it is just a random (and it would be difficult to connect to the history of the player that is deploying a match), would be already better to say "ok, whatever the player that is deploying, I do not repeat the last map that I choose". Unless it is a pure SQL (unlikely, since you use random), it should be possible to do this with a global/static variable somewhere.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: How are the maps selected for _new_ challenges?

Post#25 » 03 Apr 2017, 21:52

It's possible, it would just take too much time to be relevant.

User avatar
LuBeNo
Autonomous Entity
Autonomous Entity
Posts: 532

Re: How are the maps selected for _new_ challenges?

Post#26 » 03 Apr 2017, 22:24

pier4r wrote:Unless it is a pure SQL (unlikely, since you use random)...

SQL Server, Oracle, MySQL, ... :D
Image
My algorithm of life: if(self.tired) sleep(); else if(self.hungry) eat(); else follow(Jesus);

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#27 » 03 Apr 2017, 23:50

GFX47 wrote:It's possible, it would just take too much time to be relevant.


Could you elaborate more? I'm not sure I understand what you mean.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#28 » 05 Apr 2017, 14:00

The following is exactly what I mean. Notice: same maps, same opponents. Instead with a slight variance it may have been avoided. It does not happen always, but when it does it ruins the day.
Attachments
2017-04-05 13_58_36-Mozilla Firefox.png
2017-04-05 13_58_36-Mozilla Firefox.png (20.04 KiB) Viewed 1875 times
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
PPS
Automaton
Automaton
Posts: 123

Re: How are the maps selected for _new_ challenges?

Post#29 » 05 Apr 2017, 20:29

pier4r wrote:The following is exactly what I mean. Notice: same maps, same opponents. Instead with a slight variance it may have been avoided. It does not happen always, but when it does it ruins the day.


Да неужели хватило смелости признаться... :lol:

Yes, really had the courage to admit ... :lol:

Несовершенный, сырой (ебанутый) алгоритм подбора карт и соперников...

Imperfect, raw (fucked) algorithm for selecting cards and rivals ...

Игра очень сырая, продавать рано, деньги брать НЕ ЗА ЧТО...
Но в Париже жизнь дорогая, по тому и так сойдёт, лохи скушают... )))

User avatar
Bombafat
Script
Script
Posts: 40

Re: How are the maps selected for _new_ challenges?

Post#30 » 07 Apr 2017, 14:13

pier4r wrote:The following is exactly what I mean. Notice: same maps, same opponents. Instead with a slight variance it may have been avoided. It does not happen always, but when it does it ruins the day.


I was really surprised, seeing my name already at the forum before I was actually registered xD
To bad, that it was used to demonstrade some nagative things. I do not have a lot of experience yet (started jsut a few days ago) but I am already a huge fan of the idea of random maps since I do not want to make specialiced AIs for every map. I like the concept of a generic idea much more. Unfortunately, "Mind Game" is a map where this just do not work out. At least this is my experience. Just want to say, that random maps can not come fast enough :)

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#31 » 07 Apr 2017, 22:36

You may consider decorators. See the FAQ. Anyway yes, I'm sorry that you were in the example but it is pretty obvious.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
Bombafat
Script
Script
Posts: 40

Re: How are the maps selected for _new_ challenges?

Post#32 » 08 Apr 2017, 09:41

Sorry i am not quiet sure what you mean with decorators. Couldn't find anything in the FAQ about it.

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#33 » 08 Apr 2017, 11:33

http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
Bombafat
Script
Script
Posts: 40

Re: How are the maps selected for _new_ challenges?

Post#34 » 09 Apr 2017, 10:08

Thanks. I like the concept. I feel a bit dump now since i was looking at the forum FAQ :?

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: How are the maps selected for _new_ challenges?

Post#35 » 12 Apr 2017, 21:54

pier4r wrote:
GFX47 wrote:It's possible, it would just take too much time to be relevant.


Could you elaborate more? I'm not sure I understand what you mean.


It would take me a lot of code refactoring time. I prefer spending it on incoming features.

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#36 » 12 Apr 2017, 22:19

Ah, then, yes. I do agree with you. Sure this has to be tackled one day but one can just wait before spamming the next match. This would work too.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#37 » 03 Jun 2017, 00:27

Just some further checks (mostly for myself of the future when I moan).

So analyzing the last 20000 recorded matches (the last one in the set done on the 2017.06.01 9.10 AM), that should be a pretty large chunk.

Fun fact, the gaps between match ids are pretty often, it means a lot of players takes time to commit to a match (as 2nd players) and so the match can be in pending for long time.
A match was started on the 8th of February and was committed on the 22nd of May for example. But those are a minority of matches. Mostly the gaps is like 663040 to 663044 (it means three matches in the middle may to be completed later). Anyway analizing the last 20000 games in order of id, should put aside also those rare case of long waiting time between creation and result.

So ignoring those gaps, because a random sampling of a random stream should still be random, I got the following results. Considering a consecutive appearance like: if I have the series 51114 , 1 appears in two consecutive appearances twice. 5[11]14 and 51[11]4. This avoid to let count triplets, quadruple appearances and so on.

circle of death: 332
Barred spiral: 313
Kingmaker: 303
split team: 301
the seven wonders: 343
mind game: 269 (!)
set your priorities: 295
meeting point:305

Now the expected value is 312 and since the sample is pretty large, things should converge to this value even considering that not all the matches are resolved in time, because one gets a random sample of a random sample.

If I simulate random assignments with the same size I get results varying from 320 to 304 more or less, not much more or much less unless I repeat the experiment over and over. Anyway the point is that the more the samples, the more the number should tend to the expected value.

What looks suspicious is the value of "consecutive" mind games (15% less than the expected value) and seven wonders (9% more).

Aside from that, the analysis (better than the last time, where I counted in a very naive way, without considering some factors), shows again that mostly the behavior is ok. Maybe what is frustrating is to have the same opponent __and__ the same map.

Still 15% or 9% of discrepancy from the expected value may grant a check, or maybe not.

I'll do the same by player though, so we may have more insights with the point of view of a player that cannot see maps not assigned to him.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#38 » 04 Jun 2017, 16:46

On the same sample of 20000 matches I checked the perspective for a single player.

Now a player may play not so much and so having quite a skewed perspective so I tried to use players that played enough, in particular chris that played 1442 in the sample.

So first I simulated how many new matches with the same map of the last one he should have encountered, the reply is 22 for a sample of 1442 matches. (the theoretical is 22.5)

This are the real distribution:
seven wonders: 19 ok
syp: 19
mp: 30 (! 36% more than expected)
cod: 27 (! 22% more)
split: 18 (!)
mind: 20
king: 18 (!)
barred: 19

Now with 1442 matches the values should have been pretty close to expected value but I'll check in the simulation how much values can variate at the end to compare the possible variations.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: How are the maps selected for _new_ challenges?

Post#39 » 04 Jun 2017, 20:16

Do you take karma into account in your calculations?

pier4r
Skynet
Skynet
Posts: 3389

Re: How are the maps selected for _new_ challenges?

Post#40 » 04 Jun 2017, 21:10

xD

That would explain a lot of stuff!

No mostly I like to have a reason to play around with my math library, so when I see "how look, such things look skewed" then I think "hmm, ok, it is only one 'run' while I simulate at least one thousand to get a very stable number, let's see the variance of my simulation if it would allow the real case".

I believe the thing is pretty random, but too random is frustrating because few players play a lot and many players play a little and in those little runs, you may have "random-non-acceptable" runs. Like the itunes random for music, that they had to change. That is: too much time the same map (meh) and the same player (same player because at that time of the day, there are few players connected).

I do not know where you call the "random" function in your code but if it would be possible to change it, I would change it. When it would be difficult to track the previous matches a quick solution is to hand permutations of the map pool, like:

Code: Select all

# next permutation syp cod mp 7w king mind barred split
match 690034 syp
690035 cod
690036 mp
690037 7w
..38 king
..39 mind
..40 barred
..41 split
# next permutation (trigger to compute it: the list is finished) 7w king barred mind split mp syp cod
..42 7w
..43 king
..44 barred
..45 mind
..46 split
..47 mp
..48 syp
..49 cod
# etc.


In this way karma can still assign to the same player the same map over and over, but it is less likely. Or better, the random is less random now. Indeed it is very unlikely that two successive matches will have the same map (except at the end and at the start of a permutation, but you may hand even this, avoiding that the new permutation has the same map of the last element of the old permutation)
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

Return to “Questions”

Who is online

Users browsing this forum: No registered users and 1 guest