srpg 勝利條件設定
介紹 (Introduction)
The e-sports community has been growing rapidly in the past few years, and what used to be a casual pastime has morphed into an industry projected to generate $1.8 B in revenue by 2022. While there are many video games in this ecosystem, few have been a staple of the community like League of Legends, with the game amassing over 100 million unique viewers during their 2019 World Championship.
電子競技社區在過去幾年中一直在快速增長,過去曾經是休閑娛樂,如今已演變成一個行業,預計到2022年將產生$ 1.8 B的收入。 盡管這個生態系統中有許多視頻游戲,但像英雄聯盟這樣的社區中很少有這樣的視頻游戲,該游戲在2019年世界錦標賽期間吸引了超過1億的獨立觀眾。
Released in late 2009, League of Legends is a freemium MOBA (multiplayer online battle arena) video game created by Riot Games which generated a widespread competitive scene early on, with the first World Championship in 2011 generating around 1.6 million viewers. The game has since grown, both in popularity and gameplay, as Riot began to understand how changes could make the game more competitive and fun.
英雄聯盟(League of Legends)于2009年末發布,是由Riot Games創建的免費增值MOBA(多人在線戰斗競技場)視頻游戲,在早期就產生了廣泛的競爭場面,2011年的第一屆世界錦標賽吸引了160萬觀眾。 此后,隨著Riot開始了解變化如何使游戲更具競爭力和趣味性,游戲在受歡迎程度和游戲玩法方面都在不斷發展。
The current state of the game is quite complicated, and if you’re a complete newbie, you should check out this video. To summarize, a League of Legends match poses two teams of five players, each of whom control one unique character or “champion”, and ends when one team’s Nexus, located deep in that team’s base, is destroyed. Along the way, there are many objectives that a team can achieve, such as destroying turrets, killing neutral monsters like dragon and baron for team-wide buffs, and many more. Some objectives, such as destroying at least five turrets and one inhibitor, are necessary to win the game, while others, such as getting First Blood, are helpful, but not necessary. Through this project, I would like to better understand which of these objectives are the most important to win a game of League of Legends. To that extent, the question I posed is as follows:
游戲的當前狀態非常復雜,如果您是一個完全的新手,則應查看此視頻 。 總而言之,英雄聯盟的比賽由兩隊組成,每隊五名球員,每人控制一個唯一的角色或“冠軍”,并在摧毀一支位于該隊基地深處的一支隊的Nexus時結束。 在此過程中,團隊可以實現許多目標,例如銷毀炮塔,殺死整個團隊的增益師等中立怪物,如龍和男爵,等等。 為了贏得比賽,某些目標(例如銷毀至少五個炮塔和一個抑制劑)是必要的,而其他目標(例如獲得“第一血統”)是有幫助的,但不是必需的。 通過這個項目,我想更好地理解其中哪些目標是贏得英雄聯盟游戲最重要的目標。 就此而言,我提出的問題如下:
What objectives are the most important win conditions for a game of League of Legends?
什么目標是英雄聯盟游戲最重要的獲勝條件?
收集數據 (Gathering Data)
Jumping in, I first applied for an app with the Riot Developer Portal and after my app was accepted, I browsed through the APIs tab to understand the type of data I could request. Unfortunately, there wasn’t a direct way for me to pull the last X number of ranked matches from a region, so I had to figure out a way around this.
進入時,我首先向Riot Developer Portal申請了一個應用程序,當我的應用程序被接受后,我瀏覽了API選項卡以了解可以請求的數據類型。 不幸的是,我沒有直接的方法從一個區域中獲取最近的X個排名比賽,因此我不得不想辦法解決這個問題。
My solution was to use a list of summoner names (usernames) to generate a list of recent matches for each player. Through a series of calls to the Riot API using the Python package Riot-Watcher, I populated a Pandas DataFrame of slightly under 10,000 rows with the most recent ranked League of Legends games played by the top 100 players in each of the five regions that make up the largest amount of the League of Legends player base. At a glance, the DataFrame looks something like this:
我的解決方案是使用召喚者名稱(用戶名)列表為每個玩家生成最近的比賽列表。 通過使用Python軟件包Riot-Watcher對Riot API的一系列調用,我為一個熊貓行DataFrame填充了略少于10,000行的數據,其中包括五個區域中每個區域的前100名玩家所玩的最新排名的英雄聯盟游戲最多的英雄聯盟玩家群。 乍一看,DataFrame看起來像這樣:

In the first seven columns, a 0 indicated ‘False’ and a 1 indicated ‘True’, while in the later columns, the data encoded in the cell indicated the number of times that event occurred. Each row contained the stats of one team in a League of Legends ranked match. For example, in the first row, the team that did not acquire any objectives first and at all lost the overall game.
在前七個列中,0表示“ False”,而1表示“ True”,而在后面的列中,在單元格中編碼的數據表示事件發生的次數。 每行包含英雄聯盟排名比賽中一支球隊的數據。 例如,在第一行中,首先沒有獲得任何目標的團隊根本就輸掉了整個比賽。
利用熱圖和PCA進行探索性數據分析 (Exploratory Data Analysis with Heat Map and PCA)
I first found that around 91% of winning teams destroyed the first inhibitor, 80% killed the first baron, 70% destroyed the first tower, 63% killed the first dragon, and 59% of winning teams began the game with First Blood. Already, it seemed like the most important win condition is destroying the first inhibitor, which makes sense, as destroying a team’s inhibitor puts pressure on their base and allows the opposing team to have more map control.
我首先發現,大約91%的獲勝團隊摧毀了第一個阻礙者,80%殺死了第一只男爵,70%摧毀了第一座塔,63%殺死了第一只龍,59%的獲勝團隊開始了First Blood游戲。 似乎最重要的獲勝條件是摧毀第一個抑制器,這是有道理的,因為破壞團隊的抑制器會給他們的基礎施加壓力,并允許對方的團隊擁有更多的地圖控制權。
Next, I visualized the correlation across columns in my dataset:
接下來,我可視化數據集中各列之間的相關性:

I also pulled up the same correlation heat maps for each individual region represented in my data to compare correlations across different regions, hoping to notice some differences in play styles. Generally though, the correlation matrices looked very alike each other. A possible reason for this is that my data included matches played by the best players of each region, many of whom play on a professional level. Therefore, since good gameplay practices are consistent among the competitive community, the matches represented in my data involve players who navigate each game similarly relative to lower ranked players of each region.
我還為數據中表示的每個單獨區域繪制了相同的相關熱圖,以比較不同區域之間的相關性,希望注意到游戲風格上的一些差異。 通常,盡管相關矩陣看起來彼此非常相似。 造成這種情況的可能原因是,我的數據包括每個地區的最佳球員所打的比賽,其中許多人都是職業球員。 因此,由于良好的游戲習慣在競爭社區之間是一致的,因此我數據中所代表的比賽涉及相對于每個地區的排名較低的玩家相似地瀏覽每個游戲的玩家。
I was now curious to see how well the variance in the data could be explained by fewer features than the ten I would be using to predict the outcome of a game. To that extent, I performed a Principal Component Analysis to understand how many features I could simplify my data into and still preserve most of the variance:
我現在很想知道,用比我用來預測游戲結果的十個特征更少的特征可以很好地解釋數據的差異。 在那種程度上,我進行了主成分分析,以了解我可以將數據簡化為多少并仍然保留大部分差異的功能:

Over 80% of the variance in the ten predictor columns could be explained by half the amount of features. This was definitely interesting, and by associating each component with the original dataset’s columns, I hoped to understand which features were the most important in explaining the variance of the data, which could help me figure out which columns were most critical to whether or not a team would win.
十個預測變量列中超過80%的方差可以用特征量的一半來解釋。 這絕對很有趣,并且通過將每個組件與原始數據集的列相關聯,我希望了解哪些功能在解釋數據差異時最重要,這可以幫助我確定哪些列對于團隊會贏。

The components that were used to generate the above heat map were from a PCA object with six components, as I wanted the components to explain more than 90% of the variance in the data. It appeared that the number of tower kills, inhibitor kills, and whether or not a team destroyed the first inhibitor were the most important features in determining variance in the data, as the first component explained 40% of the variance and the three aforementioned columns were weighted the most for this component.
用于生成上述熱圖的組件來自具有六個組件的PCA對象,因為我希望這些組件能夠解釋數據中90%以上的方差。 在確定數據差異時,塔式殺傷,抑制劑殺傷的數量以及團隊是否破壞了第一個抑制劑似乎是決定數據差異的最重要特征,因為第一部分解釋了差異的40%,而上述三列為該組件權重最大。
To reiterate the insights I had gathered at this point:
為了重申我在這一點上收集到的見解:
- From my correlation heat map, whether or not a team destroyed the first inhibitor, how many tower kills a team had, and how many inhibitors a team had destroyed all had the highest correlation with winning. 從我的相關性熱圖中,一個團隊是否消滅了第一個阻礙者,一個團隊殺死了多少塔樓殺手以及一個團隊消滅了多少個阻礙者都與獲勝相關性最高。
- From my PCA analysis, whether or not a team destroyed the first inhibitor, how many tower kills a team had, and how many inhibitors a team had destroyed played the largest role in explaining the variance in the data. 根據我的PCA分析,一個團隊是否銷毀了第一個抑制器,一個團隊殺死了多少塔樓殺手以及一個團隊銷毀了多少個抑制器在解釋數據差異方面發揮了最大作用。
Logistic回歸的數據建模 (Data Modeling with Logistic Regression)
I used a Logistic Regression model to understand the win conditions for a ranked match of League of Legends. My process was to first split my data into a set of features and a set of targets, where my features were all the columns except for the ‘win’ and ‘region’ columns, and my target was the ‘win’ column. I then split my data into a train set and a test set, ran them through a Logistic Regression model, and checked the classification report and confusion matrix to ensure a relatively strong predictive ability. When the Logistic Regression model was run on the overall dataset, the model’s precision and recall were .86 and .85 respectively.
我使用Logistic回歸模型來了解英雄聯盟排名比賽的獲勝條件。 我的過程是首先將數據分為一組功能和一組目標,其中我的功能是除“ win”和“ region”列之外的所有列,而我的目標是“ win”列。 然后,我將數據分為訓練集和測試集,并通過Logistic回歸模型進行了分析,并檢查了分類報告和混淆矩陣,以確保具有較強的預測能力。 在整體數據集上運行Logistic回歸模型時,該模型的精度和召回率分別為0.86和.85。
From here, I performed Logistic Regression on subsets of the data that included only one region, such as matches that were only played in NA, BR, etc., and recorded the model’s coefficients in a Pandas DataFrame. This DataFrame was then visualized so I could compare the different regions:
從這里開始,我對僅包含一個區域的數據子集(例如僅在NA,BR等中進行的比賽)執行了Logistic回歸,并將模型的系數記錄在Pandas DataFrame中。 然后將此DataFrame可視化,因此我可以比較不同的區域:

Regression coefficients describe the relationship between a predictor variable and the target variable. For example, when looking at the First Blood predictor variable above, a team getting First Blood was a moderate predictor for the outcome of the game, as a team that achieves First Blood is more likely to win. On the other hand, Rift Herald Kills were actually related in the opposite direction (except for EUNE), and teams that get more Rift Herald Kills are more likely to lose.
回歸系數描述了預測變量和目標變量之間的關系。 例如,當查看上面的“第一血液”預測變量時,獲得“第一血液”的團隊是比賽結果的中度預測因子,因為獲得“第一血液”的團隊更有可能獲勝。 另一方面,Rift Herald Kills實際上是相反的方向(EUNE除外),獲得更多Rift Herald Kills的球隊更有可能輸掉比賽。
Using this analytical process, I understood which columns were more predictive of a win, helping me answer my question regarding win conditions in a game of League of Legends.
通過這種分析過程,我了解了哪些列更能預測獲勝,從而幫助我回答了有關英雄聯盟游戲中獲勝條件的問題。
結論 (Conclusion)
As a result of my project, here are the conclusions I made:
作為我的項目的結果,以下是我得出的結論:
- In order of greatest to least, First Inhibitor, First Tower, and Tower Kills were the most important win conditions across the dataset, according to my Logistic Regression model. 根據我的邏輯回歸模型,從最大到最小的順序,First Inhibitor,First Tower和Tower Kills是整個數據集中最重要的獲勝條件。
- In order from greatest to least, Tower Kills, First Inhibitor, and Inhibitor Kills were the most important win conditions across the dataset, according to my correlation heat map. 根據我的相關熱圖,從最大到最小的順序,塔式殺手,第一抑制劑和抑制劑殺手是整個數據集中最重要的獲勝條件。
- Although NA and EUW teams that get the first baron were more likely to win, teams in these regions were more likely to lose with increasing numbers of baron kills. 盡管獲得第一名男爵的NA和EUW球隊更有可能獲勝,但隨著男爵殺人次數的增加,這些地區的球隊更有可能輸掉比賽。
- The fact that teams in NA were more likely to win off a First Dragon compared to other regions perhaps indicates that games in NA were more prone to snowballing (when a team expands on a small advantage over the game to win) from dragon buffs and fights around dragon. 與其他地區相比,北美地區的球隊更有可能贏得“第一龍”冠軍,這可能表明北美地區的比賽更容易因打龍和打架而滾雪球(當一支球隊擴大了對比賽的優勢時)在龍周圍。
- KR games weren’t unevenly impacted by one feature. This could indicate that KR players understand how to play from behind better than players in other regions, prompting a team to win off a combination of objectives more often than in other regions. KR游戲并不受一項功能的影響。 這可能表明KR玩家比其他地區的玩家更了解如何從背后進行比賽,這促使團隊比其他地區的玩家更經常實現目標組合。
If there are any other interesting observations you think I missed out on, let us know in the comments!
如果您認為我錯過了其他有趣的觀察,請在評論中告訴我們!
The GitHub repository that contains my code and the dataset I put together for this analysis can be found here.
可以在此處找到包含我的代碼和為分析而放在一起的數據集的GitHub存儲庫。
翻譯自: https://towardsdatascience.com/league-of-legends-win-conditions-db139f1ed6ca
srpg 勝利條件設定
本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。 如若轉載,請注明出處:http://www.pswp.cn/news/388862.shtml 繁體地址,請注明出處:http://hk.pswp.cn/news/388862.shtml 英文地址,請注明出處:http://en.pswp.cn/news/388862.shtml
如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!