MathematicsofDopaminemaster

所属分类:matlab编程
开发工具:matlab
文件大小:1035KB
下载次数:1
上传日期:2019-05-05 20:29:38
上 传 者lkd
说明:  Mathematics of Dopamine Algorithm

文件列表:
actions (29817, 2018-10-03)
main.py (2082, 2018-10-03)
maze_env.py (2455, 2018-10-03)
qlearn2.gif (1679885, 2018-10-03)
rl_brain.py (1929, 2018-10-03)
simple_kalman_filter.py (1562, 2018-10-03)
td_learning.py (1198, 2018-10-03)
visualiser.py (2180, 2018-10-03)

## Overview This is the code for [this](https://youtu.be/-vhYoS3751g) video on Youtube by Siraj Raval on the Mathematics of Dopamine. Credit for the q learning + TD Error code go to [pierpaolo](https://github.com/PierpaoloLucarelli/QLearningMaze). The other 2 scripts i hacked together myself. Enjoy! ![q-learning td error](https://raw.githubusercontent.com/PierpaoloLucarelli/QLearningMaze/master/qlearn2.gif) Goal: Reaching the yellow oval while avoiding black blocks and moving enemy (red block) # QLearningMaze Implementation of Q-Learning usind TD error for optimally navigating a maze while avoiding a moving enemy. # To run: ```sh $ pip install numpy pandas $ python main.py ``` Project comes with trained Qtable in pickled file **action** You may run in the following ways ### Importing Q-table and running optimal policy ```sh $ python main.py ``` ### Training ```sh $ python main.py --test ``` ### Training + GUI (slow, mostly for debugging) ```sh $ python main.py --test --vis ``` ### Algorithm used Q-values are updated based on the following formula: ## pseudo formula newVal = oldVal + learningRate * (reward + discount_val * maxValOfNextState - oldVal)

近期下载者

相关文件


收藏者