Saturday, April 30, 2016

Unity (the game editor) on Ubuntu

Unity 是個非常方便的遊戲編輯器。他在一套軟件禮整合了所有跟遊戲開方有關的功能,而且他支援各式各樣的平台。但這是只編輯出來的遊戲可以在哪些平台上跑。

Unity軟體本身只能在Mac 和Windows上跑。

官網

Unity is available for Windows or Mac OS X


但其實Unity有Linux版本,只是這版本還在實驗階段。安裝步驟很簡單

  1. 先去下載.deb安裝檔案
    在這裡的最下面:http://forum.unity3d.com/threads/unity-on-linux-release-notes-and-known-issues.350256/
  2. 執行 dpkg -i <unity .deb檔案> 
  3. 設定好編輯器 (2017 - 已經不用了)
    1. 安裝MonoDevelop IDE
      > sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
      > echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list

      > sudo apt-get update

      > sudo apt-get install mono-devel mono-complete referenceassemblies-pcl ca-certificates-mono monodevelop monodevelop-nunit monodevelop-versioncontrol monodevelop-database
    2. 去Unity的Edit->Preferences->External Tools 用瀏覽的方式把編輯器設定成 /usr/bin/monodevelop

Thursday, April 21, 2016

Playground

google順手架的類神經網路遊樂園區:playground.tensorflow.org

可以一眼看出以前機器學習和現在深度學習的差別
都是類神經網路但是...

Old-school

Few-layers, focus on trying out different features, use smooth activation such as sigmoid


特徵統統都給我輸進去!

有些特徵可以省略

Deep-learning

學特徵吧!
再試些不同的網路結構
Multiple layers, use raw-inputs, focus on trying different architectures, ReLu activation

Watch out for Overfitting!

適當的regularization調味很重要
在這裡L1 regularization不如L2,而且值也太小

Saturday, April 16, 2016

AlphaGo 筆記 (Part 1)

So last month Go was officially conquered by AI. That means all of the classic board games are now dominated by computers.
How did AlphaGo do it?

The short answer is ... Monte-Carlo Tree Search + DeepLearning + More DeepLearning + Lots of Hardware.

Let's go through these elements in detail.

Start with the concept of a game. One way to look at it is like this: A game is a series of moves made in tandem with an opposing player. We want to make the best decisions. We want a machine that can tell us which decisions to make.

Go: Given a board state, tell me where to put the next stone.

So Go can be thought of as a sequence of board states and moves. Every move creates a new state which prompts a new move which leads to a new state and so on ... With Go (and most board games) the moves alternate between players so from the perspective of one player it's move creates new board state which leads to the opponent moving which leads to a new board state which leads to my next move ...

We can think about this in terms of a simpler game, Tic-Tac-Toe.


Thinking about games in this way means we can treat it as a search problem. Ideally, if we could expand the tree completely (i.e. try out every possible move until each possible end) we could easily pick our next move just by seeing where it leads. We could play "perfectly".

Of course, expanding the tree completely is not feasible for any normal game because the tree grows exponentially. For games with moderate or high branch factor, brute-force expansion of the tree is completely impossible. Even for tic-tac-toe it is unnecessary, because there exist obvious ways to reduce the complexity of the tree. For example, we don't have to consider board positions which are equivalent through rotation of mirroring. 

In the next part I will try to write down what I know about the basic minimax algorithm.