-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtest_env.py
More file actions
38 lines (35 loc) · 921 Bytes
/
test_env.py
File metadata and controls
38 lines (35 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import sys
if "../" not in sys.path:
sys.path.append("../")
from envs.TwoGoalGridWorld import TwoGoalGridWorld
UP = 0
RIGHT = 1
DOWN = 2
LEFT = 3
STAY = 4
env = TwoGoalGridWorld(shape = [3,4],
r_correct = 1,
r_incorrect = -1,
r_step = 0,
r_wall = -.1,
p_rand = 0,
goal_locs = None,
goal_dist = None)
#print('move left into wall')
#print(env.P[4][LEFT])
#print(env.P[8][LEFT])
#print('move right from left wall')
#print(env.P[4][RIGHT])
#print(env.P[8][RIGHT])
#print('move right into wall')
#print(env.P[7][LEFT])
#print(env.P[11][LEFT])
#print('move left from right wall')
#print(env.P[7][RIGHT])
#print(env.P[11][RIGHT])
#print('move up into goal')
#print(env.P[4][UP])
#print(env.P[7][UP])
for i in range(12):
print('state %i' % i)
print(env.P[i])