Skip to content
Snippets Groups Projects
Commit 39266378 authored by fheinrich's avatar fheinrich
Browse files

config rl

parent e6cf8f73
No related branches found
No related tags found
1 merge request!52Resolve "gym env"
Pipeline #45684 passed
plates:
clean_plates: 1
dirty_plates: 2
plate_delay: [ 5, 10 ]
# range of seconds until the dirty plate arrives.
game:
time_limit_seconds: 300
meals:
all: true
# if all: false -> only orders for these meals are generated
# TODO: what if this list is empty?
list:
- TomatoSoup
- OnionSoup
- Salad
layout_chars:
_: Free
hash: Counter
A: Agent
pipe: Extinguisher
P: PlateDispenser
C: CuttingBoard
X: Trashcan
W: ServingWindow
S: Sink
+: SinkAddon
U: Pot # with Stove
Q: Pan # with Stove
O: Peel # with Oven
F: Basket # with DeepFryer
T: Tomato
N: Onion # oNioN
L: Lettuce
K: Potato # Kartoffel
I: Fish # fIIIsh
D: Dough
E: Cheese # chEEEse
G: Sausage # sausaGe
B: Bun
M: Meat
orders:
order_gen_class: !!python/name:overcooked_simulator.order.RandomOrderGeneration ''
# the class to that receives the kwargs. Should be a child class of OrderGeneration in order.py
order_gen_kwargs:
order_duration_random_func:
# how long should the orders be alive
# 'random' library call with getattr, kwargs are passed to the function
func: uniform
kwargs:
a: 40
b: 60
max_orders: 6
# maximum number of active orders at the same time
num_start_meals: 2
# number of orders generated at the start of the environment
sample_on_dur_random_func:
# 'random' library call with getattr, kwargs are passed to the function
func: uniform
kwargs:
a: 10
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: 0
scores: []
expired_penalty_func: !!python/name:overcooked_simulator.order.simple_expired_penalty ''
expired_penalty_kwargs:
default: 0
serving_not_ordered_meals: !!python/name:overcooked_simulator.order.serving_not_ordered_meals_with_five_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.
player_config:
radius: 0.4
player_speed_units_per_seconds: 1
interaction_range: 1.6
restricted_view: False
view_angle: 95
effect_manager:
FireManager:
class: !!python/name:overcooked_simulator.effect_manager.FireEffectManager ''
kwargs:
spreading_duration: [ 5, 10 ]
fire_burns_ingredients_and_meals: true
extra_setup_functions:
# json_states:
# func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks ''
# kwargs:
# hooks: [ json_state ]
# log_class: !!python/name:overcooked_simulator.recording.LogRecorder ''
# log_class_kwargs:
# log_path: USER_LOG_DIR/ENV_NAME/json_states.jsonl
actions:
func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks ''
kwargs:
hooks: [ pre_perform_action ]
log_class: !!python/name:overcooked_simulator.recording.LogRecorder ''
log_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 ''
kwargs:
hooks: [ order_duration_sample, plate_out_of_kitchen_time ]
log_class: !!python/name:overcooked_simulator.recording.LogRecorder ''
log_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 ''
kwargs:
hooks: [ env_initialized, item_info_config ]
log_class: !!python/name:overcooked_simulator.recording.LogRecorder ''
log_class_kwargs:
log_path: USER_LOG_DIR/ENV_NAME/LOG_RECORD_NAME.jsonl
add_hook_ref: true
......@@ -122,7 +122,7 @@ class EnvGymWrapper(Env):
self.gridsize = 20
environment_config_path: Path = (
ROOT_DIR / "game_content" / "environment_config.yaml"
ROOT_DIR / "game_content" / "environment_config_rl.yaml"
)
layout_path: Path = ROOT_DIR / "game_content" / "layouts" / "rl.layout"
item_info_path: Path = ROOT_DIR / "game_content" / "item_info.yaml"
......@@ -149,7 +149,7 @@ class EnvGymWrapper(Env):
self.action_space_map[idx] = item
self.global_step_time = 0.5
self.global_step_time = 1
self.in_between_steps = 1
self.action_space = spaces.Discrete(len(self.action_space_map))
......@@ -195,7 +195,7 @@ class EnvGymWrapper(Env):
def reset(self, seed=None, options=None):
environment_config_path: Path = (
ROOT_DIR / "game_content" / "environment_config.yaml"
ROOT_DIR / "game_content" / "environment_config_rl.yaml"
)
layout_path: Path = ROOT_DIR / "game_content" / "layouts" / "rl.layout"
item_info_path: Path = ROOT_DIR / "game_content" / "item_info.yaml"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment