diff --git a/.gitignore b/.gitignore index eb6bba84b50a43973ce3844834114045c6c25b17..7d7fad54966a8b83708a116ccf45f8bafb79a459 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e55859a3894f7b48caeace75d46a4806e467c87..759e25139695f6f699e0168e9c4a3d97b3e2c886 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/cooperative_cuisine/player.py b/cooperative_cuisine/player.py index f4e69c3aa66310f893b854944566a9826bf070f0..a92f12f38886cafac974aa796aff167bc454fc74 100644 --- a/cooperative_cuisine/player.py +++ b/cooperative_cuisine/player.py @@ -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: