diff --git a/overcooked_simulator/game_content/tutorial/tutorial_env_config.yaml b/overcooked_simulator/game_content/tutorial_env_config.yaml similarity index 56% rename from overcooked_simulator/game_content/tutorial/tutorial_env_config.yaml rename to overcooked_simulator/game_content/tutorial_env_config.yaml index 2d03eb20e13515ff609bdfdc7bc69e9c11363eaf..e8d1d02e4e7cbd2453cefcdef3e19b875095e949 100644 --- a/overcooked_simulator/game_content/tutorial/tutorial_env_config.yaml +++ b/overcooked_simulator/game_content/tutorial_env_config.yaml @@ -2,6 +2,7 @@ plates: clean_plates: 2 dirty_plates: 0 plate_delay: [ 5, 10 ] + return_dirty: false # range of seconds until the dirty plate arrives. game: @@ -76,22 +77,8 @@ orders: b: 20 sample_on_serving: false # Sample the delay for the next order only after a meal was served. - score_calc_gen_func: !!python/name:overcooked_simulator.order.simple_score_calc_gen_func '' - score_calc_gen_kwargs: - # the kwargs for the score_calc_gen_func - other: 20 - scores: - Burger: 15 - OnionSoup: 10 - Salad: 5 - TomatoSoup: 10 - expired_penalty_func: !!python/name:overcooked_simulator.order.simple_expired_penalty '' - expired_penalty_kwargs: - default: -5 - serving_not_ordered_meals: !!python/name:overcooked_simulator.order.serving_not_ordered_meals_with_zero_score '' - # a func that calcs a store for not ordered but served meals. Input: meal - penalty_for_trash: !!python/name:overcooked_simulator.order.penalty_for_each_item '' - # a func that calcs the penalty for items that the player puts into the trashcan. + serving_not_ordered_meals: true + # can meals that are not ordered be served / dropped on the serving window player_config: radius: 0.4 @@ -99,7 +86,7 @@ player_config: interaction_range: 1.6 restricted_view: False view_angle: 70 - view_range: 5.5 # in grid units, can be "null" + view_range: 4 # in grid units, can be "null" effect_manager: FireManager: @@ -110,48 +97,84 @@ effect_manager: extra_setup_functions: + # # --------------- Scoring --------------- + orders: + func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' + kwargs: + hooks: [ completed_order ] + callback_class: !!python/name:overcooked_simulator.scores.ScoreViaHooks '' + callback_class_kwargs: + static_score: 20 + score_on_specific_kwarg: meal_name + score_map: + Burger: 15 + OnionSoup: 10 + Salad: 5 + TomatoSoup: 10 + not_ordered_meals: + func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' + kwargs: + hooks: [ serve_not_ordered_meal ] + callback_class: !!python/name:overcooked_simulator.scores.ScoreViaHooks '' + callback_class_kwargs: + static_score: 2 + trashcan_usages: + func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' + kwargs: + hooks: [ trashcan_usage ] + callback_class: !!python/name:overcooked_simulator.scores.ScoreViaHooks '' + callback_class_kwargs: + static_score: -5 + expired_orders: + func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' + kwargs: + hooks: [ order_expired ] + callback_class: !!python/name:overcooked_simulator.scores.ScoreViaHooks '' + callback_class_kwargs: + static_score: -10 + # # --------------- Recording --------------- # json_states: - # func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks '' + # func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' # kwargs: # hooks: [ json_state ] - # log_class: !!python/name:overcooked_simulator.recording.LogRecorder '' - # log_class_kwargs: + # callback_class: !!python/name:overcooked_simulator.recording.FileRecorder '' + # callback_class_kwargs: # log_path: USER_LOG_DIR/ENV_NAME/json_states.jsonl actions: - func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks '' + func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' kwargs: hooks: [ pre_perform_action ] - log_class: !!python/name:overcooked_simulator.recording.LogRecorder '' - log_class_kwargs: + callback_class: !!python/name:overcooked_simulator.recording.FileRecorder '' + callback_class_kwargs: log_path: USER_LOG_DIR/ENV_NAME/LOG_RECORD_NAME.jsonl random_env_events: - func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks '' + func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' kwargs: hooks: [ order_duration_sample, plate_out_of_kitchen_time ] - log_class: !!python/name:overcooked_simulator.recording.LogRecorder '' - log_class_kwargs: + callback_class: !!python/name:overcooked_simulator.recording.FileRecorder '' + callback_class_kwargs: log_path: USER_LOG_DIR/ENV_NAME/LOG_RECORD_NAME.jsonl add_hook_ref: true env_configs: - func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks '' + func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' kwargs: hooks: [ env_initialized, item_info_config ] - log_class: !!python/name:overcooked_simulator.recording.LogRecorder '' - log_class_kwargs: + callback_class: !!python/name:overcooked_simulator.recording.FileRecorder '' + callback_class_kwargs: log_path: USER_LOG_DIR/ENV_NAME/LOG_RECORD_NAME.jsonl add_hook_ref: true # info_msg: -# func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks '' +# func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' # kwargs: # hooks: [ cutting_board_100 ] # log_class: !!python/name:overcooked_simulator.info_msg.InfoMsgManager '' # log_class_kwargs: # msg: Glückwunsch du hast was geschnitten! # fire_msg: -# func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks '' +# func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class '' # kwargs: # hooks: [ new_fire ] # log_class: !!python/name:overcooked_simulator.info_msg.InfoMsgManager '' # log_class_kwargs: # msg: Feuer, Feuer, Feuer -# level: Warning \ No newline at end of file +# level: Warning