Skip to content

shrumo/rbgcpp2py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

87b9bb3 · Apr 18, 2020

History

16 Commits
Mar 14, 2020
Mar 30, 2020
Mar 30, 2020
Mar 30, 2020
Mar 30, 2020
Mar 30, 2020
Mar 15, 2020
Apr 18, 2020
Mar 30, 2020
Mar 27, 2020

Repository files navigation

rbgcpp2py

Regular Boardgames (rbg) is a language that allows one to define an arbitrary boardgame. The language syntax is defined in https://arxiv.org/abs/1706.02462.

This is a library to translate rbg games into python libraries, that can efficiently calculate the available moves of the game.

Running the code

For example to calculate perft for chess do:

./scripts/create_game_library.sh rbg2cpp/rbgParser/examples/chess.rbg
python3 # The next commands will be in python
import rbg_game
import utils
state = rbg_game.new_game_state()
utils.perft(state,4)

Documentation

The best place listing possible method of the rbg modules is the help of rbg_game modu le. To find it do:

./scripts/create_game_library.sh rbg2cpp/rbgParser/examples/chess.rbg
python3
import rbg_game
help(rbg_game)

Dependencies

  • cmake (sudo apt install cmake)
  • boost (sudo apt install libboost-dev)
  • python-dev (sudo apt install python3-dev)

Tests

To run tests do:

./scripts/test.sh

About

Compiling rbg games to python libraries.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published