A card game engine for the card game Moska. Contains game engine, players, simulation tools, and human interface.
Project description
MoskaEngine
A repository containing a card game and simulation engine for the card game "Moska". This repository was created as part of a BSc thesis at the University of LUT, Finland. The repository contains subpackages and modules to further study the card game of Moska and develop new AI agents. It allows efficient simulations, benchmarks, data gathering, and playing as a human.
The thesis can be read from: https://urn.fi/URN:NBN:fi-fe2023051644576
Development ideas and TODO: Ask me!
This repository by Leevi is under development, and will be a web application for playing Moska online! Currently, a web application is running at https://moska-online.com/, but it is a very crude version, which was only used to gather data from human players to the thesis.
Install by running:
pip install MoskaEngine
Usage
To play a standard game (same as in https://moska-online.com/) in your terminal, you can create the following script:
from MoskaEngine.Play.play_in_terminal import play_standard_game
# This doesn't take any arguments.
if __name__ == '__main__':
play_game()
To use the game engine, for example, in a web application, you can use the following code:
import sys
from MoskaEngine.Play.play_in_browser import run_as_command_line_program
# This command line program accepts the following arguments:
# --name <player_name> (default: "Human"), this is used to create a folder for the player.
# --gameid <game_id> (default: 0), this is used to determine the game id and to correctly store log files. The next game's id can be retrieved with MoskaEngine.Play.play_in_browser.get_next_game_id(<your-folder>)
# --test (default: False), if set to True, the game will be played with 4 AI agents, and no human.
if __name__ == '__main__':
run_as_command_line_program(sys.argv)
Further customization is very much possible, but requires some knowledge of the MoskaEngine. Futher documentation might be added in the future.
Project details
Release history Release notifications | RSS feed
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 MoskaEngine-0.1.8.tar.gz.
File metadata
- Download URL: MoskaEngine-0.1.8.tar.gz
- Upload date:
- Size: 16.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baaf2a64959781d895727e29e766dc25a5c2c5082a5092221b7b7ed27eecda96
|
|
| MD5 |
e715a01d646752803243e069a35e7589
|
|
| BLAKE2b-256 |
8c0ae04c2e6499f862b895844ef18be3823964e216629df4f7ecea8a1d28a7f5
|
File details
Details for the file MoskaEngine-0.1.8-py3-none-any.whl.
File metadata
- Download URL: MoskaEngine-0.1.8-py3-none-any.whl
- Upload date:
- Size: 16.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa0c4860f106eadcba30051d1ed379393c1dc8d8e461b1a5d48d40b0238c98ec
|
|
| MD5 |
65000190e2bb9b9d93c1ab0d7c9f7aae
|
|
| BLAKE2b-256 |
c01adbc0a106891bf498189c0e360da7f1a5120c6801b107b23ffcc3387f5634
|