library(axelRod)

strats <- defaultStrategies()

fn <- function(x) {
  title <- paste0("# ", x$name, "\n")

  tmp <- strsplit(x$description, "\n")
  description_title <- paste0("**", tmp[[1]][1], "**\n\n")
  description_rules <- paste0(tmp[[1]][2:length(tmp[[1]])], "\n")

  cat(title, description_title, description_rules, "\n---\n\n")
}
for (i in 1:length(strats)) {
  fn(strats[[i]])
}


swarm-lab/axelRod documentation built on May 30, 2019, 9:34 p.m.