第一堂:Course overview + the shell

這個系列是從『MIT 的「The Missing Semester of Your CS Education」』這邊延伸出來的,這篇文章講第一堂課「Course overview + the shell」。

前面大概講一下這 11 堂各一個小時的課大概是什麼,後面就開始講 shell 下的操作了。

先講了一些基本指令 (date & echo),然後提到了環境變數 $PATH,接著就講目錄結構與 ls,然後就順便提到 man 可以拿來查說明,接著是講 redirect 與 pipe 以及 root 權限的特殊性 (以及 sudo)。

在課程最後面的這個範例,你第一眼看不會想到是第一堂課就可以教完的東西,但的確是結合了上面提到的所有東西,可以細細品味一下:

$ echo 1 | sudo tee /sys/class/leds/input6::scrolllock/brightness

Backblaze 開了歐洲區機房

Backblaze 開了歐洲機房,所以包括了一般性的 Computer BackupB2 Cloud Storage 都可以選擇要放哪邊了...

歐洲的點是放在荷蘭:

Big news: Our first European data center, in Amsterdam, is open and accepting customer data!

價錢也都跟美國的相同:

Whether you choose EU Central or US West, your pricing for our products will be unchanged:

對於在意資料放美國機房的問題應該有緩解一些...

Linux 第一次完全佔領超級電腦 Top 500 列表

Top 500 公佈新的資料後,就有人發現 Linux 第一次完全佔領了超級電腦 Top 500 列表裡的作業系統:「Linux Now Powers 100% of the World’s Top 500 Supercomputers」。

另外在「China Pulls Ahead of U.S. in Latest TOP500 List」也列出了這次的前五名,可以看出來中國在這塊砸了不少錢:

IBM 的 50 qubit quantum computer

IBM 在展示他們做到了什麼:「IBM makes 20 qubit quantum computing machine available as a cloud service」。

不過重點應該在目前已經拉出 50 qubit prototype 了:

The company also announced that IBM researchers had successfully built a 50 qubit prototype, which is the next milestone for quantum computing, but it’s unclear when we will see this commercially available.

18 個月從 5 qubit 到 20 qubit:

IBM has been offering quantum computing as a cloud service since last year when it came out with a 5 qubit version of the advanced computers. Today, the company announced that it’s releasing 20-qubit quantum computers, quite a leap in just 18 months. A qubit is a single unit of quantum information.

如果是以這樣的速度成長 (每 18 個月變成原來四倍),五年後就有機會殺 RSA 2048 bits 了?(大約需要 4000 個 qubit)

這比想像中快好多,難怪現在密碼學都在討論抵抗 quantum computer 的演算法...

機器學習與情色產業的問題

Bruce Schneier 提到了最近幾個剛好相關的議題,關於機器學習在情色產業使用時遇到的隱私議題:「Technology to Out Sex Workers」。

第一個提到的是 PornHub 用機器學習辨識演員以及各種「其他資訊」,這邊引用的報導是 TechCrunch 的「PornHub uses computer vision to ID actors, acts in its videos」:

PornHub is using machine learning algorithms to identify actors in different videos, so as to better index them.

The computer vision system can identify specific actors in scenes and even identifies various positions and… attributes.

第二個提到的是花名與真實身份連在一起的問題:

People are worried that it can really identify them, by linking their stage names to their real names.

最後是提到 Facebook 已經有能力這樣做,而且已經發生了:

Facebook somehow managed to link a sex worker's clients under her fake name to her real profile.

Her sex-work identity is not on the social network at all; for it, she uses a different email address, a different phone number, and a different name. Yet earlier this year, looking at Facebook’s “People You May Know” recommendations, Leila (a name I’m using using in place of either of the names she uses) was shocked to see some of her regular sex-work clients.

這個議題與 Mass surveillance 有點像...。

關於圍棋貼目的問題...

前陣子 AlphaGo 大獲全勝後放出了五十盤自戰棋譜 (兩台 AlphaGo 自己下),其實有件事情有點出乎大家意料,而在圍棋界被一直討論。就是在這五十盤裡,黑棋與白棋的勝率比是 12:38 (中國規則,黑棋貼 7.5 目的情況),明顯白棋有強大的優勢。

這個 7.5 目指的是,由於黑棋先下 (先手優勢),所以圍的地會比較多,為了彌補白棋後下的這個缺點,一般都會設計「貼目」這個規則。

交大資工的 CGI 團隊在上個月月底發了一篇論文 (參考「CGOS Whole Period Ratings for 19x19 Board」這邊的記錄,在有參加 CGOS 的團隊裡只輸新版的 Zen),討論 value network 的新想法:「Multi-Labelled Value Networks for Computer Go」。

他們對貼目的數量做了分析:

For the training data, we label on output ?? as follows. For each self-play game, first calculate territory difference ? at the end of the game. Then, based on the Chinese rule, label 1 (win) on ?? for all ? < ?, and -1 (lose) for all ? > ?. (Note that the draw case ? = ? is ignored in this paper since the komi is not an integer normally.) For example, if black occupies 7 more points of territory than white, the ?-komi game is considered a win for all ? < 7, and a loss for all ? > 7. Thus, in this case, a 7.5-komi game is a loss, and a 6.5-komi or 0.5-komi game is a win.

這個研究完全顛覆了目前職業棋手一般的理解。目前的理解是,貼 5.5 目是黑棋優勢,貼 7.5 目是白棋優勢 (所謂的大貼目時代)。

接下來應該會有更多的研究出來,圍棋界會不會反思貼目規則呢...

CMU 推出 Product Management 的課程

CMUCS (Computer Science) 發的新聞稿:「Carnegie Mellon Offers New Master's Degree in Product Management」。

副標也清楚寫出是一年的課程:

One-Year Program Turns Computer Professionals Into "CEOs of the Product"

除了 CMU CS 外,也結合了 CMU 的 Tepper Business School 一起開:

A joint program of the university's School of Computer Science (SCS) and Tepper School of Business, the Master of Science in Product Management (MSPM) program will start January 2018.

另外一個不同角度的 Product Management。

Linux 上跑電腦圍棋程式 (CGOS)

這邊講的不是對人下的,而是電腦之間的對弈。

目前大多數的對弈軟體會到「CGOS - A Go Server Just for Computers」這邊對弈,當然目前最紅的是一般 (人類) 正式比賽用的 19x19 棋盤,數子採用中國規則 (相當於貼 7.5 目)。

不過與常見的正式比賽比較不一樣的是採用包干制,每方限時 15 分鐘,超時就直接裁定敗,不過有個小例外:

CGOS silently adds a fraction of a second to each players clock for each move played.

要把圍棋程式接到 CGOS 上面需要兩段程式,一段是 Go Engine 本身要支援 Go Text Procotol (GTP),另外一段是把 GTP 接到 CGOS。

前面 Go Engine 的部份,目前不少圍棋軟體都有支援 GTP,像是 Leela 或是 Ray

後者一般會用 Python CGOS Client

其中比較特別的是 CGOS 的帳號密碼,帳號只允許 18 個字,另外沒有帳號申請系統,第一次用什麼帳號他就自動記錄起來,之後就要用這組。

# config.cfg
Common:
  KillFile = kill.txt

# First engine
GTPEngine:
  Name = Leela090-test
  CommandLine = ./leela090-gtp.sh

  ServerHost = yss-aya.com
  ServerPort = 6819
  ServerUser = Leela090-test
  ServerPassword = mypassword

  NumberOfGames = 1

  SGFDirectory = sgf

然後建立 sgf 目錄存棋譜後,用 python bin/cgosclient.py config.cfg 跑起來。當你 touch kill.txt 後,下一盤棋就會自己結束 (預設是一直下)。

再來是裡面提到的 leela090-gtp.sh

#!/bin/bash
exec /usr/bin/nice -n 20 $(dirname $0)/leela_090_linux_x64_opencl -g -t 8 -b 50 -q -l /tmp/leela090-gtp.log

這邊跑的是 OpenCL 版本,你也可以跑 CPU 版。其中 -g 是 GTP mode,-t 是 CPU thread 數量,-b 是 network latency penalty (避免超時),-q 是 quiet mode,-l 是 log。

NIST 開始徵求 Post-Quantum Cryptography 演算法

現有常見的幾個加密基礎在量子電腦上都有相當快速的解 (像是整數質因數分解、離散對數),只是現在建不出對應夠大台的量子電腦... 但畢竟只是時間的問題了,所以 NIST 照著慣例對外尋求能夠抵抗量子電腦的演算法:「NIST Asks Public to Help Future-Proof Electronic Information」、「Announcing Request for Nominations for Public-Key Post-Quantum Cryptographic Algorithms」。

類似於 Google 先前在 Google Chrome 上實做的 CECPQ1,對 key exchange 的部份加上保護 (Google Chrome 引入 CECPQ1,開始測試 Post-Quantum Cryptography),這次 NIST 是針對 public key crytpsystem 的部份而發的...

投稿時間在 2017 的十一月底,大約一年後就可以看到有哪些演算法要參加競賽了... 不過因為 NSA 的惡名,不知道會不會有其他單位在同個時段啟動類似的活動...

微軟也推出圖片辨識的 API 了

微軟也推出類似於 Google CloudVision API 的服務了:「Microsoft Cognitive Services - Computer Vision API」。

微軟這次推出了三個功能,Analyze an image (類似於 Google Cloud 這邊的 Label Detection)、Generate a thumbnail (Google Cloud 沒有對應的功能) 與 OCR (對應到 Google Cloud 的 OCR)。

微軟的每千次都是 USD$1.5,而 Google 的 Label Detection 則貴多了 (最開始是 USD$5,到最大的量是 USD$2),不知道兩邊辨識的品質如何...

而 OCR 的部份 Google 開始是 $2.5,到最大的量是 $0.6,兩邊的定價策略也蠻有趣的。