[Comprehensive] Ladder algorithm and ladder Algorithm

Source: Internet
Author: User

[Comprehensive] Ladder algorithm and ladder Algorithm

<! -- Copyright notice! Reprinted, please describe the source. Thank you :) -->

<! -- By Polo Shen: http://www.cnblogs.com/polossk/->

 

Target

Today, I heard people say that the ACM team of a school has developed a Rating System, which is similar to the Rating of TopCoder and Codeforces. the intuitive points are more likely to reflect the results of the competition and recent performances of everyone. They are also said to regard this as one of the assessment criteria.

It sounds awesome!

But we have a school !!!

Then I thought of Zuckerberg's "little girl" activity when I watched "Social Networking.

Programmers have a new idea. It's a waste of their work!

Create your own Rating System.

Ladder algorithm Overview

It's better to make up your knowledge first. The so-called ladder algorithm is actually very simple, although the mathematical proof is very complicated... The foundation of the ladder algorithm is that the population level basically satisfies the normal distribution. To put it simply, it is assumed that most people are quite arrogant, and a small number of elites and low-level people exist at the same time. At the same time, the core operations are self-evident. Simply put, if a person matches at the same level, the winner points out and the loser points out. When the gap between two players is relatively large, the points to be deducted after the storm will be higher than the same level, but it will not soar.

Here I use Elo Rating System.

The general algorithm is as follows:

1. Assume that the current score of the two persons has been given:

# Encoding = UTF-8class Student attr_accessor: name attr_accessor: rating attr_accessor: rank partition: _ solve partition: _ drating def initialize (name = "Unknown", rak = 100, rtg = 1500, solve = 0) @ rank = rak. to_ I @ name = name @ rating = rtg. to_ I @ _ drating = 0 @ _ solve = solve. to_ I end def initialize (str2) str = str2.to _ s data = str. split ('') @ rank = data [0]. to_ I @ name = data [1] @ rating = Data [2]. to_ I @ _ solve = data [3]. to_ I @ _ drating = 0 end def update (d) # accumulate rating changes @ _ drating + = d end def modify # update rating @ rating + = @ _ drating = 0 @ rating = @ rating. to_ I end def toStringLine return "# {@ rank} \ t # {@ name} \ t # {@ rating} \ n" end def print # puts "# {@ rank }\ t # {@ name} \ t # {@ rating} "puts" # {@ rating} "end $ Kcef = 60 # coefficient of competition = beginRating algorithm: compare two contestants. Each comparison is updated with _ drating. Comparison Method: Compare the number of questions first: the number of questions wins, the number of questions is negative, and the number of questions is negative. If the number is equal, the ranking is compared. The coefficient is selected based on the comparison result for calculation. Update coefficient rule: Calculate the coefficient of the competition by the number of participating students as follows: cef = $ Kcef/sz update Rule: when updating, the two students will compare each other, the incremental calculation method is as follows: A: dA = cef * (sA-eA) B: dB = cef * (sB-eB) at last, you can accumulate the data directly. = Enddef calc_eA_eB (rA, rB) da = (rB-rA) /400.0 db =-da ta = 10.0 ** da + 1.0 tb = 10.0 ** db + 1.0 ea = 1.0/ta eb = 1.0/tb return [ea, eb] enddef calc_sA_sB (a, B) solveA =. _ solve solveB = B. _ solve pA =. rank pB = B. rank if solveA <solveB return [0.0, 1.0] elsif solveA> solveB return [1.0, 0.0] elsif pA <pB return [1.0, 0.0] else return [0.0, 1.0] endenddef calc_cef (ra, rb, sz) return $ Kcef/szenddef competition (a, B, sz) # modify the incremental eA of two persons, eB = calc_eA_eB (. rating. to_f, B. rating. to_f) sA, sB = calc_sA_sB (a, B) cef = calc_cef (. rank. to_f, B. rank. to_f, sz. to_f) dA = (sA-eA) * cef dB = (sB-eB) * cef. update (dA) B. update (dB) enddef read (path) items = Array. new File. open (path,: encoding => 'utf-8 '). each_line do | line | item = Student. new (line) items <item end sz = items. size # Compare for I in 0 one by one... sz for j in 0... sz if I = j then next else competition (items [I], items [j], sz. to_ I); end # Compare items. each do | data | temp = data temp. modify # update the rating competition (temp, data, sz) temp. modify # rating data after self-comparison. modify # calculate the average value data for rating. rating = (temp. rating. to_ I + data. rating. to_ I)/2 ). to_ I end file = File. new ("result.txt", "w +") items. each do | data. modify file. print data. toStringLine endendread ("contest1.txt ")View Code

 


11. The ladder integral algorithm on the platform is extremely pitfall

Every rule is made by someone. You can perfect it or complain about it. But if you complain about it, the rule is still the original one. If you perfect it, he will make you more comfortable.
11. It hurts to buy a chicken, but the rest is fairly fair. Only 11 has too high expectations for you.
11 first, you have the first image before the launch, for example, you are a buring.
Then you are done. Playing a game is not as good as playing a second stream, and then the referee will see you unhappy. You will be deducted.
If you lose, his expectations for you will decrease. If you always win, congratulations...

DOTA ladder Integral Calculation Formula

A ladder score is composed of two parts: a ladder point and a hero point.

Tianti points

The tiladder points algorithm is the weighted average of the hero points of each hero you use, but I do not know the specific data. The top 25 average scores of heroes are all nonsense. I know it is inaccurate.

In my personal observation, the weight of a hero's points is the higher the weight of a hero. For example, the hero with the highest score accounts for 10% of the weight and the second place accounts for 9% of the weight, third place accounts for 8%... Of course, the data is compiled by me, but it is not important.

The following are two important points:

1 only the changes in the first three pages (that is, the top 30 heroes) can significantly affect your ladder points. That is to say, one of your heroes adds 800 points on the tenth page to the fourth page.

2. Before you enter a three-page hero, your tiandr points fluctuate greatly, and even the bonus points, tiandr points, or hero points are normal.

Therefore, players who want to score quickly should not always take low-score heroes. This is a waste of time. Although you may not deduct points, do not add points, however, it is not good to take the first page of the hero (the reason is described later), so I suggest playing the second and third pages of the hero.

Here are the hero points, which are the key points.

As shown in the above algorithm, the level and level of your ladder points are just representations. In essence, you need to increase the level of hero points.

The hero integral algorithm of the 11-day ladder is a "Expectation Algorithm". Simply put, before a game starts, after 10 people select a hero, the 11 system has estimated a result, this result is based on each person's hero points. For example, if you scored 1800 points for the hero, 4 of your teammates were 1000 points for the hero, there is a 1700-point hero and four 900-point hero on the opposite side. If this sentence is not started yet, the 11 system will "Expect" a result-you take the MVP, the opposite is the 1700-point hero. There are four results:

1. You have won. You are an MVP. Although you are playing well, you cannot score too many points because the system is already preparing you to take the MVP. It is estimated that 100 +

2. if you win, you are not the MVP, And you are estimated to be + 3, because you did not meet your 11 expectations, one of your 1000-point teammates will add a lot of points to the MVP because they play the game as expected.

3. If you lose, you are the soul, and the guy on the opposite side is the MVP, then you will be deducted points. The points to be deducted depends on how low your teammates score is... Generally, more than 100 yuan is deducted, and more than 1700 yuan is estimated to be added because the number of people on the other side exceeds expectations.

4. If you lose, you are not the soul. Congratulations, you are in a tragedy. It is normal to deduct -.

This is an extreme example. In fact, the scores of 10 people are not that big.

For example, in the current career group, the score of 10 heroes is as follows: 1 hero with high scores (3000 +) and 1 hero with low scores (for example, 1 score ), on both sides, the remaining eight accounts are used to refresh the score.

The specific method is: four people on each side are opposite to the other one. The final data is that 3000 + heroes are killed by 0, his four teammates killed 10 + 0, and the one-point hero killed n. His four teammates killed 10 + 0, and finally won the 3000 + hero. The final result is that all the eight credit card accounts are "super-normal" and will add over-many points. If the one-point account loses, the hero will no longer be able to deduct points, 3000 + heroes won't deduct points even if they win the force + 3 game, so that the game is over.

Here are some instructions:

1. once you start the game, your ladder points have no meaning, for example, you ladder 1800, but you played a 800 point hero, if a 1000-point teammate gets a 1800-point hero, the first expectation of the system is that your teammate wants to win the MVP, instead ...... remaining full text>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.