Reinforment Learning Introduction 1 - 2
Reinforcement learning, RL is a framework that let an agent to make suitable decisions to achieve best goal. Underneath math problem to solve is a Markov Decision Process, MDP. RL is different from both supervised and unsupervised learning.
Elements of RL
Apart from Agent and Environment, following elements also play central
roles: Policy, Reward Signal, Value Function, and Model of environment.
Policy, is a map from current states to actions to take. It might be
deterministic or stochastic.
Python无成本加速技巧
一种新科学
Graph - DiGraph
1. Concepts
Definition. A directed graph or digraph is a set of nodes and a
collection of directed edges. Each directed edge connects an ordered
pair of nodes.
Definition. A directed path is a path in a digraph is a sequence of nodes in which there is a directed edge pointing from each node in the sequence to its successor in the sequence. A directed cycle is a directed path with at least one edge whose first and last nodes are the same. A simple cycle is a cycle with no repeated edges or nodes. The length of a path is its number of edges.
With above, we can define that a node a is reachable from node b if there is a directed path from a to b.
2. Data Structure
Graph Algorithms - Search
When working with graph, search is an important topic. For example, search for connectivity, search for shortest path. There are two basic strategies to do search in graph: Depth-first(DFS) and Breadth-first(BFS). Note that in this blog, all the discussions are based on undirected graph. But the strategy can be used to all kind of graphs given they share similar data structures.
What kind of problems we are solving?
The basic idea of search in general is to walk through the data structure and collection information we need. In terms of Graph, only two elements matters: nodes (vertices) and edges. Walking through a graph, really means iterating the nodes in a way.
Data Structure
The next questions to ask is that how can I solve a question by looping through the least nodes? Well to answer this question, we need to decide a data structure to represent graph.
Graph basics - 1 Concepts
Graph is a mathematical object to model pairwise connections between objects. There are a lot of applications:

