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
ffc9571d
Commit
ffc9571d
authored
1 year ago
by
fheinrich
Browse files
Options
Downloads
Patches
Plain Diff
Larger layout, fixed prev score in reset
parent
e9442fc1
No related branches found
No related tags found
1 merge request
!52
Resolve "gym env"
Pipeline
#45806
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/layouts/rl.layout
+5
-4
5 additions, 4 deletions
overcooked_simulator/game_content/layouts/rl.layout
overcooked_simulator/gym_env.py
+9
-6
9 additions, 6 deletions
overcooked_simulator/gym_env.py
with
14 additions
and
10 deletions
overcooked_simulator/game_content/layouts/rl.layout
+
5
−
4
View file @
ffc9571d
#X##
T__#
U__P
#CW#
#X###
T___#
#___#
U___P
#C#W#
This diff is collapsed.
Click to expand it.
overcooked_simulator/gym_env.py
+
9
−
6
View file @
ffc9571d
...
...
@@ -243,6 +243,8 @@ class EnvGymWrapper(Env):
info
=
{}
obs
=
self
.
get_observation
()
self
.
prev_score
=
0
return
obs
,
info
def
get_observation
(
self
):
...
...
@@ -288,14 +290,14 @@ def main():
config
=
{
"
policy_type
"
:
"
MlpPolicy
"
,
"
total_timesteps
"
:
5
00_000
,
# hendric sagt eher so 300_000_000 schritte
"
total_timesteps
"
:
1
00_000
,
# hendric sagt eher so 300_000_000 schritte
"
env_id
"
:
"
overcooked
"
,
}
debug
=
True
do_training
=
True
vec_env
=
True
number_envs_parallel
=
64
number_envs_parallel
=
8
model_classes
=
[
A2C
,
DQN
,
PPO
]
model_class
=
model_classes
[
2
]
...
...
@@ -307,11 +309,11 @@ def main():
model_save_path
=
rl_agent_checkpoints
/
f
"
overcooked_
{
model_class
.
__name__
}
"
if
do_training
:
model
=
model_class
(
config
[
"
policy_type
"
],
env
,
verbose
=
1
,
tensorboard_log
=
f
"
runs/
{
0
}
"
)
if
debug
:
model
.
learn
(
total_timesteps
=
config
[
"
total_timesteps
"
],
...
...
@@ -335,9 +337,9 @@ def main():
save_vecnormalize
=
True
,
)
wandb_callback
=
WandbCallback
(
model_save_path
=
f
"
models/
{
run
.
id
}
"
,
verbose
=
0
,
)
model_save_path
=
f
"
models/
{
run
.
id
}
"
,
verbose
=
0
,
)
callback
=
CallbackList
([
checkpoint_callback
,
wandb_callback
])
model
.
learn
(
...
...
@@ -360,6 +362,7 @@ def main():
time
.
sleep
(
1
/
10
)
action
,
_states
=
model
.
predict
(
obs
,
deterministic
=
False
)
obs
,
reward
,
terminated
,
truncated
,
info
=
env
.
step
(
int
(
action
))
print
(
reward
)
env
.
render
()
if
terminated
or
truncated
:
obs
,
info
=
env
.
reset
()
...
...
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