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
d533db29
Commit
d533db29
authored
1 year ago
by
Fabian Heinrich
Browse files
Options
Downloads
Patches
Plain Diff
Validation can be turned off in config
parent
6d6c804d
No related branches found
No related tags found
1 merge request
!72
Resolve "Too large number of selected players does not break the gui and environment"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cooperative_cuisine/configs/environment_config.yaml
+2
-1
2 additions, 1 deletion
cooperative_cuisine/configs/environment_config.yaml
cooperative_cuisine/environment.py
+21
-4
21 additions, 4 deletions
cooperative_cuisine/environment.py
with
23 additions
and
5 deletions
cooperative_cuisine/configs/environment_config.yaml
+
2
−
1
View file @
d533db29
...
...
@@ -5,8 +5,9 @@ plates:
# range of seconds until the dirty plate arrives.
game
:
time_limit_seconds
:
300
time_limit_seconds
:
1
undo_dispenser_pickup
:
true
validate_recipes
:
false
meals
:
all
:
true
...
...
This diff is collapsed.
Click to expand it.
cooperative_cuisine/environment.py
+
21
−
4
View file @
d533db29
...
...
@@ -287,11 +287,28 @@ class Environment:
self
.
counter_positions
=
np
.
array
([
c
.
pos
for
c
in
self
.
counters
])
# TODO Maybe validation can be turned off in config...
meals_to_be_ordered
=
self
.
validate_environment
()
assert
meals_to_be_ordered
,
"
Need possible meals for order generation.
"
if
(
"
validate_recipes
"
in
self
.
environment_config
[
"
game
"
].
keys
()
and
self
.
environment_config
[
"
game
"
][
"
validate_recipes
"
]
):
# TODO Maybe validation can be turned off in config...
meals_to_be_ordered
=
self
.
validate_environment
()
assert
meals_to_be_ordered
,
"
Need possible meals for order generation.
"
available_meals
=
{
meal
:
self
.
item_info
[
meal
]
for
meal
in
meals_to_be_ordered
}
else
:
all_meals
=
{
meal_name
:
meal_info
for
meal_name
,
meal_info
in
self
.
item_info
.
items
()
if
meal_info
.
type
==
ItemType
.
Meal
}
available_meals
=
(
{
n
:
self
.
item_info
[
n
]
for
n
in
self
.
environment_config
[
"
meals
"
][
"
list
"
]}
if
not
self
.
environment_config
[
"
meals
"
][
"
all
"
]
else
all_meals
)
available_meals
=
{
meal
:
self
.
item_info
[
meal
]
for
meal
in
meals_to_be_ordered
}
self
.
order_manager
.
set_available_meals
(
available_meals
)
self
.
order_manager
.
create_init_orders
(
self
.
env_time
)
self
.
start_time
=
self
.
env_time
...
...
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