diff --git a/overcooked_simulator/__init__.py b/overcooked_simulator/__init__.py index 6bf7bbc4da981b37999b1d7507c4186e714bc506..08bf9654f6be49e7362375d6f72cb003b7df1fa6 100644 --- a/overcooked_simulator/__init__.py +++ b/overcooked_simulator/__init__.py @@ -32,7 +32,8 @@ cd overcooked_simulator pip install -e . ``` -# Usage / Examples Our overcooked simulator is designed for real time interaction but also with reinforcement +# Usage / Examples + Our overcooked simulator is designed for real time interaction but also with reinforcement learning in mind (gymnasium environment). It focuses on configurability, extensibility and appealing visualization options. @@ -110,22 +111,20 @@ p1_websocket.send(json.dumps({"type": "get_state", "player_hash": env_info["play state = json.loads(websocket.recv()) # send an action for player "0" -# movement +# --- movement --- action = Action( player="0", action_type=ActionType.MOVEMENT, action_data=[0.0, 1.0], # direction (here straight up) duration=0.5 # seconds ) - -# pickup/drop off +# --- pickup/drop off --- action = Action( player="0", action_type=ActionType.PUT, action_data="pickup", ) - -# interact +# --- interact --- action = Action( player="0", action_type=ActionType.INTERACT, @@ -155,7 +154,7 @@ requests.post( ) ``` -## Direct integration into your code. +## Direct integration into your code You can use the `overcooked_simulator.overcooked_environment.Environment` class and call the `step`, `get_json_state`, and `perform_action` methods directly. diff --git a/overcooked_simulator/game_items.py b/overcooked_simulator/game_items.py index 79395678c909ceb1555923259d027869cbc1349d..9a406367ff71e802b5ba31e6d7bf2cd95304f062 100644 --- a/overcooked_simulator/game_items.py +++ b/overcooked_simulator/game_items.py @@ -139,7 +139,7 @@ class Item: @property def extra_repr(self): - """Stuff to add to the representation of the item in subclasses.""" + """Additional string to add to the representation of the item (in __repr__).""" return "" def can_combine(self, other) -> bool: