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,] }
)
length(file_names_preedo)
## [1] 227
ret <- loop_data_graphs(file_names_preedo, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_preedo.png")
board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_preedo.png")
period_graph(ret[[2]], "plot_heatmap_open4_preedo.png")
board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_preedo.png")
period_graph(ret[[3]], "plot_heatmap_open10_preedo.png")
board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_preedo.png")
period_graph(ret[[4]], "plot_heatmap_open20_preedo.png")
board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_preedo.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_preedo.png")
board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_preedo.png")
length(file_names_edo)
## [1] 3866
ret <- loop_data_graphs(file_names_edo, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_edo.png")
board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_edo.png")
period_graph(ret[[2]], "plot_heatmap_open4_edo.png")
board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_edo.png")
period_graph(ret[[3]], "plot_heatmap_open10_edo.png")
board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_edo.png")
period_graph(ret[[4]], "plot_heatmap_open20_edo.png")
board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_edo.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_edo.png")
board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_edo.png")
length(file_names_meiji)
## [1] 1432
ret <- loop_data_graphs(file_names_meiji, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_meiji.png")
board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_meiji.png")
period_graph(ret[[2]], "plot_heatmap_open4_meiji.png")
board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_meiji.png")
period_graph(ret[[3]], "plot_heatmap_open10_meiji.png")
board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_meiji.png")
period_graph(ret[[4]], "plot_heatmap_open20_meiji.png")
board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_meiji.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_meiji.png")
board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_meiji.png")
length(file_names_taisho)
## [1] 865
ret <- loop_data_graphs(file_names_taisho, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_taisho.png")
board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_taisho.png")
period_graph(ret[[2]], "plot_heatmap_open4_taisho.png")
board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_taisho.png")
period_graph(ret[[3]], "plot_heatmap_open10_taisho.png")
board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_taisho.png")
period_graph(ret[[4]], "plot_heatmap_open20_taisho.png")
board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_taisho.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_taisho.png")
board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_taisho.png")
length(file_names_showa)
## [1] 22835
ret <- loop_data_graphs(file_names_showa, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_showa.png")
board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_showa.png")
period_graph(ret[[2]], "plot_heatmap_open4_showa.png")
board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_showa.png")
period_graph(ret[[3]], "plot_heatmap_open10_showa.png")
board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_showa.png")
period_graph(ret[[4]], "plot_heatmap_open20_showa.png")
board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_showa.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_heisei.png")
board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_showa.png")
length(file_names_heisei)
## [1] 66379
ret <- loop_data_graphs(file_names_heisei, period_FUNs)
period_graph(ret[[1]], "plot_heatmap_all_heisei.png")
board_plot3d(ret[[1]], "images/analysis/Rsgf_period_cards/plot_plot3d_all_heisei.png")
period_graph(ret[[2]], "plot_heatmap_open4_heisei.png")
board_plot3d(ret[[2]], "images/analysis/Rsgf_period_cards/plot_plot3d_open4_heisei.png")
period_graph(ret[[3]], "plot_heatmap_open10_heisei.png")
board_plot3d(ret[[3]], "images/analysis/Rsgf_period_cards/plot_plot3d_open10_heisei.png")
period_graph(ret[[4]], "plot_heatmap_open20_heisei.png")
board_plot3d(ret[[4]], "images/analysis/Rsgf_period_cards/plot_plot3d_open20_heisei.png")
period_graph(ret[[5]], "plot_heatmap_mid2050_heisei.png")
board_plot3d(ret[[5]], "images/analysis/Rsgf_period_cards/plot_plot3d_mid2050_heisei.png")