Skip to content

CesMak/mlacht-schafkopf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tutorials

I created some tutorials to explain in detail the code etc. See here

Install

Install Gym Environment

git clone https://github.com/CesMak/mlacht-schafkopf.git
cd mlacht-schafkopf
python3 -m venv .env
source .env/bin/activate
cd gym
pip3 install -e .

Install Test Environment

source .env/bin/activate
## required for testing environment:
pip3 install coverage
pip3 install gymnasium
## required for visualizing MCTS
sudo apt-get install graphviz
pip3 install graphviz

Bash commands

alias cd_schafkopf='source /home/markus/Documents/06_Software_Projects/mlacht-schafkopf/.env/bin/activate && cd /home/markus/Documents/06_Software_Projects/mlacht-schafkopf'
alias run_all_tests='cd /home/markus/Documents/06_Software_Projects/mlacht-schafkopf/tests/unit && python3 -m coverage run -m unittest && python -m coverage report && cd /home/markus/Documents/06_Software_Projects/mlacht-schafkopf'

Run Unit Tests

cd /mlacht-schafkopf/tests/unit

# run all testclasses
python -m unittest discover -v
# run a single testmodule (go inside unit folder)
python -m unittest test_player.TestPlayer.test_Options -v

# Code coverage
python -m coverage run -m unittest
python -m coverage report
python -m coverage html

Now you can do the TUTORIALS