From f0eea2845d5e26eca2219e7dd42c7920dbb275aa Mon Sep 17 00:00:00 2001
From: fheinrich <fheinrich@techfak.uni-bielefeld.de>
Date: Tue, 26 Mar 2024 15:10:09 +0100
Subject: [PATCH] Added layouts for study, changed study configs

---
 .../configs/environment_config.yaml           |   2 +
 .../layouts/overcooked-1/1-1-far-apart.layout |   2 +-
 .../study_layouts/1-1-far-apart.layout        |  14 +++
 .../study_layouts/1-4-bottleneck.layout       |  14 +++
 .../layouts/study_layouts/1-5-circle.layout   |  14 +++
 .../study_layouts/forced-cooperation.layout   |   9 ++
 .../configs/study/study_config.yaml           | 114 +++++++++++++++---
 7 files changed, 149 insertions(+), 20 deletions(-)
 create mode 100644 cooperative_cuisine/configs/layouts/study_layouts/1-1-far-apart.layout
 create mode 100644 cooperative_cuisine/configs/layouts/study_layouts/1-4-bottleneck.layout
 create mode 100644 cooperative_cuisine/configs/layouts/study_layouts/1-5-circle.layout
 create mode 100644 cooperative_cuisine/configs/layouts/study_layouts/forced-cooperation.layout

diff --git a/cooperative_cuisine/configs/environment_config.yaml b/cooperative_cuisine/configs/environment_config.yaml
index 5c7ef948..25514c3b 100644
--- a/cooperative_cuisine/configs/environment_config.yaml
+++ b/cooperative_cuisine/configs/environment_config.yaml
@@ -13,6 +13,7 @@ game:
 layout_chars:
   _: Free
   hash: Counter  # #
+  equal: EdgeCounter  # =
   A: Agent
   pipe: Extinguisher
   P: PlateDispenser
@@ -187,6 +188,7 @@ hook_callbacks:
       - content_ready
       - dispenser_item_returned
       - additional_state_update
+      - game_ended_step
 
     callback_class: !!python/name:cooperative_cuisine.recording.FileRecorder ''
     callback_class_kwargs:
diff --git a/cooperative_cuisine/configs/layouts/overcooked-1/1-1-far-apart.layout b/cooperative_cuisine/configs/layouts/overcooked-1/1-1-far-apart.layout
index 1b0b160c..5cf16b3f 100644
--- a/cooperative_cuisine/configs/layouts/overcooked-1/1-1-far-apart.layout
+++ b/cooperative_cuisine/configs/layouts/overcooked-1/1-1-far-apart.layout
@@ -1,6 +1,6 @@
 ###N#T##U####
 #___________|
-L___A___A___#
+#___A___A___#
 #___________S
 ##########__+
 P___________#
diff --git a/cooperative_cuisine/configs/layouts/study_layouts/1-1-far-apart.layout b/cooperative_cuisine/configs/layouts/study_layouts/1-1-far-apart.layout
new file mode 100644
index 00000000..651db57d
--- /dev/null
+++ b/cooperative_cuisine/configs/layouts/study_layouts/1-1-far-apart.layout
@@ -0,0 +1,14 @@
+=#N#T###U###=
+#___________|
+#___A_______#
+#___________S
+=#########__+
+P___________#
+$_______A___#
+$___________X
+=##C#C###@@#=
+
+; seconds=150
+; plates={c:0, d:0}
+; dirty_plates=true
+; link: https://overcooked.fandom.com/wiki/1-1_(Overcooked!)
\ No newline at end of file
diff --git a/cooperative_cuisine/configs/layouts/study_layouts/1-4-bottleneck.layout b/cooperative_cuisine/configs/layouts/study_layouts/1-4-bottleneck.layout
new file mode 100644
index 00000000..60eb7af8
--- /dev/null
+++ b/cooperative_cuisine/configs/layouts/study_layouts/1-4-bottleneck.layout
@@ -0,0 +1,14 @@
+=#S+#====C#C#=
+T____#==#____|
+M_A__####__A_#
+B____________#
+L____####____$
+#____#==#____$
+#____#==#____P
+X____#==#____#
+=QQ#U====#@@@=
+
+; seconds=240
+; plates={c:0, d:0}
+; dirty_plates=true
+; link: https://overcooked.fandom.com/wiki/1-4_(Overcooked!)
\ No newline at end of file
diff --git a/cooperative_cuisine/configs/layouts/study_layouts/1-5-circle.layout b/cooperative_cuisine/configs/layouts/study_layouts/1-5-circle.layout
new file mode 100644
index 00000000..995c7634
--- /dev/null
+++ b/cooperative_cuisine/configs/layouts/study_layouts/1-5-circle.layout
@@ -0,0 +1,14 @@
+====P$$#====
+=T#N____##|=
+#_A________X
+#_###S+###_#
+#_#======#_#
+#_#======#_#
+#_####@@##_#
+#________A_#
+=#C#C###U#U=
+
+; seconds=240
+; plates={c:0, d:0}
+; dirty_plates=true
+; link: https://overcooked.fandom.com/wiki/1-5_(Overcooked!)
\ No newline at end of file
diff --git a/cooperative_cuisine/configs/layouts/study_layouts/forced-cooperation.layout b/cooperative_cuisine/configs/layouts/study_layouts/forced-cooperation.layout
new file mode 100644
index 00000000..39fdd1a4
--- /dev/null
+++ b/cooperative_cuisine/configs/layouts/study_layouts/forced-cooperation.layout
@@ -0,0 +1,9 @@
+=#C#C#####$$=
+#___________#
+#_A_________P
+#_____##@#@#=
+X_____#_____X
+=###@##_____|
+F_________A_#
+Q___________K
+=#+S###LT#MB=
\ No newline at end of file
diff --git a/cooperative_cuisine/configs/study/study_config.yaml b/cooperative_cuisine/configs/study/study_config.yaml
index 366615b0..af7e1a24 100644
--- a/cooperative_cuisine/configs/study/study_config.yaml
+++ b/cooperative_cuisine/configs/study/study_config.yaml
@@ -1,58 +1,134 @@
 levels:
 
   - config_path: CONFIGS_DIR/environment_config.yaml
-    layout_path: LAYOUTS_DIR/overcooked-1/1-1-far-apart.layout
+    layout_path: LAYOUTS_DIR/study_layouts/1-1-far-apart.layout
     item_info_path: CONFIGS_DIR/item_info.yaml
     name: "Level 1"
     seed: 12345
     config_overwrite:
+      player_config:
+        speed_units_per_seconds: 5
       game:
-        time_limit_seconds: 300
+        time_limit_seconds: 10
+        validate_recipes: false
       plates:
         clean_plates: 0
         dirty_plates: 0
-    orders:
-      order_gen_kwargs:
-        order_duration_random_func:
-          kwargs:
-            a: 60
-            b: 70
+        return_dirty: true
+      orders:
+        meals:
+          all: false
+          list:
+            - TomatoSoup
+            - OnionSoup
+        order_gen_kwargs:
+          order_duration_random_func:
+            kwargs:
+              a: 60
+              b: 70
+          sample_on_dur_random_func:
+            func: uniform
+            kwargs:
+              a: 45
+              b: 35
 
   - config_path: CONFIGS_DIR/environment_config.yaml
-    layout_path: LAYOUTS_DIR/overcooked-1/1-4-bottleneck.layout
+    layout_path: LAYOUTS_DIR/study_layouts/1-4-bottleneck.layout
     item_info_path: CONFIGS_DIR/item_info.yaml
-    name: "Level 2"
+    name: "Level 3"
     seed: 12345
     config_overwrite:
+      player_config:
+        speed_units_per_seconds: 5
       game:
-        time_limit_seconds: 300
+        time_limit_seconds: 10
+      plates:
+        clean_plates: 1
+        dirty_plates: 0
+        return_dirty: true
+      orders:
+        meals:
+          all: false
+          list:
+            - Burger
+            - Salad
+            - TomatoSoup
+        order_gen_kwargs:
+          order_duration_random_func:
+            kwargs:
+              a: 60
+              b: 70
+          sample_on_dur_random_func:
+            func: uniform
+            kwargs:
+              a: 45
+              b: 35
 
   - config_path: CONFIGS_DIR/environment_config.yaml
-    layout_path: LAYOUTS_DIR/overcooked-1/1-5-circle.layout
+    layout_path: LAYOUTS_DIR/study_layouts/1-5-circle.layout
     item_info_path: CONFIGS_DIR/item_info.yaml
-    name: "Level 3"
+    name: "Level 2"
     seed: 12345
     config_overwrite:
+      player_config:
+        speed_units_per_seconds: 5
       game:
-        time_limit_seconds: 300
+        time_limit_seconds: 10
+        validate_recipes: true
       plates:
         clean_plates: 1
         dirty_plates: 0
-        return_dirty: false
+        return_dirty: true
+      orders:
+        meals:
+          all: false
+          list:
+            - TomatoSoup
+            - OnionSoup
+        order_gen_kwargs:
+          order_duration_random_func:
+            kwargs:
+              a: 60
+              b: 70
+          sample_on_dur_random_func:
+            func: uniform
+            kwargs:
+              a: 45
+              b: 35
+
 
   - config_path: CONFIGS_DIR/environment_config.yaml
-    layout_path: LAYOUTS_DIR/overcooked-1/4-1-moving-counters.layout
+    layout_path: LAYOUTS_DIR/study_layouts/forced-cooperation.layout
     item_info_path: CONFIGS_DIR/item_info.yaml
     name: "Level 4"
     seed: 12345
     config_overwrite:
+      player_config:
+        speed_units_per_seconds: 5
       game:
-        time_limit_seconds: 300
+        time_limit_seconds: 10
       plates:
         clean_plates: 0
         dirty_plates: 0
-
-
+        return_dirty: true
+      orders:
+        meals:
+          all: false
+          list:
+            - Burger
+            - Salad
+            - Chips
+            - BurgerWithChips
+        order_gen_kwargs:
+          order_duration_random_func:
+            kwargs:
+              a: 60
+              b: 70
+          sample_on_dur_random_func:
+            func: uniform
+            kwargs:
+              a: 40
+              b: 50
 
 num_players: 1
 num_bots: 0
-- 
GitLab