Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28

Thread: War of Gods question

  1. #16
    Silver Member Contributor Level 5
    Join Date
    Mar 2015
    Posts
    141
    Rep Power
    11
    I originally thought random.

    But I started paying attention, when I read above about who is looking for a match and who is matched.

    Since then, every time that I seem to get matched with someone else, I go second. Similarly, if I seem to be looking for a match, I seem to pick first.

    Obviously, this is a secondary observation, as you can't really see whether you're looking or being matched up. The length of time that you're looking seems indicative though. Enough so that I'm siding with the looking vs. matched over the random theory.

  2. #17
    Forum VIP Contributor Level 12
    Join Date
    Feb 2016
    Posts
    2,817
    Rep Power
    106
    Looking vs matched?
    If you are matched, you were looking before, else you wouldn't fight???

    And as others said. Got second waiting almost 1 minute before find a first, and got first after immediately match.

    So I think it's just random (simpliest programming function)... And else it doesn't matter at all, as you can't influence it anyway...

  3. #18
    Gold Member Contributor Level 7
    Join Date
    Apr 2016
    Posts
    260
    Rep Power
    0
    Quote Originally Posted by HenryChinaski View Post
    Looking vs matched?
    If you are matched, you were looking before, else you wouldn't fight???

    And as others said. Got second waiting almost 1 minute before find a first, and got first after immediately match.

    So I think it's just random (simpliest programming function)... And else it doesn't matter at all, as you can't influence it anyway...
    random is not simplest function, determined/chosed by programmer (the one who write program) is simplest function, at least he doesn't have to add the random code.

    It's like this:
    - program grab A then wait for B.
    - program grab B and choose who first.
    instead of write random(A,B) = first, he just write A = first, go fight, simple.

    for programming it's easiest, for testing it's also easiest because there are no variables, he/she does not have to test the case B first or random first.

  4. #19
    Forum VIP Contributor Level 12
    Join Date
    Feb 2016
    Posts
    2,817
    Rep Power
    106
    Yes, but I mean implement a random function (which is a basic function in any programming language) is 1 line of code. It's not comparing values that have to be stored/send somewhere.

    You perfectly described it in 3 steps. Grab A,wait, grab B. A First. Instead of random first.
    So it's easier....

  5. #20
    Silver Member Contributor Level 5
    Join Date
    Mar 2015
    Posts
    141
    Rep Power
    11
    Since we're talking about this programmatically, the way that makes the most sense to me is that matchmaking is handled by threads/processes and FIFO queues. We know there are multiple queues, because below legendary, I've never been matched with anyone more than 1 or 2 stars away from me. And once legendary, you end up in broader categories, but it's still categories, as I've never been matched with someone with vastly more trophies than I have.

    The implementation as I see it is: One thread is responsible for taking someone looking for a match, finding the proper queue to put it in, and then adding it to the bottom of the queue.

    The next thread monitors the number of entries in the queue. If it sees at least 2, it pops the top 2 off and sends it to the battle process. Now, the battle process could either pull a random number and have that person go first or it could just take the player that was on top of the queue as first (which it can likely determine as 2 parameters in the call being A and B and choosing A).

    Which brings us to the question of why is there a delay sometimes in match starting and why does the delay often lead to seem like the first one in the queue (yes, assuming I'm right on implementation) gets first choice?

    1. Given that everyone is a fixed distance/route to the servers, it doesn't depend on where the players are.
    2. uCool servers are just slow and have trouble processing people quickly. While this could be true, multi-process programming is old hat and I can't see them implementing this where their servers are the bottleneck.
    3. So many people are playing WoG that even multiple queues get filled with players. This implies that the battle processes aren't as multi-threaded as I would expect (and thus people are waiting for an arena to free) or WoG battle processors are limited.
    4. Player A is alone in the queue and the wait is for someone close to his current position to apply.

    So the theory is that in a non-random situation, the longer waits represent a situation where you're assigned as the only person in a queue and are waiting for someone of the correct score to join you (situation 4). The other 3 scenarios tend to imply that uCool can't throw enough resources or have bad programming to resolve periodic timing issues. And in any case, these scenarios don't explain why longer wait times seem to favor first starts.

    And I guess that's what it all comes down to. I've seen that longer waits tend to mean I go first. Short waits don't necessarily mean random, as it could simply be that I was fractionally added to the queue before someone else.

    Disclaimer:

    I am not a uCool programmer, nor have I ever seen any HC code, nor know anyone at uCool who has. The above is all speculation. However, I was a programmer for 30+ years, and if I were assigned something like this, it's the likely way I'd implement it. Trying to backwards engineer something from incomplete observational data can easily lead to mistaken assumptions.

    Finally,

    Don't ask why I spent this much time thinking about this. Too much time on my hands?

  6. #21
    Prime Leader Contributor Level 12
    Join Date
    Dec 2014
    Posts
    2,203
    Rep Power
    84
    You were a programmer but you make things complicated, this is too bad for coding.

    It can be done much more easier with just one queue and a little bit searching for WoG level matching. Why multiple queues?

    No more than 3-4 lines of code.

  7. #22
    Diamond Member Contributor Level 8
    Join Date
    Jun 2015
    Posts
    630
    Rep Power
    28
    Quote Originally Posted by zissop View Post
    You were a programmer but you make things complicated, this is to bad for coding.

    It can be done much more easier with just one queue and a little bit searching for WoG level matching. Why multiple queues?

    No more than 3-4 lines of code.
    since they match players within a certain parameter of each other, it would need to be multi queues or lots of if then checks to find opponents matching the parameters of 2 players fighting, not sure which is easier to code, its been a number of years and several programming languages since ive done any (anyone say fortran, pl1 or assembler code) :P

  8. #23
    Prime Leader Contributor Level 12
    Join Date
    Dec 2014
    Posts
    2,203
    Rep Power
    84
    I am a programmer so no more than a few lines of code, at least on pseudo code language. I believe they have an sql database on the server, so some things are very easy to be implemented (like search based on certain criteria)

  9. #24
    Gold Member Contributor Level 7
    Join Date
    Apr 2016
    Posts
    260
    Rep Power
    0
    you guys think too much for such tasks, i.e you never complete any project by yourself when everything MUST BE complicated like that. Make it simple.

    Let say server has an object called 'WoG_match' that (will) store 2 players: A & B.
    Anyone tap on search opponent will trigger server to find & join exist 'WoG_match' objects, if not match then server create new 'WoG_match' and wait.
    - normal case 'WoG_match' will match 2 players in 1 - 600 seconds.
    - the worst case 'WoG_match' can not match 2 players, simply show 'connection error' or such.

    With each 'WoG_match' it's simple, just A & B.

    Need Disclaimer ? I was a programmer ? yes but everything happened to me is quick, it's only took me 3 years to go from a coder to team leader/project manager, then another 3 years to become division managers with 20+ programmers under my management, I do not code during that time, but I can tell them how to solve any problems including code/test/business. And now I don't work anymore. Just 10 years.

  10. #25
    Prime Leader Contributor Level 12
    Join Date
    Dec 2014
    Posts
    2,203
    Rep Power
    84
    You are a bad programmer, sorry to say that. You forgot that matching players have certain criteria, not a generic matching.

    Leave coding for real programmers.

  11. #26
    Gold Member Contributor Level 7
    Join Date
    Aug 2016
    Posts
    258
    Rep Power
    14
    I think the simplest explanation is when player A searched for a match for his level, there are 2 possibilities
    1. He could not find a match so he created a match himself and waits for an opponent. In this case he picks the hero first
    2. He found a match. Player B has already created a match for their level so player A just joined that match and he picks the hero after player B

  12. #27
    Gold Member Contributor Level 7
    Join Date
    Apr 2016
    Posts
    260
    Rep Power
    0
    Quote Originally Posted by zissop View Post
    You are a bad programmer, sorry to say that. You forgot that matching players have certain criteria, not a generic matching.

    Leave coding for real programmers.
    it's not 1 object only guy. you would fail the interview if I'm your interviewer (I would say: too narrow minded, I can't tell you everything to have the work done, idiot), ask your teacher about whatever I said, it will help you in your future career/life.

    p/s: I don't really care if you don't know anything. some people are really hopeless, can't improve whatever from them, let accept the facts.

  13. #28
    Prime Leader Contributor Level 12
    Join Date
    Dec 2014
    Posts
    2,203
    Rep Power
    84
    tin go find another job. You know nothing about programming and you can't judge me as I am an active programmer for 25+ years. I also own a software company - so do i need an interview from someone like you who have read some books and pretend to be something?

    When SQL exists there are no queues or objects, just simple selects :P But SQL is an unknown word for you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •