3.11.4
24.0
Navigate to the project's root.
Install virtualenv
:
?????
Create a virtual environment:
virtualenv .venv
Activate the environment:
.venv\Scripts\activate
pip install pygame
pip install torch torchvision
pip install matplotlib ipython
pip install pyyaml
pygame
: visualization, player controlstorch
, torchvision
: machine learningmatplotlib
ipython
: plotspyyaml
: yaml importsTo deactivate the environment:
deactivate
lorem ipsum
To add a new car, follow these steps:
Add your image (png) to the resources
folder.
NOTE: The image of the car must be facing to the right.
NOTE: The name of the image will be used as the car_id
in the following steps..
Add the car and its attributes to the cars.yaml
file in the reasources
folder. The values are percentage based.
<car_id>:
acceleration: <num>
handling: <num>
max_speed: <num>
max_reverse_speed: <num>
friction: <num>
Fill the values inside the <>
brackets.
Go to the src/utils/enums.py
file and add a new value according to your car_id
.
EXAMPLE = "car_id"
When creating a new car, you can use the enumerator.
example_car = Car(CarID.EXAMPLE.value)
NOTE: Import the enums to access the cars: from utils.enums import CarID
.