# Course References, Links and Random Notes

### Probabilistic Reasoning and Reinforcement Learning

### ECE 493 Technical Electives - Topic 25

# Course Resources

- Notes - https://rateldajer.github.io/ECE493T25S19/
- Slides - see LEARN
- This list of links:
- As a tree: https://gingkoapp.com/UWECE657C
- As plain HTML: https://gingkoapp.com/UWECE657C.html

# Primary References for Course

## Primary References for Probabilistic Reasoning

**[Ermon2019]** - First half of notes are based on Stanford CS 228 (https://ermongroup.github.io/cs228-notes/) which goes even more into details on PGMs than we will.

**[Cam Davidson 2018]** - Bayesian Methods for Hackers - Probabilistic Programming textbook as set of python notebooks.

https://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/#contents

**[Koller, Friedman, 2009]** Probabilistic Graphical Models : Principles and Techniques

The extensive theoretical book on PGMs.

https://mitpress.mit.edu/books/probabilistic-graphical-models

## Primary References for Decision Making Under Uncertainty

**[Dimitrakakis2019]** - Decision Making Under Uncertainty and Reinforcement Learning

http://www.cse.chalmers.se/~chrdimi/downloads/book.pdf

**[Ghavamzadeh2016]** - Bayesian Reinforcement Learning: A Survey. Ghavamzadeh et al. 2016.

https://arxiv.org/abs/1609.04436

**[SuttonBarto2018]** - Reinforcement Learning: An Introduction. Book, free pdf of draft available.

http://incompleteideas.net/book/the-book-2nd.html

# Other Useful Resources

## Reinforcement Learning Tutorial with Demo on GitHub

This is a thorough collection of slides from a few different texts and courses laid out with the essentials from basic decision making to Deep RL. There is also code examples for some of their own simple domains.

https://github.com/omerbsezer/Reinforcement_learning_tutorial_with_demo#ExperienceReplay

## Deep Q Network vs Policy Gradients - An Experiment on VizDoom with Keras

A nice blog post on comparing DQN and Policy Gradient algorithms such A2C.

https://flyyufelix.github.io/2017/10/12/dqn-vs-pg.html

# Topics

## Alpha Go

### Alpha Go Documentary

Timepoint: Jump straight to the part of the Alpha Go Documentary where they explain the learning process Alpha Go uses. It also is the start of the first moment where the program does a creative move that humans did not expect.

https://youtu.be/jGyCsVhtW0M?t=2834

Analysis of What Alpha Go was “thinking” when it played Sedol Lee

https://www.wired.com/2016/03/googles-ai-viewed-move-no-human-understand/

## Bayes Nets

### Tools

**SamIam Bayesian Network GUI Tool**

- Java GUI tool for playing with BNs (its old but its good)

http://reasoning.cs.ucla.edu/samiam/index.php?h=emodels

**Other Tools**

- Bayesian Belief Networks Python Package :

Allows creation of Bayesian Belief Networks

and other Graphical Models with pure Python

functions. Where tractable exact inference

is used.

https://github.com/eBay/bayesian-belief-networks - Python library for conjugate exponential family BNs and variational inference only

http://www.bayespy.org/intro.html - Open Markov

http://www.openmarkov.org/ - Open GM (C++ library)

http://hciweb2.iwr.uni-heidelberg.de/opengm/

### References

Some videos and resources on Bayes Nets, d-seperation, Bayes Ball Algorithm and more:

https://metacademy.org/graphs/concepts/bayes_ball

## Likelihood, Loss and Risk

A Good article summarizing how likelihood, loss functions, risk, KL divergence, MLE, MAP are all connected.

https://quantivity.wordpress.com/2011/05/23/why-minimize-negative-log-likelihood/

## Conjugate Priors

https://en.wikipedia.org/wiki/Conjugate_prior#Table_of_conjugate_distributions

## Multiarmed Bandits

### Multiarmed Bandit : Solving it via Reinforcement Learning in Python

- Quite a good blog post with all the concepts laid out in simple terms in order https://www.analyticsvidhya.com/blog/2018/09/reinforcement-multi-armed-bandit-scratch-python/

### Thompson Sampling

- Long tutorial on TS: https://web.stanford.edu/~bvr/pubs/TS_Tutorial.pdf

## Markov Decision Processes

### Domains

#### Gridworld

## Eligibility Traces

Eligibility traces in tabular setting lead to a significant benefit in training time in additional to the Temporal Difference method.

In Deep RL it is very common to use **experience replay** to reduce overfitting and bias to recent experiences. However, experience replay makes it very hard to leverage eligibility traces which require a sequence of actions to distribute reward backwards.

Discussion about Incompatibility of Eligibility Traces with Experience Replay

Efficient Eligibility Traces for Deep Reinforcement Learning -

Brett Daley, Christopher Amato

Investigating Recurrence and Eligibility Traces in Deep Q-Networks -

Jean Harb, Doina Precup

## Value Function Approximation

### How to use a shallow, linear approximation for Atari

https://www.amii.ca/the-success-of-dqn-explained-by-shallow-reinforcement-learning/

This post explains a paper showing how to achieve the same performance as the Deep RL DQN method for Atari using carefully constructed linear value function approximation.

## Direct Policy Search

- Policy Gradients
- Actor-Critic

## Policy Gradient Algorithms

Some of the posts used for lecture on July 26.

- A good post with all the fundamental math for policy gradients.

https://lilianweng.github.io/lil-log/2018/04/08/policy-gradient-algorithms.html#a3c - Also a good intro post about Policy gradients vs DQN by great ML blogger Andrej Karpathy (this is the one I showed in class with the Pong example):

http://karpathy.github.io/2016/05/31/rl/ - The Open-AI page on the PPO algorithm used on their simulator domains of humanoid robots:

https://openai.com/blog/openai-baselines-ppo/ - Good description of Actor-Critic approach using Sonic the Hedgehog game as example:

https://www.freecodecamp.org/news/an-intro-to-advantage-actor-critic-methods-lets-play-sonic-the-hedgehog-86d6240171d/ - Blog post about how the original Alpha Go solution worked using Policy Gradient RL and Monte-Carlo Tree Search:

https://medium.com/@jonathan_hui/alphago-how-it-works-technically-26ddcc085319

## Actor-Critic Algorithm

Very clear blog post on describing Actor-Critic Algorithms to improve Policy Gradients

https://www.freecodecamp.org/news/an-intro-to-advantage-actor-critic-methods-lets-play-sonic-the-hedgehog-86d6240171d/

## Cutting Edge Algorithms

Going beyond what we covered in class, here are some exciting trends and new advances in RL research in the past few years to find out more about.

### Policy Gradient Methods

As I said in class, PG methods are a fast changing area of RL research. This post has a number of the successful algorithms in this area as of a year ago:

https://lilianweng.github.io/lil-log/2018/04/08/policy-gradient-algorithms.html#actor-critic