-
Notifications
You must be signed in to change notification settings - Fork 359
Overcooked Environment #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mmbajo
wants to merge
154
commits into
PufferAI:3.0
Choose a base branch
from
mmbajo:roze-overcooked-dev
base: 3.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+2,229
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Introduced core files for the Overcooked multiagent environment, including `binding.c`, `overcooked.c`, `overcooked.h`, and `overcooked.py`. - Implemented initialization, logging, and step functions for agent interactions. - Added rendering and cleanup functionalities for the environment. - Provided a template for users to create their own multiagent environments based on Overcooked.
- Updated `binding.c`, `overcooked.c`, and `overcooked.h` to support a single-agent Overcooked environment. - Replaced multi-agent parameters with single-agent equivalents, including max steps and grid size. - Enhanced observation and action spaces to reflect the new gameplay structure. - Implemented item handling and grid management for the cooking environment. - Adjusted rendering logic to visualize the agent and items correctly.
- Added entry to ignore all dsym files to prevent them from being tracked in the repository.
- Changed default dimensions of the Overcooked environment from 10x10 to 5x5 in both C and Python implementations. - Updated grid size from 50 to 100 for better visualization. - Introduced a new cramped room layout for testing. - Enhanced grid parsing logic to accommodate the new layout and item types. - Adjusted agent starting position and rendering logic for improved gameplay experience.
- Updated the `is_valid_position` function to check for EMPTY instead of WALL, ensuring correct position validation within the grid.
- Implemented logic for agent interactions, allowing the agent to pick up items, put down items on specific tiles, and retrieve ingredients from boxes. - Enhanced the `handle_interaction` function to manage the agent's held item based on the current tile and agent's facing direction. - Added boundary checks to ensure valid interactions within the grid.
- Introduced helper functions for item management: `get_item_at`, `add_item`, and `remove_item`. - Implemented `get_agent_color` function to determine the agent's color based on the held item. - Updated rendering logic to draw the agent with the appropriate color based on the item they are holding.
- Introduced various chef images (EAST, NORTH, SOUTH, WEST) with different hats and dishes. - Added individual item images such as arrows and interaction icons. - Included object images for dishes, onions, and pots. - Added multiple soup images representing different cooking stages and states. - Updated terrain images for counters, dishes, and ingredients.
- Added new terrain textures for floor, counter, pot, serve, and ingredient boxes. - Introduced object textures for onions, tomatoes, dishes, and soups. - Implemented chef sprite textures for all directions and held items. - Updated rendering logic to utilize textures for grid tiles and items, improving visual fidelity. - Added texture unloading in cleanup to manage resources effectively.
- Changed chef sprite texture file names to remove specific hat identifiers, streamlining asset management. - Ensured consistency in texture naming for all chef directions (NORTH, SOUTH, EAST, WEST).
- Introduced cooking states and parameters for managing cooking pots. - Implemented logic for adding ingredients to pots, starting cooking, and handling cooked or burnt states. - Enhanced rendering to display cooking progress and states visually on stoves. - Added functions for initializing and updating cooking pots, ensuring proper resource management during gameplay.
- Introduced a new item type for plated soup, allowing players to hold and place soups with ingredient information. - Updated agent and item structures to track soup ingredients and states. - Modified interaction logic to require a plate for picking up cooked soup and to preserve ingredient data when placing plated soup. - Enhanced rendering logic to display appropriate textures for plated soups and their respective ingredients. - Added new chef sprite textures for holding soups, improving visual representation during gameplay.
- Introduced a new configuration file `overcooked.ini` for the Overcooked environment. - Defined parameters for the base, environment, and training settings, including package name, environment name, number of environments, agents, goals, and training hyperparameters. - This file will facilitate easier adjustments to gameplay settings and training configurations.
- Reduced the number of agents from 8 to 2 in the `overcooked.ini` configuration file. - This change aims to streamline gameplay dynamics and enhance performance by limiting the number of active agents in the environment.
- Updated the Overcooked environment to support multiple agents, allowing cooperative play. - Introduced new parameters for agent management, including `num_agents` in the environment configuration. - Modified initialization, action handling, and rendering logic to accommodate multiple agents. - Enhanced interaction mechanics to track actions and states for each agent, improving gameplay dynamics. - Updated documentation and comments to reflect the transition from a single-agent to a multi-agent environment.
- Updated the observation size calculation to reflect a one-hot encoded grid with detailed channel breakdown. - Enhanced the `compute_observations` function to include terrain types, item types, agent positions, and cooking states. - Added logic for encoding agent states and cooking progress, improving the observation data structure for multi-agent gameplay. - Included debug information for initial observations to assist in development and testing.
- Updated the observation size calculation to a flat array format, simplifying the structure for multi-agent gameplay. - Enhanced the `compute_observations` function to include detailed agent states, item positions, and cooking pot information. - Improved clarity in comments regarding the observation components, aiding future development and understanding of the observation space. - Removed outdated one-hot encoding logic, streamlining the observation process for better performance.
- Implemented a new function to evaluate served dishes and assign rewards based on ingredient correctness. - Added logic to handle the completion of serving a plated soup, including clearing the agent's held items. - Enhanced interaction mechanics to incorporate dish evaluation, improving gameplay dynamics and agent cooperation. - Updated comments for clarity on the new reward structure and potential future enhancements.
- Increased the maximum steps from 200 to 400 to allow for longer gameplay sessions. - Adjusted reward values for served dishes from 10.0 to 1.0 and step penalty from -0.1 to 0.0 to refine the reward system and enhance player experience. - These changes aim to improve the overall dynamics and strategy within the Overcooked environment.
…onment - Introduced a new function to evaluate dishes served by agents, improving gameplay dynamics. - Updated rendering logic to accommodate an additional status display area, enhancing visual feedback during gameplay. - Adjusted drawing positions for various elements to account for the new status area, ensuring a clear and organized interface. - Improved comments for clarity on the new rendering adjustments and dish evaluation mechanics.
- Included 'overcooked' as a new game type in the MAKE_FUNCTIONS dictionary. - This addition expands the available game modes, enhancing the versatility of the environment.
- Updated the Overcooked demo to include neural network functionality, allowing agents to make decisions based on learned weights. - Replaced random action selection with a neural network for agent actions, enhancing gameplay dynamics. - Added a performance testing function to evaluate agent actions over a specified time period. - Included necessary weight files for neural network operations, improving the overall complexity and strategy of the game.
Author
- Introduced new metrics to the Log structure, including correct and wrong dishes, ingredients picked, pots started, items dropped, agent collisions, and cooking time efficiency. - Updated relevant functions to increment these statistics during gameplay, enhancing performance tracking and gameplay analysis. - Initialized user stats upon environment reset to ensure accurate tracking from the start of each episode.
- Removed penalty for serving wrong dishes, now only tracking the count of wrong dishes. - This change simplifies the reward system and focuses on performance metrics without penalizing agents for incorrect actions.
- Simplified the dish evaluation function by removing unnecessary comments and streamlining the tracking of correct and wrong dishes. - Maintained the focus on performance metrics while ensuring clarity in the code structure.
- Updated the observation size to a fixed 96-dimensional vector per agent, improving clarity and consistency in agent state representation. - Introduced helper functions to find the nearest objects and items, streamlining the observation computation process. - Detailed the structure of the observation vector, including player features, teammate features, and absolute position, ensuring comprehensive agent information for gameplay. - Removed outdated comments and improved documentation for better understanding of the observation components.
- Updated the observation vector size from 96 to 76 dimensions, reflecting a more accurate representation of agent states. - Adjusted distance calculations to ensure proper type handling and consistency across functions. - Enhanced teammate feature extraction, including proximity to various objects and pot states, improving the overall observation detail. - Updated comments for clarity on the structure and purpose of the observation components, ensuring better understanding for future development.
…ed environment. Fix for displaying UserStats in CLI and logs. - Added initialization of the episode counter in the reset function to track the number of episodes accurately. - Updated performance metrics at the end of each episode, including normalization of dishes served and scoring based on episode returns. - These changes enhance the logging capabilities for better performance analysis and gameplay tracking.
…d bit manipulation - Changed the type of agent_position_mask from uint32_t to uint64_t in both the Overcooked logic and types headers to support larger grid sizes and enhance bit manipulation capabilities.
- Introduced a new layout type, LAYOUT_FORCED_COORDINATION, to enhance gameplay dynamics. - Updated the layout information structure to include details for the new layout, improving the variety of kitchen configurations available.
…vercooked - Updated the main function to include weight file selection for the new LAYOUT_FORCED_COORDINATION, enhancing gameplay dynamics. - Added the binary weight file puffer_overcooked_weights_fc.bin to support the new layout, ensuring proper weight management for this configuration.
- Introduced a new function, find_nearest_item_by_type, to enhance agent behavior by allowing them to locate the nearest item of a specified type. - This addition improves gameplay dynamics by enabling agents to make more informed decisions based on item proximity.
- Increased the observation vector size from 39 to 43 dimensions for each agent, reflecting the addition of new proximity features. - Updated relevant comments and documentation to accurately describe the new structure of the observation space. - Adjusted rendering and configuration files to align with the updated observation dimensions.
- Introduced a new reward configuration for picking up plates, enhancing the reward system for agents. - Updated relevant files to include the new reward parameter and its handling in the game logic, improving gameplay dynamics and agent behavior.
- Changed the layout from 'cramped_room' to 'forced_coordination' to align with the new gameplay dynamics. - Adjusted the downsample parameter from 10 to 1 for improved performance. - Added a reward for picking up plates, further enhancing the reward system for agents.
- Increased the weights size for the LAYOUT_FORCED_COORDINATION from 138119 to 138631 to accommodate changes in the weight file. - Updated the binary weight file puffer_overcooked_weights_fc.bin to ensure proper functionality with the new configuration.
- Corrected the weights size for the 'cramped_room' layout from 552476 to 138631 to match the updated binary weight file. - Ensured consistency between the weights file and the configuration for improved functionality.
- Increased the weights size for the LAYOUT_ASYMMETRIC_ADVANTAGES from 138119 to 138631 to match the updated binary weight file. - Ensured consistency between the weights file and the configuration for improved functionality.
- Introduced a new layout type, COORDINATION_RING, to enhance gameplay dynamics. - Updated the overcooked_types.h file to include the new layout configuration, improving the variety of kitchen setups available for agents.
- Introduced the LAYOUT_COORDINATION_RING to enhance gameplay variety. - Updated overcooked_types.h and overcooked.py to include the new layout. - Adjusted overcooked.c to handle weights file selection for the new layout, ensuring proper functionality.
- Introduced two new kitchen layouts: forced_coordination and coordination_ring, enhancing gameplay complexity. - Provided detailed descriptions and spawn points for each layout to assist players in understanding the new configurations.
- Changed the weights file path for the LAYOUT_COORDINATION_RING from 'puffer_overcooked_weights_cr.bin' to 'puffer_overcooked_weights_cor.bin' to reflect the new naming convention. - Added the new binary weights file 'puffer_overcooked_weights_cor.bin' to support the updated layout configuration.
- Introduced the LAYOUT_COUNTER_CIRCUIT to enhance gameplay variety. - Updated overcooked_types.h and overcooked.py to include the new layout. - Adjusted overcooked.c to handle weights file selection for the new layout, ensuring proper functionality. - Expanded README.md with detailed description and spawn points for the counter circuit layout, improving player guidance.
- Introduced a new binary weights file 'puffer_overcooked_weights_cc.bin' to support the latest layout configuration. - This addition enhances the gameplay experience by providing necessary weight data for the Overcooked environment.
- Updated the rendering logic in overcooked_render.h to correct observation indices for various game elements, ensuring accurate display of game state. - Adjusted text formatting for observations related to pots, ingredients, and walls to reflect the new indices, enhancing clarity in the game's UI.
- Simplified the evaluation of served dishes by removing commented-out rules and redundant code. - Enhanced reward distribution for agents based on dish correctness, ensuring clarity in reward calculations. - Updated episode return logging to streamline performance tracking.
- Updated the scoring system to provide dynamic rewards based on the time taken to serve dishes, improving performance tracking. - Removed redundant score increments to streamline the evaluation process for served dishes.
- Replaced the existing 'puffer_overcooked_weights_cor.bin' with a new version to enhance gameplay dynamics. - This update ensures the weights file is aligned with the latest configuration changes in the Overcooked environment.
- Replaced the existing 'puffer_overcooked_weights_cc.bin' with a new version to improve gameplay dynamics. - This update aligns the weights file with recent configuration changes in the Overcooked environment.
- Replaced the existing 'puffer_overcooked_weights_fc.bin' with a new version to improve gameplay dynamics. - This update aligns the weights file with recent configuration changes in the Overcooked environment.
- Replaced the existing 'puffer_overcooked_weights_cor.bin' with a new version to enhance gameplay dynamics. - This update aligns the weights file with the latest configuration changes in the Overcooked environment.
- Changed the layout from 'forced_coordination' to 'cramped_room' to enhance gameplay dynamics. - Added new learning rate, entropy coefficient, clipping coefficient, gamma, and GAE lambda parameters for improved training flexibility. - Updated the configuration to support advanced training techniques, ensuring better performance in the Overcooked environment.
- Updated the rendering logic in overcooked_render.h to display individual ingredients in pots when not cooking, improving visual clarity. - Implemented dynamic positioning for ingredient textures based on their count, enhancing the overall presentation of the game state.
- Updated the texture selection logic in overcooked_render.h to use ingredient count instead of cooking progress for determining soup textures, improving clarity in visual feedback. - Adjusted the size and positioning of individual ingredient textures when not cooking for better visual representation.
- Streamlined the rendering process in overcooked_render.h by consolidating texture loading and drawing logic for improved performance and clarity. - Enhanced the visual representation of cooking states and ingredient interactions, ensuring a more intuitive gameplay experience. - Adjusted the layout and positioning of various elements to better align with the game's design requirements.
- Eliminated redundant code for drawing agent-related lines in overcooked_render.h, streamlining the rendering process. - This change enhances performance and clarity by focusing on essential rendering elements.
Author
|
@jsuarez5341 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


This PR introduces a Overcooked cooking game environment for PufferLib. Sprites were from OvercookedAI
[UPDATE 2026/1/4]

Added the other layouts!