Skip to content
Snippets Groups Projects
Commit a96a9cbb authored by Florian Schröder's avatar Florian Schröder
Browse files

Update .gitignore, .gitlab-ci.yml, player.py

Added 'generated' to .gitignore, updated pdoc footer text in .gitlab-ci.yml, and included interaction state for player in player.py. The player interaction with the counter is now being tracked and a new comment was added for the progress method. This will enhance player's tracking and usage in the game environment.
parent bef24476
No related branches found
No related tags found
No related merge requests found
Pipeline #47828 passed
......@@ -2,6 +2,7 @@
# Edit at https://www.toptal.com/developers/gitignore?templates=python,intellij,visualstudiocode,pycharm,git,flask,django,docusaurus,ros,ros2,linux,macos,windows
playground
generated
### Django ###
*.log
......
......@@ -18,7 +18,7 @@ pages:
- apt-get install -y python3-dev python3-pip graphviz graphviz-dev
- pip install pdoc
- pip install ".[rl]"
- pdoc --output-dir public cooperative_cuisine !cooperative_cuisine.reinforcement_learning --logo https://gitlab.ub.uni-bielefeld.de/uploads/-/system/project/avatar/6780/Cooking-Vector-Illustration-Icon-Graphics-4267218-1-580x435.jpg --docformat google --favicon overcooked-simulator/cooperative_cuisine/pygame_2d_vis/images/favicon.ico --footer-text "Developed@<a href="https://scs.techfak.uni-bielefeld.de/">SCS</a>
- pdoc --output-dir public cooperative_cuisine !cooperative_cuisine.reinforcement_learning --logo https://gitlab.ub.uni-bielefeld.de/uploads/-/system/project/avatar/6780/Cooking-Vector-Illustration-Icon-Graphics-4267218-1-580x435.jpg --docformat google --favicon overcooked-simulator/cooperative_cuisine/pygame_2d_vis/images/favicon.ico --footer-text "Developed@SCS"
artifacts:
paths:
- public
......
......@@ -85,6 +85,7 @@ class Player:
"""The env time until the player wants to move."""
self.interacting: bool = False
"""Is the player currently interacting with a counter."""
def set_movement(self, move_vector, move_until):
"""Called by the `perform_action` method. Movements will be performed (pos will be updated) in the `step`
......@@ -182,6 +183,15 @@ class Player:
self.last_interacted_counter = None
def progress(self, passed_time: timedelta, now: datetime):
"""Iterative progress call on the player.
Similar to the `Counter.progress` method.
How often it is called depends on the `env_step_frequency` or how often `step` is called.
Args:
passed_time: The amount of time that has passed since the last call of the method.
now: The current env time.
"""
if self.interacting and self.last_interacted_counter:
# TODO only interact on counter (Sink/CuttingBoard) if hands are free configure in config?
if self.holding:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment