\name{karpov_kasparov_anand}
\alias{karpov_kasparov_anand}
\alias{kka}
\alias{chess3}
\alias{chess3_maxp}
\alias{kka_3draws}
\alias{kka_3whites}
\alias{white_wins}
\alias{drawn_games}
\alias{black_wins}
\alias{plays_white_wins}
\alias{plays_white_draws}
\alias{plays_white_loses}
\alias{kka_array}
\docType{data}
\title{Karpov, Kasparov, Anand}
\description{
  Data of three chess players: Karpov, Kasparov, and Anand.  Includes
  two likelihood functions for the strengths of the players, and an
  array of game results
}

\details{

  (there are three chess datasets in the package, documented at
  \code{interzonal.Rd} [the 1963 World championship], \code{kka.Rd}
  [Karpov-Kasparov-Anand dataset], and \code{chess.Rd}
  [rock-paper-scissors using Topalov-Anand-Karpov])

  The strengths of chess players may be assessed using the generalized
  Bradley-Terry model.  The \code{karpov_kasparov_anand} \code{hyper2}
  likelihood function allows one to estimate the players' strengths,
  propensity to draw, and also the additional strength conferred by
  playing white as personified by a draw monster and a white monster
  \code{draw} and \code{white} respectively.

  Object \code{karpov_kasparov_anand} assumes that the draw potential
  is the same for all three players; likelihood function
  \code{kka_3draws} allows the propensity to draw to differ between
  the three players.

  The reason that the players are different from those in the
  \code{chess} dataset is that the original data does not seem to be
  available any more.

  Dataset \code{kka} refers to scorelines of matches between three
  chess players (Kasparov, Karpov, Anand).  It is a named numeric
  vector with names such as
  \sQuote{\code{karpov_plays_white_beats_kasparov}} which has value
  18: we have a total of 18 games between Karpov and Kasparov in which
  Karpov played white and beat Kasparov.

  Object \code{chess3} is a simple \code{hyper3} object corresponding
  to pairwise comparison with draws; \code{chess3_maxp} is the
  evaluate, conditional on the estimated white-player advantage and
  draw proclivity.  This object is created and discussed in
  \code{inst/kka.Rmd}.  Array \code{kka_array} presents the same
  information in a 3D array.

  All data drawn from \code{https://www.chessgames.com} (search for
  \dQuote{Kasparov vs Karpov}, etc).  Note that the database allows one
  to sort by white wins or black wins (there is a \sQuote{refine search}
  tab at the bottom).  Some searches have more than one page of results.
  Numbers here downloaded 17 February 2019.  Note that only
  \sQuote{classical games} are considered here (rapid and exhibition
  games being ignored).

  These objects can be generated by running script
  \code{inst/kka.Rmd}, which includes some further discussion and
  technical documentation and creates file \code{kka.rda} which
  resides in the \code{data/} directory.

}
\seealso{\code{\link{chess}}}
\examples{
karpov_kasparov_anand
# pie(maxp(karpov_kasparov_anand))  # takes ~10s

M <- kka_array[,,1] + 1i*kka_array[,,3]
home_away(M)
home_away3(M,lambda=1.2)


}
\keyword{datasets}
