tensorflow-rl-pong | Pong AI trained using policy | Machine Learning library
kandi X-RAY | tensorflow-rl-pong Summary
kandi X-RAY | tensorflow-rl-pong Summary
Pong AI trained using policy gradient-based reinforcement learning
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initialize the agent .
- Train the model .
- Compute discounted rewards .
- Preprog prepro .
- Perform a forward pass on the model .
- Loads checkpoint .
tensorflow-rl-pong Key Features
tensorflow-rl-pong Examples and Code Snippets
Community Discussions
Trending Discussions on tensorflow-rl-pong
QUESTION
I can't wrap my head around question: how exactly negative rewards helps machine to avoid them?
Origin of the question came from google's solution for game Pong. By their logic, once game finished (agent won or lost point), environment returns reward (+1 or -1). Any intermediate states return 0 as reward. That means each win/loose will return either [0,0,0,...,0,1] either [0,0,0,...,0,-1] reward arrays. Then they discount and standardize rewards: ...ANSWER
Answered 2019-Feb-19 at 11:42"Tensorflow optimizer minimize loss by absolute value (doesn't care about sign, perfect loss is always 0). Right?"
Wrong. Minimizing the loss means trying to achieve as small a value as possible. That is, -100 is "better" than 0. Accordingly, -7.2 is better than 7.2. Thus, a value of 0 really carries no special significance, besides the fact that many loss functions are set up such that 0 determines the "optimal" value. However, these loss functions are usually set up to be non-negative, so the question of positive vs. negative values doesn't arise. Examples are cross entropy, squared error etc.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tensorflow-rl-pong
You can use tensorflow-rl-pong like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page