A platform for coding and running card playing bots
Project description
Schnapsen platform - Project Intelligent Systems 2024-2025
Getting started
This is a platform for the schnapsen card game. To get to know the concept of the game, please visit this web page.
To use the platform, your python version must be at least 3.10. The code has been tested with python 3.13, let us know if you encounter issues.
We strongly suggest installing conda (or pip) and using an environment.
Getting an environment
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 below. Some IDEs also support the use of environments, and can help you install dependencies.
getting the platform
After you have created the environment, make sure it is enabled. Then, clone the repository, go into the folder and install the schnapsen package and its dependencies in editable mode by running:
pip install -e .
To run the tests, run:
pip install -e '.[test]' # on Linux / MacOS
pip install -e ".[test]" # on Windows
pytest ./tests
If the above fails, try deactivating your environment and activating it again. Then retry installing the dependencies.
Running the CLI
After intalling, you can try the provided command line interface examples. Most examples are bots playing against each other; read the code for details.
To run the CLI, run:
python executables/cli.py
This will list the available commands.
For example, if you want try a RandBot play against another RandBot, type
python executables/cli.py random-game.
Running the GUI
The graphical user interface (GUI) lets you play visually against a bot (e.g., You vs. RandBot).
To start the GUI, run:
python executables/server.py
Now, open your webbrowser and type in the server address (i.e., http://127.0.0.1:8080). By default, you are playing against RandBot. You can modify the code in executables/server.py to play against other bots.
Implementing more bots
You will find bot examples in the src/schnapsen/bots folder.
You can look at the example_bot.py file for various methods provided to your bot.
The documentation for the platform is hosted at https://intelligent-systems-course.github.io/schnapsen/
Troubleshooting
Run the right python
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 details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file schnapsen-0.0.5.tar.gz.
File metadata
- Download URL: schnapsen-0.0.5.tar.gz
- Upload date:
- Size: 59.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
822cf3d40c291144ff2acbd1adfe59892b174f206b6c6bf4a85a2cd923ab3b4d
|
|
| MD5 |
dc459e106f119a54cdeb4ccf4876b7fa
|
|
| BLAKE2b-256 |
3a19fd6396dfa04b515cdbe465d41f48a070d4454276a5d86b56e69078ac37bf
|
Provenance
The following attestation bundles were made for schnapsen-0.0.5.tar.gz:
Publisher:
publish-to-pypi.yml on intelligent-systems-course/schnapsen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
schnapsen-0.0.5.tar.gz -
Subject digest:
822cf3d40c291144ff2acbd1adfe59892b174f206b6c6bf4a85a2cd923ab3b4d - Sigstore transparency entry: 159899297
- Sigstore integration time:
-
Permalink:
intelligent-systems-course/schnapsen@fe93f6ec06eff2edb55be2c45f2d959daba346ec -
Branch / Tag:
refs/tags/v0.5 - Owner: https://github.com/intelligent-systems-course
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@fe93f6ec06eff2edb55be2c45f2d959daba346ec -
Trigger Event:
push
-
Statement type:
File details
Details for the file schnapsen-0.0.5-py3-none-any.whl.
File metadata
- Download URL: schnapsen-0.0.5-py3-none-any.whl
- Upload date:
- Size: 57.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a128eaaf746eeed2b7618f8bfe0669d060fc8310dc00a8eb40b883e704fd929f
|
|
| MD5 |
ff409c393bde913d8458308b97379f7b
|
|
| BLAKE2b-256 |
694b468000a881fff02029d80f8d71c3a38ac71015fead41578cd808fc1a9cf5
|
Provenance
The following attestation bundles were made for schnapsen-0.0.5-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on intelligent-systems-course/schnapsen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
schnapsen-0.0.5-py3-none-any.whl -
Subject digest:
a128eaaf746eeed2b7618f8bfe0669d060fc8310dc00a8eb40b883e704fd929f - Sigstore transparency entry: 159899298
- Sigstore integration time:
-
Permalink:
intelligent-systems-course/schnapsen@fe93f6ec06eff2edb55be2c45f2d959daba346ec -
Branch / Tag:
refs/tags/v0.5 - Owner: https://github.com/intelligent-systems-course
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@fe93f6ec06eff2edb55be2c45f2d959daba346ec -
Trigger Event:
push
-
Statement type: