crazydonkey200 / neural-symbolic-machines

Neural Symbolic Machines is a framework to integrate neural networks and symbolic representations using reinforcement learning, with applications in program synthesis and semantic parsing.
Apache License 2.0
375 stars 69 forks source link

Why targets=actions? #31

Closed guotong1988 closed 5 years ago

guotong1988 commented 5 years ago

image In https://github.com/crazydonkey200/neural-symbolic-machines/blob/master/nsm/agent_factory.py

image In https://github.com/crazydonkey200/neural-symbolic-machines/blob/master/nsm/model_factory.py

I guess targets should at least be related to rewards. Thank you!!

crazydonkey200 commented 5 years ago

The reward is provided through the weights. The targets are the actions. You can think of REINFORCE as a weighted log-likelihood training where the reward or advantage times probability is used as the weight and the action is used as the target.

guotong1988 commented 5 years ago

thank you very much