Skip to content

Commit 2923ca0

Browse files
committed
Add default action feature
Former-commit-id: 3265f2f
1 parent 5951f39 commit 2923ca0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rlcard/envs/env.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,10 @@ def get_action_feature(self, action):
220220
Returns:
221221
(numpy.array): The action features
222222
'''
223-
raise NotImplementedError
223+
# By default we use one-hot encoding
224+
feature = np.zeros(self.num_actions, dtype=np.int8)
225+
feature[action] = 1
226+
return feature
224227

225228
def seed(self, seed=None):
226229
self.np_random, seed = seeding.np_random(seed)

0 commit comments

Comments
 (0)