projects
/
picoclvr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6904703
)
Update.
author
François Fleuret
<francois@fleuret.org>
Sun, 24 Mar 2024 16:34:24 +0000
(17:34 +0100)
committer
François Fleuret
<francois@fleuret.org>
Sun, 24 Mar 2024 16:34:24 +0000
(17:34 +0100)
escape.py
patch
|
blob
|
history
diff --git
a/escape.py
b/escape.py
index
da3e495
..
1c1bc20
100755
(executable)
--- a/
escape.py
+++ b/
escape.py
@@
-200,7
+200,7
@@
def episodes2str(
states, actions, rewards, lookahead_rewards=None, unicode=False, ansi_colors=False
):
if unicode:
states, actions, rewards, lookahead_rewards=None, unicode=False, ansi_colors=False
):
if unicode:
- symbols = "
█@$"
+ symbols = "
·
█@$"
# vert, hori, cross, thin_hori = "║", "═", "╬", "─"
vert, hori, cross, thin_vert, thin_hori = "┃", "━", "╋", "│", "─"
else:
# vert, hori, cross, thin_hori = "║", "═", "╬", "─"
vert, hori, cross, thin_vert, thin_hori = "┃", "━", "╋", "│", "─"
else:
@@
-227,7
+227,7
@@
def episodes2str(
+ "\n"
)
+ "\n"
)
- result += (vert + thin_hori * states.size(-1)) * states.size(1) + vert + "\n"
+
#
result += (vert + thin_hori * states.size(-1)) * states.size(1) + vert + "\n"
def status_bar(a, r, lr=None):
a, r = a.item(), r.item()
def status_bar(a, r, lr=None):
a, r = a.item(), r.item()
@@
-280,7
+280,7
@@
def episodes2str(
######################################################################
if __name__ == "__main__":
######################################################################
if __name__ == "__main__":
- nb, height, width, T =
1000, 4, 6, 20
+ nb, height, width, T =
25, 5, 7, 25
states, actions, rewards = generate_episodes(nb, height, width, T)
seq = episodes2seq(states, actions, rewards, lookahead_delta=T)
s, a, r, lr = seq2episodes(seq, height, width, lookahead=True)
states, actions, rewards = generate_episodes(nb, height, width, T)
seq = episodes2seq(states, actions, rewards, lookahead_delta=T)
s, a, r, lr = seq2episodes(seq, height, width, lookahead=True)