绝地求生鸡魔最强攻略!内附170行Python代码!

喜欢的妹子玩吃鸡经历了落地3分钟就被毙、跑不过毒倒在半路上失血致死、站在草丛中被不明方向的子弹狙击而亡怎么办?

还能怎么办——当然要用毕生所学解救她!

第1则到底跳哪里最安全

跳哪里一直都是个比较纠结的问题,跳得好既可以获得充足的武器和物资,又可以提高生存概率,当然最幸运的莫过成为“天选之子”。

在筛选了46万条玩家在游戏开局3分钟内就被干掉的数据,我把它画了出来。

▲绝地海岛艾伦格地图

图中越红的地方,就是开局3分钟死亡人数最多的地方。可以看到,Rozhok和学校附近、军事基地周围,由于物资丰富跳的人数众多,是开局死亡发生率最高的地方,再者是Bunkers和Crater附近、Georgopol和医院附近、GunRange附近。

▲热情沙漠米拉玛地图

如果想提高存活率(想要练技术的除外),特别是新手,还是避开这些地方跳好一些。

毕竟比起一落地还没找到枪,就被先找到枪的人干掉了,我还是更倾向于好好跟队友一起跳个安全一点的地儿,好好找枪,毒来了就开着小车慢悠悠地欣赏路上的风光。

划重点:Pecado、San Martin、Power Grid区域,是开局最危险的区域。

附:代码如下

1import numpy as np

2import matplotlib.pyplot as plt

3import pandas as pd

4import seaborn as sns

5from scipy.misc.pilutil import imread

6import matplotlib.cm as cm

7

8#导入部分数据

9deaths1 = pd.read_csv("deaths/kill_match_stats_final_0.csv")

10deaths2 = pd.read_csv("deaths/kill_match_stats_final_1.csv")

11

12deaths = pd.concat([deaths1, deaths2])

13

14#打印前5列,理解变量

15print (deaths.head(),'\n',len(deaths))

16

17#两种地图

18miramar = deaths[deaths["map"] == "MIRAMAR"]

19erangel = deaths[deaths["map"] == "ERANGEL"]

20

21#开局前100秒死亡热力图

22position_data = ["killer_position_x","killer_position_y","victim_position_x","victim_position_y"]

23for position in position_data:

24 miramar[position] = miramar[position].apply(lambda x: x*1000/800000)

25 miramar = miramar[miramar[position] != 0]

26

27 erangel[position] = erangel[position].apply(lambda x: x*4096/800000)

28 erangel = erangel[erangel[position] != 0]

29

30n = 50000

31mira_sample = miramar[miramar["time"] < 100].sample(n)

32eran_sample = erangel[erangel["time"] < 100].sample(n)

33

34# miramar热力图

35bg = imread("miramar.jpg")

36fig, ax = plt.subplots(1,1,figsize=(15,15))

37ax.imshow(bg)

38sns.kdeplot(mira_sample["victim_position_x"], mira_sample["victim_position_y"],n_levels=100, cmap=cm.Reds, alpha=0.9)

39

40# erangel热力图

41bg = imread("erangel.jpg")

42fig, ax = plt.subplots(1,1,figsize=(15,15))

43ax.imshow(bg)

44sns.kdeplot(eran_sample["victim_position_x"], eran_sample["victim_position_y"],

第2则

我是该苟着不动

还是应该出去猛干

那是不是有一直都安全的区域?找完武器之后直接躲起来行不行?

冷静!我们来看看图好吗?

这是一张击杀人数与吃鸡概率的关系图,可以清楚看到,吃鸡的概率跟干掉的人数是呈正比关系的,想要获得30%以上的吃鸡概率需要最少干掉7个人,干掉10个人的吃鸡概率是50%,干掉15个人的吃鸡概率是75%。

因此,如果想要天天吃鸡,在一个地方躲着不出来是不可能的。多点练习多提高击杀技术才是上策。

附:代码如下

1library(dplyr)

2library(tidyverse)

3library(data.table)

4library(ggplot2)

5pubg_full <- fread("../agg_match_stats.csv")

6# 吃鸡团队平均击杀敌人的数量

7attach(pubg_full)

8pubg_winner <- pubg_full %>% filter(team_placement==1&party_size<4&game_size>90)

9detach(pubg_full)

10team_killed <- aggregate(pubg_winner$player_kills, by=list(pubg_winner$match_id,pubg_winner$team_id), FUN="mean")

11team_killed$death_num <- ceiling(team_killed$x)

12ggplot(data = team_killed) + geom_bar(mapping = aes(x = death_num, y = ..count..), color="steelblue") +

13 xlim(0,70) + labs(title = "Number of Death that PUBG Winner team Killed", x="Number of death")

14

15# 吃鸡团队最后存活的玩家击杀数量

16pubg_winner <- pubg_full %>% filter(pubg_full$team_placement==1) %>% group_by(match_id,team_id)

17attach(pubg_winner)

18team_leader <- aggregate(player_survive_time~player_kills, data = pubg_winner, FUN="max")

19detach(pubg_winner)

20

21# 吃鸡团队中击杀敌人最多的数量

22pubg_winner <- pubg_full %>% filter(pubg_full$team_placement==1&pubg_full$party_size>1)

23attach(pubg_winner)

24team_leader <- aggregate(player_kills, by=list(match_id,team_id), FUN="max")

25detach(pubg_winner)

26ggplot(data = team_leader) + geom_bar(mapping = aes(x = x, y = ..count..), color="steelblue") +

27 xlim(0,70) + labs(title = "Number of Death that PUBG Winner Killed", x="Number of death")

第3则

哪种武器干掉的人比较多

运气好挑到好武器的时候,你是否犹豫选择哪一件?

从海岛和沙漠两张地图,击杀人数最多的10中武器统计图中可以看到,不论是在海岛还是沙漠,M416自动步枪都高居榜首,接着是自动步枪SCAR-L、M16A4、AKM。击杀排前四的都是自动步枪,5.56毫米子弹独步天下呀。第五名是UMP9冲锋枪,第六名是S1897霰弹枪。

1#杀人武器排名

2death_causes = deaths['killed_by'].value_counts()

3

4sns.set_context('talk')

5fig = plt.figure(figsize=(30, 10))

6ax = sns.barplot(x=death_causes.index, y=[v / sum(death_causes) for v in death_causes.values])

7ax.set_title('Rate of Death Causes')

8ax.set_xticklabels(death_causes.index, rotation=90)

9

10#排名前20的武器

11rank = 20

12fig = plt.figure(figsize=(20, 10))

13ax = sns.barplot(x=death_causes[:rank].index, y=[v / sum(death_causes) for v in death_causes[:rank].values])

14ax.set_title('Rate of Death Causes')

15ax.set_xticklabels(death_causes.index, rotation=90)

16

17#两个地图分开取

18f, axes = plt.subplots(1, 2, figsize=(30, 10))

19axes[0].set_title('Death Causes Rate: Erangel (Top {})'.format(rank))

20axes[1].set_title('Death Causes Rate: Miramar (Top {})'.format(rank))

21

22counts_er = erangel['killed_by'].value_counts()

23counts_mr = miramar['killed_by'].value_counts()

24

25sns.barplot(x=counts_er[:rank].index, y=[v / sum(counts_er) for v in counts_er.values][:rank], ax=axes[0] )

26sns.barplot(x=counts_mr[:rank].index, y=[v / sum(counts_mr) for v in counts_mr.values][:rank], ax=axes[1] )

27axes[0].set_ylim((0, 0.20))

28axes[0].set_xticklabels(counts_er.index, rotation=90)

29axes[1].set_ylim((0, 0.20))

30axes[1].set_xticklabels(counts_mr.index, rotation=90)

31

32#吃鸡和武器的关系

33win = deaths[deaths["killer_placement"] == 1.0]

34win_causes = win['killed_by'].value_counts()

35

36sns.set_context('talk')

37fig = plt.figure(figsize=(20, 10))

38ax = sns.barplot(x=win_causes[:20].index, y=[v / sum(win_causes) for v in win_causes[:20].values])

39ax.set_title('Rate of Death Causes of Win')

40ax.set_xticklabels(win_causes.index, rotation=90)

第4则

队友的助攻是否助我吃鸡?

这里选择成功吃鸡的队伍,最终接受 1 次帮助的成员所在的团队吃鸡的概率为 29%。

助攻次数跟吃鸡概率也是成正比关系的,5次助攻吃鸡概率为50%,助攻11次以上锁定吃鸡。

所以说猪队友很重要。

附:代码如下

1library(dplyr)

2library(tidyverse)

3library(data.table)

4library(ggplot2)

5pubg_full <- fread("E:/aggregate/agg_match_stats_0.csv")

6attach(pubg_full)

7pubg_winner <- pubg_full %>% filter(team_placement==1)

8detach(pubg_full)

9ggplot(data = pubg_winner) + geom_bar(mapping = aes(x = player_assists, y = ..count..), fill="#E69F00") +

10 xlim(0,10) + labs(title = "Number of Player assisted", x="Number of death")

11ggplot(data = pubg_winner) + geom_bar(mapping = aes(x = player_assists, y = ..prop..), fill="#56B4E9") +

12 xlim(0,10) + labs(title = "Number of Player assisted", x="Number of death")

第5则毒来了我跑不过毒怎么办

在后面的死因分析中发现,玩家死于Bluezone也是一个很高的死因,也就是被毒死了。

纯靠跑很多时候是跑不过毒的。

有车一族真的可以很帅气!看上图,没有搭乘过车辆的吃鸡概率是0.007,而搭乘过车辆的吃鸡概率是0.058。也就是说,有车可以把吃鸡概率提高8倍!

从上图也可以看到,吃鸡概率一开始随着搭乘距离上升,搭乘8-9千米的车,吃鸡概率是最高的(绝地海岛艾伦格地图的长宽都是8千米)。大于9千米概率下降,说明车是个明显的移动目标,在车上呆久了也不安全,在需要的时候才乘车是最好的。

第6则近战适合使用什么武器?

我们大多数时候面临的都是近战,那么近战什么武器击杀人数最多呢?

▲绝地海岛艾伦格(800万人统计量)

▲热情沙漠米拉玛(176万人统计量)

可以看到,在海岛地图中,霰弹枪S1897取代了自动步枪M416成为击杀人数最多的枪支。接着才是M416、AKM、M16A4、SCAR-L等自动步枪系列,不过在沙漠地图中,M416仍然是近战的主要武器。当然,两个地图中,Punch(拳头)都榜上有名,看来必要的时候,拳头也是不用讲道理滴,哈哈哈。

第7则狙击适合使用什么武器呢?

趴在山上、躲在屋子的窗口里向远方的来客狙击,也是一种很重要的杀敌方式,那么什么武器狙杀的人数最多呢?

▲绝地海岛艾伦格(800米以上狙击距离)

▲热情沙漠米拉玛(800米以上狙击距离)

可以看到,比起近战来说,能够进行800米以外目标狙击的人其实是很少的。在海岛模式中,800米以上距离狙击的主力仍然是AKM等一系列的自动步枪,所以自动步枪会是你的最佳配备。而在沙漠模式中,单发狙Kar98k开始显现自己的威力,名列第一。连发狙中SKS算是最好用的了。

最后,把海岛和沙漠中击杀人数排名前十的武器做了一个800米以内各距离下的击杀百分比面积图,如下,可以说,看明白了这张图,便可以在武器的选择中进行很好的取舍了。

可以看到冲锋枪UMP9、霰弹枪S1897等只适合近战,单发狙Kar98k是远距离狙击的一把好枪。在海岛中,自动步枪M416、M16A4、SCAR-L、AKM适合各种距离作战(前提是配件齐全)。在沙漠中,M416和SCAR-L适合各种距离作战。

第8则最后的毒圈一般会在哪里呢

最后的毒圈会在哪里出现?哪里出现的几率高一点?这样不就可以结合着上面的开局危险区域图,找到一个即安全又有大概率在最后毒圈的地方做“人选之子”躺赢吗?

上图便是每场比赛最后毒圈出现的位置,可以看到,跟上面那张开局危险区域图相比,毒圈出现的位置分散了好多,几乎各个地方都有可能。不过可以看到,在Pochinki East Hill东南方以及北方的山脚下、在Yasnaya Polyana南边等区域,是最后毒圈出现频率最高的区域。

另外可以知道的是,最后的毒圈出现在近海、近河的地方概率比较小,所以如果在临近最后的时候,大圈范围包含了河流、海边的话,那么可以估计最后毒圈应该在河流、海边的反方向。

沙漠最后的决战地也很分散,不过比海岛集中多了。概率比较大的地方有:Los Leones和La Bendita之间的区域、Monte Nuevo和Pecado等区域周围。最外围一大圈公路的周围及外面,基本上不可能是最后的毒圈。所以如果大圈圈到这些地方的话,往里跑就对了。

代码如下:

1#最后毒圈位置

2import matplotlib.pyplot as plt

3import pandas as pd

4import seaborn as sns

5from scipy.misc.pilutil import imread

6import matplotlib.cm as cm

7

8#导入部分数据

9deaths = pd.read_csv("deaths/kill_match_stats_final_0.csv")

10#导入aggregate数据

11aggregate = pd.read_csv("aggregate/agg_match_stats_0.csv")

12print(aggregate.head())

13#找出最后三人死亡的位置

14

15team_win = aggregate[aggregate["team_placement"]==1] #排名第一的队伍

16#找出每次比赛第一名队伍活的最久的那个player

17grouped = team_win.groupby('match_id').apply(lambda t: t[t.player_survive_time==t.player_survive_time.max()])

18

19deaths_solo = deaths[deaths['match_id'].isin(grouped['match_id'].values)]

20deaths_solo_er = deaths_solo[deaths_solo['map'] == 'ERANGEL']

21deaths_solo_mr = deaths_solo[deaths_solo['map'] == 'MIRAMAR']

22

23df_second_er = deaths_solo_er[(deaths_solo_er['victim_placement'] == 2)].dropna()

24df_second_mr = deaths_solo_mr[(deaths_solo_mr['victim_placement'] == 2)].dropna()

25print (df_second_er)

26

27position_data = ["killer_position_x","killer_position_y","victim_position_x","victim_position_y"]

28for position in position_data:

29 df_second_mr[position] = df_second_mr[position].apply(lambda x: x*1000/800000)

30 df_second_mr = df_second_mr[df_second_mr[position] != 0]

31

32 df_second_er[position] = df_second_er[position].apply(lambda x: x*4096/800000)

33 df_second_er = df_second_er[df_second_er[position] != 0]

34

35df_second_er=df_second_er

36# erangel热力图

37sns.set_context('talk')

38bg = imread("erangel.jpg")

39fig, ax = plt.subplots(1,1,figsize=(15,15))

40ax.imshow(bg)

41sns.kdeplot(df_second_er["victim_position_x"], df_second_er["victim_position_y"], cmap=cm.Blues, alpha=0.7,shade=True)

42

43# miramar热力图

44bg = imread("miramar.jpg")

45fig, ax = plt.subplots(1,1,figsize=(15,15))

46ax.imshow(bg)

47sns.kdeplot(df_second_mr["victim_position_x"], df_second_mr["victim_position_y"], cmap=cm.Blues,alpha=0.8,shade=True)

好了,这就总结完了。

为了帮助小伙伴们更好的学习Python,小编整理了Python的相关学习视频及学习路线图,添加学习群【Python学习】即可获取。

猜你喜欢

转载自blog.csdn.net/saltish1/article/details/89312261
今日推荐