library(tidyverse) #パス成功率 # CSVファイルの読み込み df_epv <- read_csv("~/Desktop/logs/epv2base30half/pass_prob.csv") |> select(pass_success_rate) |> rename(epv = pass_success_rate) df_base <- read_csv("~/Desktop/logs/base2base30half/pass_prob.csv") |> select(pass_success_rate) |> rename(base = pass_success_rate) # データフレームの結合 df <- bind_cols(df_epv, df_base) long_data <- df %>% gather(key = "Category", value = "Value", epv, base) p <- long_data %>% ggplot(aes(x = Category, y = Value)) + geom_boxplot() + scale_x_discrete(labels = c("HELIOS Base", "EPVエージェント")) + scale_y_continuous(limits = c(0.65, 1)) + stat_summary(fun = mean, geom = "point", shape = 20, size = 3, color = "red") + xlab("エージェント") + ylab("パス成功率") ggsave("prob.pdf", p, device = cairo_pdf, width = 3, height = 3) # ボール保持率 # CSVファイルの読み込み df_epv <- read_csv("~/Desktop/logs/epv2base30half/EPV.csv") |> select(our_possession) |> rename(epv = our_possession) df_base <- read_csv("~/Desktop/logs/base2base30half/HELIOS_base.csv") |> select(our_possession) |> rename(base = our_possession) # データフレームの結合 df <- bind_cols(df_epv, df_base) long_data <- df %>% gather(key = "Category", value = "Value", epv, base) p <- long_data %>% ggplot(aes(x = Category, y = Value)) + geom_boxplot() + scale_x_discrete(labels = c("HELIOS Base", "EPVエージェント")) + scale_y_continuous(limits = c(0.3, 0.9)) + stat_summary(fun = mean, geom = "point", shape = 20, size = 3, color = "red") + xlab("エージェント") + ylab("ボール保持率") ggsave("possession.pdf", p, device = cairo_pdf, width = 3, height = 3) # 得点 # CSVファイルの読み込み df_epv <- read_csv("~/Desktop/logs/epv2base30half/EPV.csv") |> select(our_point) |> rename(epv = our_point) df_base <- read_csv("~/Desktop/logs/base2base30half/HELIOS_base.csv") |> select(our_point) |> rename(base = our_point) # データフレームの結合 df <- bind_cols(df_epv, df_base) long_data <- df %>% gather(key = "Category", value = "Value", epv, base) p <- long_data %>% ggplot(aes(x = Category, y = Value)) + geom_boxplot() + scale_x_discrete(labels = c("HELIOS Base", "EPVエージェント")) + scale_y_continuous(limits = c(0, 4.5)) + stat_summary(fun = mean, geom = "point", shape = 20, size = 3, color = "red") + xlab("エージェント") + ylab("得点") ggsave("point.pdf", p, device = cairo_pdf, width = 3, height = 3) # 失点 # CSVファイルの読み込み df_epv <- read_csv("~/Desktop/logs/epv2base30half/EPV.csv") |> select(opp_point) |> rename(epv = opp_point) df_base <- read_csv("~/Desktop/logs/base2base30half/HELIOS_base.csv") |> select(opp_point) |> rename(base = opp_point) # データフレームの結合 df <- bind_cols(df_epv, df_base) long_data <- df %>% gather(key = "Category", value = "Value", epv, base) p <- long_data %>% ggplot(aes(x = Category, y = Value)) + geom_boxplot() + scale_x_discrete(labels = c("HELIOS Base", "EPVエージェント")) + scale_y_continuous(limits = c(0, 4.5)) + stat_summary(fun = mean, geom = "point", shape = 20, size = 3, color = "red") + xlab("エージェント") + ylab("失点") ggsave("opp_point.pdf", p, device = cairo_pdf, width = 3, height = 3)