projects
/
picoclvr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
209f481
)
Update.
author
François Fleuret
<francois@fleuret.org>
Wed, 27 Mar 2024 08:06:02 +0000
(09:06 +0100)
committer
François Fleuret
<francois@fleuret.org>
Wed, 27 Mar 2024 08:06:02 +0000
(09:06 +0100)
greed.py
patch
|
blob
|
history
diff --git
a/greed.py
b/greed.py
index
20cef79
..
dc11d14
100755
(executable)
--- a/
greed.py
+++ b/
greed.py
@@
-77,6
+77,8
@@
def generate_episodes(nb, height=6, width=6, T=10, nb_walls=3, nb_coins=2):
rnd = rnd * (1 - wall.clamp(max=1))
rnd = torch.rand(nb, height, width)
+ rnd[:, 0, 0] = 0 # Do not put coin at the agent's starting
+ # position
coins = torch.zeros(nb, T, height, width, dtype=torch.int64)
rnd = rnd * (1 - wall.clamp(max=1))
for k in range(nb_coins):