Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Cooperative Cuisine Environment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Social Cognitive Systems
CoCoSy
Cooperative Cuisine Environment
Commits
1de15125
Commit
1de15125
authored
1 year ago
by
Florian Schröder
Browse files
Options
Downloads
Patches
Plain Diff
configure the allowed meals via environment_config.yaml and some comments
parent
bbb290f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!27
Resolve "Orders"
Pipeline
#44062
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
overcooked_simulator/game_content/environment_config.yaml
+21
-1
21 additions, 1 deletion
overcooked_simulator/game_content/environment_config.yaml
overcooked_simulator/overcooked_environment.py
+13
-6
13 additions, 6 deletions
overcooked_simulator/overcooked_environment.py
with
34 additions
and
7 deletions
overcooked_simulator/game_content/environment_config.yaml
+
21
−
1
View file @
1de15125
...
...
@@ -2,39 +2,59 @@ plates:
clean_plates
:
1
dirty_plates
:
2
plate_delay
:
[
5
,
10
]
# seconds until the dirty plate arrives.
game
:
time_limit_seconds
:
180
meals
:
all
:
false
# if all: false -> only orders for these meals are generated
list
:
-
TomatoSoup
-
OnionSoup
-
Salad
orders
:
kwargs
:
duration_sample
:
# 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
:
3
# number of orders generated at the start of the environment
sample_on_dur
:
true
# if true, the next order is generated based on the sample_on_dur_func method in seconds
# if sample_on_serving is also true, the value is sampled after a meal was served, otherwise it is sampled directly after an order generation.
sample_on_dur_func
:
# 'random' library call with getattr, kwargs are passed to the function
func
:
uniform
kwargs
:
a
:
10
b
:
20
sample_on_serving
:
false
# The sample time for a new incoming order is only generated 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
:
Burger
:
15
OnionSoup
:
10
Salad
:
5
TomatoSoup
:
10
score_calc_gen_func
:
!!python/name:overcooked_simulator.order.simple_score_calc_gen_func
'
'
expired_penalty_func
:
!!python/name:overcooked_simulator.order.simple_expired_penalty
'
'
expired_penalty_kwargs
:
default
:
-5
serving_not_ordered_meals
:
null
# a func that calcs a store for not ordered but served meals. Input: meal
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
player_config
:
radius
:
0.4
...
...
This diff is collapsed.
Click to expand it.
overcooked_simulator/overcooked_environment.py
+
13
−
6
View file @
1de15125
...
...
@@ -70,12 +70,23 @@ class Environment:
self
.
item_info_path
:
Path
=
item_info_path
self
.
item_info
=
self
.
load_item_info
()
self
.
validate_item_info
()
if
self
.
environment_config
[
"
meals
"
][
"
all
"
]:
self
.
allowed_meal_names
=
set
(
[
item
for
item
,
info
in
self
.
item_info
.
items
()
if
info
.
type
==
ItemType
.
Meal
]
)
else
:
self
.
allowed_meal_names
=
set
(
self
.
environment_config
[
"
meals
"
][
"
list
"
])
self
.
order_and_score
=
OrderAndScoreManager
(
order_config
=
self
.
environment_config
[
"
orders
"
],
available_meals
=
{
item
:
info
for
item
,
info
in
self
.
item_info
.
items
()
if
info
.
type
==
ItemType
.
Meal
if
info
.
type
==
ItemType
.
Meal
and
item
in
self
.
allowed_meal_names
},
)
plate_transitions
=
{
...
...
@@ -103,11 +114,7 @@ class Environment:
"
W
"
:
lambda
pos
:
ServingWindow
(
pos
,
self
.
order_and_score
,
meals
=
{
item
for
item
,
info
in
self
.
item_info
.
items
()
if
info
.
type
==
ItemType
.
Meal
},
meals
=
self
.
allowed_meal_names
,
env_time_func
=
self
.
get_env_time
,
),
"
T
"
:
lambda
pos
:
Dispenser
(
pos
,
self
.
item_info
[
"
Tomato
"
]),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment