2007年4月2日星期一

Tips on Machine Learning

Machine learning(ML) is a very famous topic in CS now. Lots of applications are based on Machine learning. For example, NLC(natural language computing), data mining, categorization are all related to ML. Actually, nowadays, ML is quite largely based on probability and statistcs. that's why I am revisiting probility model recently.
I'm a freshman in ML, but recently i have some special feelings on this topic.
Last week, i joined a match held by topcoder.com. I have got 1 week to solve especially one problem. it's a problem of gambling. In the problem, you are required to write a gamble machine who play a special card game with server. Then your score will be measured by how much money you earn in the game. In detail, you should consider there are 14 opponents on the server who has very different strategy in the game. you will play 10000 games with each player. and your score is the average score you got from each opponent.
there's one trivial solution, you can provide some human-knowledge in your program. such as when your card is very good, then you will bet with server, otherwise you will give up in the game. however with some fixed human-knowlege, you can't win the game because you're never more clever than computer:)
another solution is using ML which is a very suitable algorithm to make your program learn to gamble in the game itself. in such situation, no matter how your opponent change you will learn to win.
So, i used a classical unsupervised learning algorithm called Reinforcement Learning(RL) to learn to gamble. Now i will share the result with you:

1. I use Q-learning algorithm
2. Q-learning is quite largely based on statistics. in fact RL is calculating the maths expecation of the money you can win under a specific strategy you play in a specific state. For example, you get two "Queen"s in the game, RL will calculate under this situation, if you bet, how much you will win on average, or if you give up, how much you will lose on average. In this way, RL will tell you the best strategy under a specific state. if you are familiar with Markov process, you will under stand Q-learning easily.

Till now, you will think that RL is really a very good learner who can always win the game. however in reality, i met lots of prolems, and now i will share it with you and give you my explanation:

1. Very slow converge. since there's so many states, and the next state is undefinite. the convergence is very slow. Since you're only allowed to play with your opponent for only 10000 rounds, you can't learn almost any thing.

2. then i tried another approach, I eliminate lots of states, and construct a relatively very small model of the game. however, i lose again. At last, i found that is because the model is too small, in such a model, the game is quite unfair, the result of RL learning told me that in lots of situation no matter what strategy you play, you will lose.

At last, i don't use RL learning.

Google CV filtering algorithm

The following algorithm is used by google to filter many CVs of applicants.
void filter(CV)
{
if(CV.university.contains("US")
or CV.university.contains("Tsinghua")
or CV.university.contains("Peking U"))
{
accept(CV);
}
else
reject(CV);

}