Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| from __future__ import print_function | |
| # Deep Deterministic Policy Gradient Method | |
| # David Silver et al. | |
| # implemented in plain Keras, by Qin Yongliang | |
| # 2017 01 13 | |
| ''' | |
| summary |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!