Traktor/Readme.md

62 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2021-03-16 10:06:56 +01:00
## Tractor
### 1. Requirements
python version 3.9 or higher
```bash
2021-06-02 14:06:02 +02:00
python3 --version
2021-03-16 10:06:56 +01:00
```
### 2. Create virtual environments and install libs
```bash
virtualenv venv
source activate
pip3 install -r requirements.txt
```
#### 2.1 Graphviz
For ubuntu, we probably need to download graphviz library by apt-get
```bash
sudo apt-get install graphviz
```
2021-03-16 10:06:56 +01:00
### 3. Run application
```bash
python3 main.py
2021-05-05 16:59:41 +02:00
```
### 4. Arguments
Maps are saved in maps directory with json format.\
It's two dimensional array of types of fields. \
Example:
```json
[
["Corn", "Sunflower","Clay"],
["Clay", "Soil","Clay"],
["Sunflower", "Soil","Corn"]
]
```
Warning!
Map must the same sizes what loaded map!\
Change sizes map in config.py
```python
# Board settings:
VERTICAL_NUM_OF_FIELDS = 3
HORIZONTAL_NUM_OF_FIELDS = 3
```
2021-06-23 11:07:35 +02:00
2021-06-02 14:06:02 +02:00
#### 4.1 Save generated map:
2021-05-05 16:59:41 +02:00
```bash
python3 main.py --save-map
2021-05-05 16:59:41 +02:00
```
Map will be saved in maps directory.
Generated filename: map-uuid
2021-06-02 14:06:02 +02:00
#### 4.2 Load map
2021-05-05 16:59:41 +02:00
```bash
python3 main.py --load-map=name_of_map
2021-05-05 16:59:41 +02:00
```
Map must be in the maps directory with json extension.
#### 4.3 Auto mode
Tractor will make own decisions such as harvesting, hydrating and so on using a decision tree.
It also will be moving by a star algorithm and it will be checking fields using a neural network during harvesting crops.
```bash
python3 main.py --auto-mode
```