Skip to content

Commit

Permalink
Merge pull request google-deepmind#62 from jamesdfrost:master
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 270262998
Change-Id: I6418aa456dd5672da1d342285e3ed6fd1287bcb0
  • Loading branch information
open_spiel@google.com authored and open_spiel@google.com committed Sep 23, 2019
2 parents 482b4bd + 1fbf83e commit 127984c
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 8 deletions.
3 changes: 0 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,3 @@ release!). Contributions are certainly not limited to these suggestions!
of value iteration does not support simultaneous move games despite having
the necessary LP-solving routines needed. This is a simple change to support
solving simultaneous-move games.

- **Windows Support**. We would like to officially support Windows, if
possible.
3 changes: 3 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Installation

The instructions here are for Linux and MacOS. For installation on Windows, see
[these separate installation instructions](windows.md).

## Summary

1. Install system packages and download some dependencies. Only needs to be
Expand Down
7 changes: 2 additions & 5 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,5 @@ available from Python.

**Platforms**

OpenSpiel has been tested on Linux (Debian 10 and Ubuntu 19.04). We have not
tested on MacOS or Windows, but since the code uses freely available tools which
are also available on MacOS and Windows, we do not anticipate any (major)
problems compiling and running under those platforms. Patches and instructions
would be much appreciated.
OpenSpiel has been tested on Linux (Debian 10 and Ubuntu 19.04), MacOS, and
[Windows 10 (through Windows Subsystem for Linux)](windows.md).
79 changes: 79 additions & 0 deletions docs/windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Windows Installation using Windows Subsystem for Linux (WSL)

## Purpose of this document

Defines the installation steps to get OpenSpiel running in a Windows 10
environment using WSL. Note that WSL does not include GPU support, so will run
on CPU only.

## Process

This process has been written for Windows 10, and tested on Windows 10 build
1903 (March 2019).

1. Install the Windows Subsystem for Linux:

Run the following command in Windows Powershell:

```
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
```
2. Install Ubuntu Linux from the Windows Store. Currently this is version
18.04::
Open up the Windows Store. Search for Ubuntu. Open up Ubuntu and press "Get"
to install this.
3. First time run of Ubuntu:
Click on the Start Button and choose the Ubuntu icon. Wait until the distro
installs. Provide a username and password for the default user account. Note
that this account is a member of the Linux administrators (sudo) group so
choose a secure username and password combination.
4. Update / Upgrade packages (optional step)
```
sudo apt-get update
sudo apt-get upgrade
```
5. Run through the first part of the OpenSpiel installation
```
git clone https://github.com/deepmind/open_spiel.git
cd open_spiel
./install.sh # you will be prompted for the password created at stage 3. Press Y to continue and install. During installation press Yes to restart services during package upgrades
pip3 install --upgrade -r requirements.txt # Install Python dependenciesmake
```
6. Now need to upgrade make version as the version of make which comes with
Ubuntu 18.04 is not high enough to build OpenSpiel. (Note, this step won't
be necessary if the version of Ubuntu in the Windows store gets upgraded to
19.04)
```
cd ..
wget http://www.cmake.org/files/v3.12/cmake-3.12.4.tar.gz
tar -xvzf cmake-3.12.4.tar.gz
cd cmake-3.12.4/
./configure
make
sudo make install
sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force
cd ../open_spiel
```
7. Finally, continue with the installation and run tests.
```
mkdir build
cd build
# Note: Python version installed should be >= Python_TARGET_VERSION specified here
CXX=g++ cmake -DPython_TARGET_VERSION=3.6 -DCMAKE_CXX_COMPILER=g++ ../open_spiel
make -j12 # The 12 here is the number of parallel processes used to build
ctest -j12 # Run the tests to verify that the installation succeeded
```

0 comments on commit 127984c

Please sign in to comment.