Learn R Programming

chess2plyrs

chess2plyrs is an Rpackage which allows to create a chess game and add moves, verify the status of the game and list the legal moves, as well as read and write FENs. It is also possible to plot the current board position.

Installation

You can install the development version of chess2plyrs from GitHub with:

# install.packages("devtools")
devtools::install_github("Luigi-Annic/chess2plyrs")

Appendix

Known potential issues and future improvements:

  1. pawn promotion is automatically to Queen at the moment. In a future release, auto-promotion will be removed
  2. in some cases related to checks with pawns, potential legal en passant moves might be not detected as legal. This may happen in an extremely rare number of cases, but will be nonetheless fixed soon
  3. FEN are only considering the first two elements (position and turn), ignoring castle information. This will also be fixed soon

In case you find any additional bugs or if you have any suggestion, feel free to post relevant information to GitHub!

Copy Link

Version

Install

install.packages('chess2plyrs')

Monthly Downloads

132

Version

0.3.0

License

GPL-3

Maintainer

Luigi Annicchiarico

Last Published

June 2nd, 2025

Functions in chess2plyrs (0.3.0)

legalmoves

legalmoves
newgame

newgame
chess_move

chess_move
engine1

engine1
all_possibilities

all_possibilities
chess2plyrs-package

chess2plyrs: Chess Game Creation and Tools
chesstools

chesstools
writefen

writefen
takeback

takeback
chessplot

chessplot
readfen

readfen
random_mover

random_mover
game_result

game_result
engine2

engine2
moves_scoresheet

moves_scoresheet
get_minimax_move

get_minimax_move