Recent Posts

Reinforcement Learning Lesson 3

4 minute read

In this lesson, we will learn about what to do when we have no knowledge about the MDP. In the last lesson, we learnt about how to solve a MDP when we have f...

Reinforcement Learning Lesson 2

3 minute read

In the last post, we introduced the definition of Markov Decision Process and Bellman Equation. Now, if you are given the states \( S \), action $A$, transit...

Reinforcement Learning Lesson 1

5 minute read

This is the first post for the series reinforcement learning. The main source for the entire series is here. The post mainly focus on summarizing the content...

Clean Code Summarize

4 minute read

Here is just some tips I think is most useful for guiding me to write better code from book Clean Code: A Handbook of Agile Software Craftsmanship.

[CodeFights] NumberGameVI

1 minute read

The problem is available here. A relatively straight forward game problem. If the current person want to win, the only requirement is that there exist a move...

[Lintcode] Interval Sum II

1 minute read

Given an integer array in the construct method, implement two methods query(start, end) and modify(index, value): For query(start, end), return the...

[Hackerrank] Cut the tree

1 minute read

The problem is available here. The idea is to use postorder traversal of the tree to enumerate each possible remove of edge, and return the sum of the sub-tr...