====== Installation ====== Here we assume you have [[courses:be5b33kui:tutorials:python|installed Python]] 3.11 (for SS 2023/24). ===== Installation of required packages ===== You need to have the following **python3** packages: * ''pillow'', if you want to load maze maps from bitmap images, and * ''tkinter'', if you want to use the visualization capabilities. You can get these packages by running these commands from your terminal (preferably from [[https://cw.fel.cvut.cz/wiki/courses/be5b33kui/tutorials/python#python_virtual_environments|a virtual environment]], or a conda environment): # On Linux sudo apt-get install python3-pil.imagetk python-tk # On Mac with Homebrew package manager pip3 install gym numpy pip3 install Pillow brew install python-tk # On Windows pip3 install Pillow ===== Installation of kuimaze2 ===== - Create a working directory somewhere on your drive. (We suggest a separate working directory for each of the tasks you will work on.) Here we assume this directory is called, e.g., ''kui-task''. - There 2 ways to get ''kuimaze2'' module to your system: via ''git'', or using ZIP file: * Using ''git'': - Ensure you have ''git'' installed. If ''git'' is not accessible on your system, [[https://git-scm.com/book/en/v2/Getting-Started-Installing-Git|install it]]. - Clone the kuimaze repository: cd kui-task git clone https://gitlab.fel.cvut.cz/kui-student-materials/kui-maze2 . Mind the last ''.'': it tells ''git'' to clone the repository into the current working directory. If you omit the ''.'', it will create a subdirectory ''kui-maze2'' with the repository content (which is NOT the preferred way here). * Using ZIP file: - Download the codes from [[https://gitlab.fel.cvut.cz/kui-student-materials/kui-maze2|KUI Maze 2]] student repo as ZIP file (or download directly [[https://gitlab.fel.cvut.cz/kui-student-materials/kui-maze2/-/archive/main/kui-maze2-main.zip|kui-maze2-main.zip]] directly. - Inside that archive, you will find ''kui-maze2-main'' folder. Extract the contents of that folder into ''kui-task'' folder. (You should not see ''kui-maze2-folder'' in ''kui-task'' folder.) - Now, in your ''kui-task'', you shall see (among other things) a directory called ''kuimaze2'' with a bunch of Python files. You shall be able to work on your solution in the ''kui-task'' directory. Python scripts/programs stored and run in this directory shall by able to import kuimaze2 and other needed symbols provided by that module.