-
Notifications
You must be signed in to change notification settings - Fork 32
Getting started with the environment
This page provides a comprehensive guide to setting up and running the project, including instructions for using the Command Line Interface (CLI), Graphical User Interface (GUI), and implementing custom bots. Additionally, troubleshooting steps for Python environments and installation are also covered.
Once you've installed the required dependencies, you can interact with the project using the Command Line Interface (CLI). The CLI is useful for testing the bots and running automated games between them.
python executables/cli.py
This will list all the available commands you can use in the CLI. For example, if you'd like to try a game where two bots (e.g., RandBot) play against each other, run:
python executables/cli.py random-game`.
The random-game command will initiate a game where two bots (random ) play against each other.
The project also includes a graphical user interface (GUI) that lets you play visually against a bot. This is ideal if you prefer a more interactive experience compared to the CLI. To start the GUI, follow these steps:
- Run the server using the following command:
python executables/server.py
- Open a web browser and navigate to http://127.0.0.1:8080. This will load the GUI, where you can play against the default bot, RandBot.
- You can modify the code in executables/server.py to choose different bots if you'd like to play against one other than RandBot.
The project comes with several example bots, which are located in the src/schnapsen/bots directory. If you want to create your own bot or learn how the existing bots work, you can start by looking at the example_bot.py file.
The documentation for the platform is hosted at https://intelligent-systems-course.github.io/schnapsen/
The first hurdle in getting the platform to run is getting the right python version on your system. An easy way to get that is using virtual environments. We suggest you install conda to manage them. Then, you can use conda to create a new environment by running
conda create --name project_is python=3.10
With this environment created, you can start it
conda activate project_is
Inside this environment you can install the dependencies as instructed above.
If you install conda and create an environment, you can run python by just running the python
command.
However, often your system also provides a python version.
To know which python is running, use
which python # on linux
where python # on windows (untested)
Now, you want to look at the output and make sure that this executable is inside the anaconda folder and not where your system stores its executables.
Project Intelligent Systems - Vrije Universiteit Amsterdam