diff --git a/cooperative_cuisine/configs/environment_config.yaml b/cooperative_cuisine/configs/environment_config.yaml index 4afc109bfd32d70684d36cf5b0faa16fc6465bc2..e11bb2dfc6726d4d4b2a87654f1cc88b4a9c4f1d 100644 --- a/cooperative_cuisine/configs/environment_config.yaml +++ b/cooperative_cuisine/configs/environment_config.yaml @@ -86,7 +86,7 @@ orders: player_config: radius: 0.4 - speed_units_per_seconds: 6 + speed_units_per_seconds: 5 interaction_range: 1.25 restricted_view: False view_angle: 70 @@ -110,11 +110,8 @@ hook_callbacks: time_dependence_kwargs: { } static_score: 100 score_on_specific_kwarg: meal_name - score_map: - Burger: 15 - OnionSoup: 10 - Salad: 5 - TomatoSoup: 10 + score_map: { } + not_ordered_meals: hooks: [ serve_not_ordered_meal ] callback_class: !!python/name:cooperative_cuisine.scores.ScoreViaHooks '' diff --git a/cooperative_cuisine/configs/layouts/study_layouts/1-4-bottleneck.layout b/cooperative_cuisine/configs/layouts/study_layouts/1-4-bottleneck.layout index 60eb7af88bc47cc657b5d23e51556cad9a204fc0..a66163dadb89139302f67d35e1cea1fc1c3a53a9 100644 --- a/cooperative_cuisine/configs/layouts/study_layouts/1-4-bottleneck.layout +++ b/cooperative_cuisine/configs/layouts/study_layouts/1-4-bottleneck.layout @@ -1,12 +1,12 @@ -=#S+#====C#C#= -T____#==#____| -M_A__####__A_# -B____________# -L____####____$ -#____#==#____$ -#____#==#____P -X____#==#____# -=QQ#U====#@@@= +=#S+#===C#C#= +T____#=#____| +M_A__###__A_# +B___________# +L____###____$ +#____#=#____$ +#____#=#____P +X____#=#____# +=QQ#U===#@@@= ; seconds=240 ; plates={c:0, d:0} diff --git a/cooperative_cuisine/configs/study/study_config.yaml b/cooperative_cuisine/configs/study/study_config.yaml index 8edfd117202980b691cd22f2f9fd4d0ce0c15559..b50ac573c318683646d62cedbc5ce247d60c603d 100644 --- a/cooperative_cuisine/configs/study/study_config.yaml +++ b/cooperative_cuisine/configs/study/study_config.yaml @@ -6,11 +6,9 @@ levels: name: "Level 1" seed: 12345 config_overwrite: - player_config: - speed_units_per_seconds: 8 game: time_limit_seconds: 300 - validate_recipes: false + validate_recipes: true plates: clean_plates: 0 dirty_plates: 0 @@ -25,13 +23,13 @@ levels: order_gen_kwargs: order_duration_random_func: kwargs: - a: 5 - b: 6 + a: 60 + b: 70 sample_on_dur_random_func: func: uniform kwargs: - a: 3 - b: 4 + a: 20 + b: 30 hook_callbacks: orders: @@ -43,13 +41,9 @@ levels: score_ratios: [ 0.5, 1, 1 ] steps: [ 0, 0.25, 0.66 ] round_decimals: 0 - static_score: 10 + static_score: 20 score_on_specific_kwarg: meal_name - score_map: - Burger: 40 - Salad: 30 - OnionSoup: 20 - TomatoSoup: 10 + score_map: [ ] - config_path: CONFIGS_DIR/environment_config.yaml layout_path: LAYOUTS_DIR/study_layouts/1-4-bottleneck.layout @@ -57,8 +51,6 @@ levels: name: "Level 2" seed: 12345 config_overwrite: - player_config: - speed_units_per_seconds: 5 game: time_limit_seconds: 300 plates: @@ -83,6 +75,22 @@ levels: kwargs: a: 20 b: 30 + hook_callbacks: + orders: + hooks: [ completed_order ] + callback_class: !!python/name:cooperative_cuisine.scores.ScoreViaHooks '' + callback_class_kwargs: + time_dependence_func: !!python/name:cooperative_cuisine.scores.stepped_score '' + time_dependence_kwargs: + score_ratios: [ 0.5, 1, 1 ] + steps: [ 0, 0.25, 0.66 ] + round_decimals: 0 + static_score: 20 + score_on_specific_kwarg: meal_name + score_map: + Burger: 40 + Salad: 20 + TomatoSoup: 35 - config_path: CONFIGS_DIR/environment_config.yaml layout_path: LAYOUTS_DIR/study_layouts/1-5-circle.layout @@ -90,8 +98,6 @@ levels: name: "Level 3" seed: 12345 config_overwrite: - player_config: - speed_units_per_seconds: 5 game: time_limit_seconds: 300 validate_recipes: true @@ -116,7 +122,19 @@ levels: kwargs: a: 20 b: 30 - + hook_callbacks: + orders: + hooks: [ completed_order ] + callback_class: !!python/name:cooperative_cuisine.scores.ScoreViaHooks '' + callback_class_kwargs: + time_dependence_func: !!python/name:cooperative_cuisine.scores.stepped_score '' + time_dependence_kwargs: + score_ratios: [ 0.5, 1, 1 ] + steps: [ 0, 0.25, 0.66 ] + round_decimals: 0 + static_score: 20 + score_on_specific_kwarg: meal_name + score_map: [ ] - config_path: CONFIGS_DIR/environment_config.yaml layout_path: LAYOUTS_DIR/study_layouts/forced-cooperation.layout @@ -124,8 +142,6 @@ levels: name: "Level 4" seed: 12345 config_overwrite: - player_config: - speed_units_per_seconds: 5 game: time_limit_seconds: 300 plates: @@ -151,6 +167,23 @@ levels: kwargs: a: 20 b: 30 + hook_callbacks: + orders: + hooks: [ completed_order ] + callback_class: !!python/name:cooperative_cuisine.scores.ScoreViaHooks '' + callback_class_kwargs: + time_dependence_func: !!python/name:cooperative_cuisine.scores.stepped_score '' + time_dependence_kwargs: + score_ratios: [ 0.5, 1, 1 ] + steps: [ 0, 0.25, 0.66 ] + round_decimals: 0 + static_score: 20 + score_on_specific_kwarg: meal_name + score_map: + Burger: 40 + Salad: 20 + Chips: 10 + BurgerWithChips: 60 num_players: 1 num_bots: 0 diff --git a/cooperative_cuisine/pygame_2d_vis/drawing.py b/cooperative_cuisine/pygame_2d_vis/drawing.py index 07492722b04bcfc7ac7657986d3a2342f386e6b6..96b7e3b0119db7d0eabd74c0f98598f454b7b533 100644 --- a/cooperative_cuisine/pygame_2d_vis/drawing.py +++ b/cooperative_cuisine/pygame_2d_vis/drawing.py @@ -98,7 +98,7 @@ class Visualizer: else False ) pygame.font.init() - self.font = pygame.font.SysFont("Arial", 26) + self.font = pygame.font.SysFont("Arial", 20) def create_player_colors(self, n) -> None: """Create different colors for the players. The color hues are sampled uniformly in HSV-Space, diff --git a/cooperative_cuisine/pygame_2d_vis/visualization.yaml b/cooperative_cuisine/pygame_2d_vis/visualization.yaml index bae42f801bf125da4813a1fde39b92df2e47e356..9b2dcffe094b750fa66085196ec715fd9d1a5530 100644 --- a/cooperative_cuisine/pygame_2d_vis/visualization.yaml +++ b/cooperative_cuisine/pygame_2d_vis/visualization.yaml @@ -5,7 +5,7 @@ Gui: use_player_cook_sprites: True show_interaction_range: False show_counter_centers: False - press_button_to_continue: True + press_button_to_continue: False GameWindow: screen_margin_proportion: 0.15