Rsgf: Example Go Period Reports for playerCard() Function

https://bcable.net/x/Rsgf

library(Rsgf)
library(ggplot2)
library(grid)
library(pander)
library(plot3D)
library(png)
library(rmarkdown)

https://bcable.net/x/Rproj/shared

source("shared/Rsgf_board_funcs.R")

Using GoGoDSpring2018 database

sgf_path <- path.expand("~/SGF/Database/GoGoDSpring2018")
source("shared/Rsgf_GoGoD_file_paths.R")
period_FUNs <- c(
    function(moves){ moves },
    function(moves){ moves[moves$Move.Number < 5,] },
    function(moves){ moves[moves$Move.Number < 11,] },
    function(moves){ moves[moves$Move.Number < 21,] },
    function(moves){ moves[moves$Move.Number > 20 & moves$Move.Number < 51,] }
)

Pre-Edo Period Games Heatmap

length(file_names_preedo)
## [1] 227
ret <- loop_data_graphs(file_names_preedo, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_preedo.png")

plot of chunk preedo_graph_all

board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_preedo.png")
period_graph(ret[[2]], "plot_heatmap_open4_preedo.png")

plot of chunk preedo_graph_open4

board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_preedo.png")
period_graph(ret[[3]], "plot_heatmap_open10_preedo.png")

plot of chunk preedo_graph_open10

board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_preedo.png")
period_graph(ret[[4]], "plot_heatmap_open20_preedo.png")

plot of chunk preedo_graph_open20

board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_preedo.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_preedo.png")

plot of chunk preedo_graph_mid2050

board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_preedo.png")

Edo Period Games Heatmap

length(file_names_edo)
## [1] 3866
ret <- loop_data_graphs(file_names_edo, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_edo.png")

plot of chunk edo_graph_all

board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_edo.png")
period_graph(ret[[2]], "plot_heatmap_open4_edo.png")

plot of chunk edo_graph_open4

board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_edo.png")
period_graph(ret[[3]], "plot_heatmap_open10_edo.png")

plot of chunk edo_graph_open10

board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_edo.png")
period_graph(ret[[4]], "plot_heatmap_open20_edo.png")

plot of chunk edo_graph_open20

board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_edo.png")

Igo Is A Fractal Into The Abyss

period_graph(ret[[5]], "plot_heatmap_mid2050_edo.png")

plot of chunk edo_graph_mid2050

board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_edo.png")

Meiji Period Games Heatmap

length(file_names_meiji)
## [1] 1432
ret <- loop_data_graphs(file_names_meiji, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_meiji.png")

plot of chunk meiji_graph_all

board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_meiji.png")
period_graph(ret[[2]], "plot_heatmap_open4_meiji.png")

plot of chunk meiji_graph_open4

board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_meiji.png")
period_graph(ret[[3]], "plot_heatmap_open10_meiji.png")

plot of chunk meiji_graph_open10

board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_meiji.png")
period_graph(ret[[4]], "plot_heatmap_open20_meiji.png")

plot of chunk meiji_graph_open20

board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_meiji.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_meiji.png")

plot of chunk meiji_graph_mid2050

board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_meiji.png")

Taisho Period Games Heatmap

length(file_names_taisho)
## [1] 865
ret <- loop_data_graphs(file_names_taisho, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_taisho.png")

plot of chunk taisho_graph_all

board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_taisho.png")
period_graph(ret[[2]], "plot_heatmap_open4_taisho.png")

plot of chunk taisho_graph_open4

board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_taisho.png")
period_graph(ret[[3]], "plot_heatmap_open10_taisho.png")

plot of chunk taisho_graph_open10

board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_taisho.png")
period_graph(ret[[4]], "plot_heatmap_open20_taisho.png")

plot of chunk taisho_graph_open20

board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_taisho.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_taisho.png")

plot of chunk taisho_graph_mid2050

board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_taisho.png")

Showa Period Games Heatmap

length(file_names_showa)
## [1] 22835
ret <- loop_data_graphs(file_names_showa, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_showa.png")

plot of chunk showa_graph_all

board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_showa.png")
period_graph(ret[[2]], "plot_heatmap_open4_showa.png")

plot of chunk showa_graph_open4

board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_showa.png")
period_graph(ret[[3]], "plot_heatmap_open10_showa.png")

plot of chunk showa_graph_open10

board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_showa.png")
period_graph(ret[[4]], "plot_heatmap_open20_showa.png")

plot of chunk showa_graph_open20

board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_showa.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_heisei.png")

plot of chunk showa_graph_mid2050

board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_showa.png")

Heisei Period Games Heatmap

length(file_names_heisei)
## [1] 66379
ret <- loop_data_graphs(file_names_heisei, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_heisei.png")

plot of chunk heisei_graph_all

board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_heisei.png")
period_graph(ret[[2]], "plot_heatmap_open4_heisei.png")

plot of chunk heisei_graph_open4

board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_heisei.png")
period_graph(ret[[3]], "plot_heatmap_open10_heisei.png")

plot of chunk heisei_graph_open10

board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_heisei.png")
period_graph(ret[[4]], "plot_heatmap_open20_heisei.png")

plot of chunk heisei_graph_open20

board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_heisei.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_heisei.png")

plot of chunk heisei_graph_mid2050

board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_heisei.png")