Skip to content
Snippets Groups Projects
  1. Feb 14, 2024
  2. Feb 08, 2024
    • Florian Schröder's avatar
      Implement vector state representation in game environment · 47cc026f
      Florian Schröder authored
      The game environment now supports vectorized states for reinforcement learning agents. This includes updates on various classes such as OrderManager, Counter, and Player. Several new utility functions are added to facilitate the conversion of the game state to vector form. The new vector state includes players, counters, orders, and game status.
      47cc026f
  3. Feb 07, 2024
    • Florian Schröder's avatar
      Add ManageEnv class and refactor stop_env function · 510b3b94
      Florian Schröder authored
      A new class called ManageEnv was introduced, encapsulating manager_id, env_id, and a reason. The asynchronous function stop_env in the game_server.py file was refactored to take an instance of this class as an argument instead of three separate arguments. Additionally, a trailing slash was added to the stop_env request URL in the overcooked_gui.py file.
      510b3b94
  4. Feb 06, 2024
  5. Feb 04, 2024
    • Florian Schröder's avatar
      Implement additional logging and recording features · 4636abf5
      Florian Schröder authored
      This update introduces comprehensive hook management, improved environment setup functions, and a new class for logging and recording simulations. The enhanced hook management ensures better callback registration and tracing of specific simulation events. Extra setup functions allow more flexibility in setting parameters from the environment config. The new logging and recording class makes it easier to capture simulation data in a structured format for analysis. Various minor fixes and code refactoring are also included.
      4636abf5
  6. Feb 01, 2024
    • Florian Schröder's avatar
      Add agent configurations and improve error handling · 816ca407
      Florian Schröder authored
      This commit introduces agent configuration files for the Overcooked game simulator and enhances error handling in the game server. Notably, it includes safeguards to prevent errors when player data or environment IDs do not exist. Also, it modifies the game GUI to handle player keys and websockets according to the number of humans and bots in the game.
      816ca407
  7. Jan 31, 2024
    • Florian Schröder's avatar
      Add docstrings and type hinting · ff409005
      Florian Schröder authored
      The updates include adding docstrings and type hinting to several classes and methods in multiple Python files. This commit also includes fixes for inconsistent code formatting and minor bugs. The docstrings provide essential details about the classes and methods, improving readability and understanding for other developers. Furthermore, the added type hinting will enable better IDE assistance, static analysis, and clarity on expected input and output types. Lastly, the code formatting fixes and bug fixes enhance the overall code quality and maintainability.
      ff409005
    • Florian Schröder's avatar
      Implement Fog of War feature in game environment · edf18fd8
      Florian Schröder authored
      Added a Fog of War option that if activated, restricts the player's view in the game environment. This feature is an attribute in the game state, view_restriction, and incorporated into the get_json_state method to return player's viewing direction and angle if Fog of War is enabled. Additionally, added view restriction handling in the gui_2d_vis drawing method.
      edf18fd8
  8. Jan 28, 2024
    • Florian Schröder's avatar
      Add manager ID argument to Overcooked simulator · 8d82c086
      Florian Schröder authored
      An optional argument for the list of manager IDs was added across the Overcooked simulator. These IDs are now used for authorization purposes when creating environments. Unauthorized attempts now return HTTP error 403. This helps enhance security and control over environment management in the simulation.
      8d82c086
  9. Jan 26, 2024
    • Florian Schröder's avatar
      Refactor simulator environment and add counter factory · 3606ecfd
      Florian Schröder authored
      This commit simplifies the overcooked environment by refactoring the way counters are created and managed. A new CounterFactory class is introduced, offloading logic from the environment class. In addition, the symbol to character mapping and other environment-related configurations are moved to a separate YAML file. The .gitignore file is also updated to ignore the 'playground' directory. Making these changes enhances code maintainability and readability.
      3606ecfd
    • Florian Schröder's avatar
      Update Overcooked Simulator with dynamic URLs and ports · dd723f17
      Florian Schröder authored
      The Overcooked Simulator has been updated to allow dynamic URLs and ports. This change includes modifications to the README file, and refactoring of main.py, utils.py and overcooked_gui.py to allow these variables to be passed in at runtime. This modification enhances the flexibility of the simulator when integrating with different systems or environments.
      dd723f17
    • Florian Schröder's avatar
      Refactor overcooked simulator and tests, remove GUI lock · 28f70141
      Florian Schröder authored
      This commit removes a temporal lock previously used for the GUI. This leads to refinement and adjustments to the usage of datetime and timedelta in the simulator environment. In the tests, the Simulator class is replaced with directly creating an Environment instance and testing the desired features. Additions include comments for future TODOs relating to further enhancements and checks.
      28f70141
    • Florian Schröder's avatar
      Refactor logging setup and remove obsolete files · f4db8bd5
      Florian Schröder authored
      The logging setup has been moved from the now-deleted main.py to utils.py. In this refactor, the files main.py and simulation_runner.py were removed as they were no longer needed. Unnecessary print statements in overcooked_gui.py and the import of setup_logging in game_server.py were also removed.
      f4db8bd5
    • Florian Schröder's avatar
      Update player speed attribute and handle Enum serialization · dc8d7e4f
      Florian Schröder authored
      Renamed `move_dist` attribute to `player_speed_units_per_seconds` in player configuration. Also implemented `__post_init__` method in Action class to handle conversion from str to Enum type. Added a utility function `custom_asdict_factory` to handle Enum serialization for actions. Various code updates are made to accommodate these changes. Fixes merge bugs.
      dc8d7e4f
    • Florian Schröder's avatar
      Add command line interface to Overcooked Simulator · 01b18acd
      Florian Schröder authored
      A new command line interface has been added to Overcooked Simulator, which starts up the overcooked game engine server and a PyGame 2D Visualization window each in their own process. This is done using argparse for handling command line arguments. Furthermore, some minor changes have been introduced in the game server and GUI scripts to better handle processes and accept host and port arguments.
      01b18acd
    • Florian Schröder's avatar
      Refactor and add detailed docstrings to Overcooked game server · d754c525
      Florian Schröder authored
      Removed the unused 'get_state_simple_json' method, added missing docstrings providing detailed explanations for functions in 'overcooked_simulator/game_server.py' and 'overcooked_simulator/simulation_runner.py'. Implemented a type hinting dictionary in 'overcooked_simulator/server_results.py'. These changes are aimed at improving code readability and maintenance.
      d754c525
  10. Jan 25, 2024
    • Florian Schröder's avatar
      Refactor player id type and remove global constants in UI · 47edb3ea
      Florian Schröder authored
      The player id type is updated from 'int | str' to 'str' across different files to maintain code uniformity and avoid type-related errors. Removed the global constants (USE_PLAYER_COOK_SPRITES, SHOW_INTERACTION_RANGE, SHOW_COUNTER_CENTERS) from gui files for better code structure. Moreover, function annotations are improved by providing more specific types which helps in understanding the codebase. The diff adds additional details in the form of questions or short descriptions in the comments as well.
      47edb3ea
    • Florian Schröder's avatar
      Update Overcooked simulator to support state export in JSON format · df234b9c
      Florian Schröder authored
      The update introduces a new function `get_json_state()` in overcooked_environment.py that exports the current game state in JSON format. Changes were made to player.py, counters.py, and game_items.py to include an additional `to_dict()` function which represents their current status as a dictionary. This commit also includes minor naming changes, such as renaming `beginning_time` to `start_time`.
      df234b9c
    • Florian Schröder's avatar
  11. Jan 24, 2024
    • Florian Schröder's avatar
      Update server and client communication in game simulator · 7ba326c6
      Florian Schröder authored
      The server (game_server.py) and client communication (overcooked_gui.py) now uses the WebSocket communication protocol. In setup.py, the 'requests' module was added as a new requirement. The game simulator now waits for a player to be ready before starting, stops a game environment if no step is taken within a minute, and pauses or unpauses a game environment. Player actions are now handled based on a new 'Action' type. The server also now handles several client types that can send messages.
      7ba326c6
    • Florian Schröder's avatar
      Refactor and enhance Overcooked simulator codebase · 6a57f19a
      Florian Schröder authored
      Codebase for Overcooked simulator has been refactored. File rearrangement includes deletions and renaming to better reflect their functionalities. Within the code, several updates are made like support for using both file paths and direct strings as configurations. These amendments improve the organization, modularity, and overall efficiency of the code.
      6a57f19a
  12. Jan 19, 2024
  13. Jan 17, 2024
  14. Jan 11, 2024
  15. Jan 10, 2024
Loading