diff --git a/Project.toml b/Project.toml index e62c52a..e2f1f92 100644 --- a/Project.toml +++ b/Project.toml @@ -1,15 +1,15 @@ name = "OpenSpiel" uuid = "ceb70bd2-fe3f-44f0-b81f-41608acaf2f2" authors = ["Jun Tian "] -version = "0.2.3" +version = "0.3.0" [deps] CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4" OpenSpiel_jll = "bd10a763-4654-5023-a028-c4918c6cd33e" [compat] -CxxWrap = "0.14, 0.15" -OpenSpiel_jll = "1" +CxxWrap = "0.15" +OpenSpiel_jll = "1.5" julia = "1.6" [extras] diff --git a/README.md b/README.md index a938cce..1219387 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,41 @@ This package provides a Julia wrapper for the [OpenSpiel](https://github.com/deepmind/open_spiel) project. For more details, please refer the [doc](https://openspiel.readthedocs.io/en/latest/julia.html) -For higher level APIs you may refer [ReinforcementLearningEnvironments.jl](https://github.com/JuliaReinforcementLearning/ReinforcementLearningEnvironments.jl). \ No newline at end of file +For higher level APIs you may refer [ReinforcementLearningEnvironments.jl](https://github.com/JuliaReinforcementLearning/ReinforcementLearningEnvironments.jl). + +# Installation Guidelines + +## Linux: +## 1. Install Julia with specific version: +- To install latest stable version: +``` +curl -fsSL https://install.julialang.org | sh +``` +- To install long term support version: +``` +sudo snap install julia --classic --channel=lts +``` +Suggested to use LTS version to avoid errors with OpenSpiel.jl + +## 2. Add OpenSpiel.jl wrapper to your Julia Repl: +- Open terminal and start a Julia terminal by running the executable + + ``` + julia + ``` +- Open Packages + + ``` + julia> ] + ``` +- Add the below command + + ``` + pkg> add https://github.com/JuliaReinforcementLearning/OpenSpiel.jl.git + ``` +- To test if it installed correctly run the below code in your Julia repl + + ``` + using OpenSpiel + ``` + diff --git a/src/OpenSpiel.jl b/src/OpenSpiel.jl index 67c0b7d..d0c2bda 100644 --- a/src/OpenSpiel.jl +++ b/src/OpenSpiel.jl @@ -5,6 +5,11 @@ using OpenSpiel_jll import CxxWrap:argument_overloads +struct PlayerAction + player::Int32 + action::Int64 +end + @wrapmodule(OpenSpiel_jll.get_libspieljl_path) include("patch.jl")