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
Admin message
Looking for advice? Join the
Matrix channel for GitLab users in Bielefeld
!
Show more breadcrumbs
Social Cognitive Systems
CoCoSy
Cooperative Cuisine Environment
Commits
b2f08ded
Commit
b2f08ded
authored
1 year ago
by
Fabian Heinrich
Browse files
Options
Downloads
Patches
Plain Diff
Formatting
parent
b01fe5cb
No related branches found
No related tags found
1 merge request
!62
Resolve "Game Flow"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
overcooked_simulator/game_content/agents/random_agent.py
+1
-1
1 addition, 1 deletion
overcooked_simulator/game_content/agents/random_agent.py
overcooked_simulator/gui_2d_vis/overcooked_gui.py
+17
-8
17 additions, 8 deletions
overcooked_simulator/gui_2d_vis/overcooked_gui.py
with
18 additions
and
9 deletions
overcooked_simulator/game_content/agents/random_agent.py
+
1
−
1
View file @
b2f08ded
...
...
@@ -207,7 +207,7 @@ async def agent():
if
not
task_type
:
task_type
=
random
.
choice
([
"
GOTO
"
,
"
PUT
"
,
"
INTERACT
"
])
threshold
=
datetime
.
now
()
+
timedelta
(
seconds
=
15.0
)
threshold
=
datetime
.
now
()
+
timedelta
(
seconds
=
TIME_TO_STOP_ACTION
)
if
task_type
==
"
GOTO
"
:
counter_type
=
random
.
choice
(
list
(
counters
.
keys
()))
task_args
=
random
.
choice
(
counters
[
counter_type
])[
"
pos
"
]
...
...
This diff is collapsed.
Click to expand it.
overcooked_simulator/gui_2d_vis/overcooked_gui.py
+
17
−
8
View file @
b2f08ded
...
...
@@ -793,7 +793,7 @@ class PyGameGUI:
self
.
fullscreen_button
,
self
.
player_selection_container
,
self
.
bot_number_container
,
self
.
press_a_image
self
.
press_a_image
,
]
self
.
tutorial_screen_elements
=
[
...
...
@@ -948,7 +948,10 @@ class PyGameGUI:
relative_rect
=
rect
,
manager
=
self
.
manager
,
object_id
=
"
#recipe
"
,
anchors
=
{
"
centerx
"
:
"
centerx
"
,
"
top_target
"
:
self
.
completed_meals_text_label
},
anchors
=
{
"
centerx
"
:
"
centerx
"
,
"
top_target
"
:
self
.
completed_meals_text_label
,
},
)
else
:
meal_label
=
pygame_gui
.
elements
.
UILabel
(
...
...
@@ -956,7 +959,10 @@ class PyGameGUI:
relative_rect
=
rect
,
manager
=
self
.
manager
,
object_id
=
"
#recipe
"
,
anchors
=
{
"
centerx
"
:
"
centerx
"
,
"
top_target
"
:
self
.
last_completed_meals
[
idx
-
1
]},
anchors
=
{
"
centerx
"
:
"
centerx
"
,
"
top_target
"
:
self
.
last_completed_meals
[
idx
-
1
],
},
)
self
.
last_completed_meals
.
append
(
meal_label
)
self
.
all_completed_meals
.
append
(
meal_label
)
...
...
@@ -1137,7 +1143,10 @@ class PyGameGUI:
manager
=
self
.
manager
,
# container=self.recipes_container,
object_id
=
"
#recipe
"
,
anchors
=
{
"
centerx
"
:
"
centerx
"
,
"
top_target
"
:
self
.
text_recipes_label
},
anchors
=
{
"
centerx
"
:
"
centerx
"
,
"
top_target
"
:
self
.
text_recipes_label
,
},
)
else
:
recipe_label
=
pygame_gui
.
elements
.
UILabel
(
...
...
@@ -1149,7 +1158,10 @@ class PyGameGUI:
manager
=
self
.
manager
,
# container=self.recipes_container,
object_id
=
"
#recipe
"
,
anchors
=
{
"
centerx
"
:
"
centerx
"
,
"
top_target
"
:
self
.
last_recipes_labels
[
idx
-
1
]},
anchors
=
{
"
centerx
"
:
"
centerx
"
,
"
top_target
"
:
self
.
last_recipes_labels
[
idx
-
1
],
},
)
self
.
last_recipes_labels
.
append
(
recipe_label
)
self
.
all_recipes_labels
.
append
(
recipe_label
)
...
...
@@ -1252,7 +1264,6 @@ class PyGameGUI:
self
.
state_player_id
=
player_id
def
setup_game
(
self
,
tutorial
=
False
):
self
.
connect_websockets
()
state
=
self
.
request_state
()
...
...
@@ -1517,11 +1528,9 @@ class PyGameGUI:
case
MenuStates
.
PostGame
:
match
event
.
ui_element
:
case
self
.
next_game_button
:
self
.
button_continue_postgame_pressed
()
case
self
.
finish_study_button
:
self
.
menu_state
=
MenuStates
.
End
...
...
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