Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MoskaEngine-0.1.13.tar.gz (16.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

MoskaEngine-0.1.13-py3-none-any.whl (16.5 MB view details)

Uploaded Python 3

File details

Details for the file MoskaEngine-0.1.13.tar.gz.

File metadata

  • Download URL: MoskaEngine-0.1.13.tar.gz
  • Upload date:
  • Size: 16.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for MoskaEngine-0.1.13.tar.gz
Algorithm Hash digest
SHA256 96b7bc83bce93e193ed39355c9e6a6037cfa8c0971af7c3a98db9626051965f4
MD5 ec5b80a3d572e8b291d7cd1a707b219c
BLAKE2b-256 244a1e5683fcbde904b2167332ecc0536a97d0e37f2b170b47febb0b9b12977f

See more details on using hashes here.

File details

Details for the file MoskaEngine-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: MoskaEngine-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 16.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for MoskaEngine-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 25a00adfa846bfdd09db27236ea98325b6dcff2b9f233ddb1c7909480d987a87
MD5 29eb42e37fe4cc314996e95fe1ce6fdf
BLAKE2b-256 2276694bc8ec80d3b4d9b13cb61fde290ca20be7c4e035601370f17b829b6046

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page