This commit is contained in:
JohnJim0816
2021-04-04 16:59:03 +08:00
parent 14b66bfb16
commit 312b57fdff
8 changed files with 221 additions and 44 deletions

19
codes/test.py Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env python
# coding=utf-8
'''
Author: John
Email: johnjim0816@gmail.com
Date: 2021-03-25 23:25:15
LastEditor: John
LastEditTime: 2021-03-26 16:46:52
Discription:
Environment:
'''
from collections import defaultdict
import numpy as np
action_dim = 2
Q_table = defaultdict(lambda: np.zeros(action_dim))
Q_table[str(0)] = 1
print(Q_table[str(0)])
Q_table[str(21)] = 3
print(Q_table[str(21)])