網頁

2021年11月15日 星期一

夢中夢中的繪畫

夢中夢中的繪畫

剛做了夢, 先是一連串的飛行, 在一個鄉間的路上倒退滑行, 後來索性放開飛上天, 但不像年輕時可以飛得那麼高, 那麼快, 與強烈失重的感覺, 大致上就是在幾層樓的高度隨著地形與建築高低起伏。有時候碰上一堵建築物的高牆飛不過去, 還必須努力爬上去,爬上牆頭才能一飛俯衝而下。後來決定進去一幢建築物, 於是穿門而入, 感覺上像是廢棄了的工廠或是倉庫。有人走進來, 是一位著軍裝的女子, 面目清秀。我有想要親近她的念頭, 先是過去撫摸她的肩膀, 她似乎有感覺, 但不知道怎麼回事, 很疑惑的樣子。接下來我就不細說了, 有點春夢的味道, 還依稀可以聞到她的味道。接著又進來另一位女孩,我做了類似的事情, 也越來越大膽。我可以很肯定地說夢中有觸覺、嗅覺, 還包括口吸舌舔的感覺, 雖不如真實世界的強烈, 但在夢中的感受還是很真實的。


睡睡醒醒幾次, 翻了幾次場景, 後來在一個起居間中, 應該是在家裡。半睡半醒中我把夢中情景畫滿了一本小冊子。我一位大學同學走過來, 看到了這本小冊, 問說是不是我畫的。我回答說就是畫著夢中的景象。接著我哥哥也過來了, 我質疑的一再問他, 是否真的可以看到這本畫冊, 我自己也很驚訝說沒有繪畫天賦的我居然可以畫出那樣的素描。哥哥再三跟我肯定說有看到, 逐漸被他說服說這是真的。我告訴他說我還在半睡半醒的狀態, 一頁頁向他解釋圖畫的內容, 大致上就是夢中的街道與室內景物, 畫得很細緻。還有印象的是一幅畫中有一個壁爐, 爐中有半大不小的火苗。爐旁一位斜坐淺睡的女子, 我解釋說那是我的妻子。特別的是妻子後方牆上的壁紙, 目光一撇之下可以看到一個人的半側臉隱藏在狀似有序又無序的圖案之中, 轉眼又消失, 然後又出現, 連我自己都覺得很巧妙。

2021年10月5日 星期二

作夢都想不到的設計

 剛剛做夢, 趁還沒忘記趕快寫下來。夢中出現一個很特別, 作夢都想不到的設計, 喔, 不對, 那是做夢想到的...

前段忘了, 只記得去了某個地方坐朋友的車回程, 途中停下來買吃的, 是一種很大片的蔥油餅。我要他們等我去上個廁所, 我看了看往左邊人多的地方走去。賣餅的婦人喊聲說是在廟頭那邊, 這才發現右邊不遠是一間廟, 旁邊有條路。沿路走去看到廁所, 簡單、乾淨, 有點老舊, 首先看到兩個小便斗, 特別寬,第二個位置已經有人, 第一個位置空著, 前面擺著一個矮凳。當下並不覺得怪異,  這時一個男人跟我打了個歉,說他要陪朋友尿, 把矮凳搬走往左邊去, 我這才發現更裡面是一排比較簡陋, 一整列流水式的小便池。我去了第一個, 隔板有點歪斜, 石頭打磨出來的小便斗很特別, 有點像洗臉盆, 上頭一個特別設計的龍頭不停出水,形成一個很漂亮, 極薄的弧形水幕。我掏出小頭很痛快的就排放出來, 穿過水幕而去。很精巧的設計,水幕立馬就阻隔了味道還有回彈的尿液。一方面是我站得太靠近, 同時也是, 你們懂得的, 還感覺到水幕淋在小頭時的清涼。但總覺得這個方式怪怪的, 這才發現還有下面的一個斗, 而上頭的是洗手用的, 於是趕快往低處去, 同時很不好意思的看一下有沒有人注意到這種不雅的作法。這時想到為何先前擺了一個矮凳, 原來這是設計給人家坐下來方便的, 難怪位置那麼低。下面的斗也是很精巧, 同一注水幕穿過一條細縫繼續往下,看著黃色的尿液穿越而去, 消失在不停止的水流中....


附註:別問, 我沒尿床, 就是因為必須起來尿尿才能寫下這個夢境。

2021年8月14日 星期六

資訊工程觀點下的空間設計師

 一個場所(place)必須具備什麼條件才能算是dwelling? 我會翻成居所,家應該是很接近的概念。海德格有一段很棒的論述,給我很大的啟示。

海德格怎麼以天地神人來論述 "居所", 可以參閱他寫的這篇短文 (見以下附檔)。這不算是學術論文, 對我而言, 非常難懂, 應該說, 我就是看不懂他究竟在說甚麼, 但從天地神人, 我以資訊觀點切入是得到很大的啟發, 所以我說, 我被他啟發, 但我完全不知道他是否會認同我對其天地神人所做的詮釋。

對我來說, 天地指空間, 天是我們己身經驗無法觸及的空間, 地則是我們以自身的感官認知可以觸及的空間。神(divinities) 人(mortals) 是指時間, divinities 指的是人生命無法體驗的時間, 而mortals指的是一個人生命可及的時間, 整體來說, 天地神人就是指人的經驗可以觸及, 以及不可觸及的時間與空間。

一個空間我們會不會視為居所與安全感有密切的關係,  而安全感來自我們所能掌握的資訊。資訊的定義就是uncover the uncertainty, 去除不確定性, 當我們對一個處所能掌握足夠的資訊以去除不確定性, 我們就可以感到安心, 而視之為居所。 天地神人指居所必須能夠提供我們經驗可觸及與不可觸及, 有關空間與時間的資訊, 我們才能去除足夠的不確定性, 而得以安居於此。

空間可以容物, 而物件的存在與不存在都可以是資訊的媒介。當我們處於一個居所, 我們的周遭環境的事物會帶來空間與時間的資訊, 而這些資訊足以讓我們感到安心, 而得以成為安身立命之所。何為空間的資訊?我舉個例子好了, 我第一次到威尼斯旅遊, 是晚上11點多, 拿著簡單的地圖, 憑藉剛下火車詢問所得的簡單資訊, 在島內迷宮般的路徑找尋一個不起眼的小旅館, 內心是很不安的, 而關鍵是甚麼?因為我沒有足夠的空間資訊來揭露足夠的不確定性, 每當我來到一個小廣場或院落, 面對個方向的路徑而徬徨不知何往, 威尼斯美則美矣, 但不會是能讓我安心的居所。

上述是經驗可及的空間資訊, 而經驗不可及的空間資訊同樣重要, 即使對所處的空間充分的熟悉, 但我們還是不知道會降災於己的瘟疫雷電颱風從何而來, 這種對經驗不可及空間資訊的匱乏就需要被填補, 而填補的內容來自信仰、神話與代代相傳, 來自祖先的傳說。這些資訊究竟有理, 無理, 對或錯其實無關緊要, 最重要的是【信】, 你只要信, 就能填補這個匱乏的資訊而帶來心安, 讓你所處之所在, 成為真正的居所。

時間資訊也是一樣。我們覺得心安, 因為我們安然度過前天, 上周, 與去年, 所以對於明天, 下周, 與明年也具備某種程度的信心, 而對於我麼經驗不可及的時間, 我們會聽來自長輩的敘述, 路口的牌坊沒有任何實際功能, 但卻紀錄先輩們的事蹟, 提醒我們自己的先祖代代安居於此, 也讓我們對自己的未來更有信心, 而更遙遠的過去與未來, 一樣藉由神話與信仰、傳說來填補匱乏。

這個詮釋與建築密切相關, 因為建築師是如假包換的資訊工程師, 一個人身處於一個空間中, 他能夠看到甚麼, 聽到甚麼, 摸到甚麼, 聞到甚麼, 甚至他有多少機會可以見到甚麼人, 和谁說話, 相當程度是被當初設計這個空間的建築師所決定了。我每天上班走在校園的動線, 進了建築物, 搭電梯, 走走廊, 以至於進了我的辦公室, 這一路上所見所聞, 所接觸的的人, 也就是我從周遭空間所能接收到的資訊, 相當程度是被當初規畫校園與設計建築物的建築師所操弄了。

建築師所操弄的元素, 牆、柱、樑、版與開口、門窗, 與其說是建築結構的元素, 也不妨說是空間資訊的擋板;匝道與媒介。牆壁阻隔教室與走廊之間的透過光線與聲音傳遞的資訊, 而門的存在又讓使用者得以局部的操控資訊的流通, 門上用噴砂玻璃覆蓋的開口, 又選擇性的以光線透露出門內教室的活動, 卻以噴砂模糊掉影像以保留部分隱私, 建築師選擇的空間設計, 動線, 開口, 材料, 可以很細膩的控制身處其中的使用者能夠接收到與傳遞出的資訊種類與數量, 而這些資訊, 與使用者是否能夠安身立命於此, 有著密切的關係, 此資訊觀點的詮釋也可以告訴建築系的學生, 為何我們要保存古蹟與歷史文物? 不必是千年的古物, 富麗堂皇的宮殿, 而即使是上一代所留下來不起眼的一道牆, 一扇窗, 都可以是跨越時間而傳遞、保存資訊的媒介, 是營造我們生活空間中天地神人四合一(fourfold unity)無可取代的元素。

2019年11月17日 星期日

MCTS 設計決策輔助

問題的定義:
假設建築師必須做 n 個決策才能完成設計, 而每一個決策有 m個選項,因此所有可能決策的搜尋空間為 m 的 n 次方。一個成功的設計必須通過 x 個可以用程式定義並由電腦有效執行的設計品質檢測函數, 以及一個無法用電腦程式明確定義, 只能由建築師及業主取得主觀共識的檢測門檻。電腦的檢測需要等到所有決策項目都確定之後才能進行, 然而人為主觀檢測則不需要等候每一個決策都確定, 可以在部分決策時就進行檢測。每一設計方案在完成所有決策選項之後就可以極快速地由電腦判定x個可程式定義之檢測項目的得分, 然而人為主觀的檢測項目則需要繁複的溝通與會議才能判定是否通過。在此前提下, 如何運用MCTS提供建築師有效的資訊, 以協助其能更精準有效的完成一或多個成功的設計方案?

例如某建築物立面的帷幕牆共有256片帷幕單元需要設計, 而可供選擇的帷幕單元有兩種。因此 n= 256, m = 2, 共有 2的256次方種決策組合。每個帷幕牆的設計需要滿足 造價、節能與抗風三個可以由電腦程式判定之項目的檢測門檻, 還要能夠滿足建築師與業主對外觀美感的評價。此時MCTS的任務就是提供資訊協助建築師在這2的256次方種可能組合中尋找一個可以成功通過 k 個檢測函數門檻的設計。假設建築師每做一個決策需要 t 的時間, 因此完成一個設計需要 256 t 的時間。而電腦完成所有三項檢測的時間極短, 與256t 相較之下可以忽略不計。然而電腦需要等候所有的設計決策都確定之後才能進行有效的檢測。此外, 建築師與業主對外觀的評價需要繪圖與製作模型等輔助決策工作, 因此也是非常耗時, 假設以yt 的時間計算, y為一個不小的數字。 依此問題的設計, 電腦快速檢測的功能受限於建築師決策以及主觀評定所需的時間, 每檢驗一個設計決策需要 (256+y) t 的時間, 那麼要在 2的256次方可能設計方案中搜尋到極少數成功方案的的機會極其渺茫, 而電腦快速運算的功能絕大部分的時間都是閒置。

MCTS決策輔助:以一個長度為n的array D0代表完成一個設計所需要的所有設計決策。array中每一個item的值可以為 0, 代表建築師尚未針對該項進行決策,也可以是 i  (0 < i <= m),  代表建築師所選擇的設計選項。問題初始設定 array D0 的 每一個項目都是0。電腦隨即重複對n個設計選項進行隨機採樣之後進行m個項目的檢測, 記錄每一個項目每一次設計採樣通過的得分, 計算其平均值、通過機率與標準差, 並使用MCTS back propagation的回饋機制隨值更新。我建議電腦可以提供所有未決策項目每一個選項的期望得分、通過機率與標準差。

一旦建築師做了某些決策, 也就是為D0 的某些項目設定了非0的值, 電腦隨即針對所有未決策的項目進行隨機取樣, 並計算每一個未決策項目的每一個決策選項的成功機率、平均得分與標準差, 隨著採樣數目的增加隨時更新, 並等候建築師進行下一個決策。

以帷幕牆設計為例, 我建議開發第一個測試用程式如下:
int design[256]  = {0, 0, .....0};
void evaluateConstructionCost (int design[], double threshold, ref double score, ref bool pass){}
void evaluateStructure (int design[],
                                      double costDistribution[][],  // 每一個位置各類型帷幕版片之工程費用
                                      double threshold,  //設計目標門檻得分
                                      ref double score, //回傳該設計的得分
                                      ref bool pass){} //回傳該設計是否通過門檻

void evaluateStructure  (int design[],
                                      double windLoadDistribution[][],  // 每一個位置各類型帷幕版片之得分
                                      double threshold, //設計目標門檻得分
                                      ref double score, //回傳該設計的得分
                                      ref bool pass){}//回傳該設計是否通過門檻

void evaluateEnergy   (int design[],
                                      double RadiationDistribution[][],  // 每一個位置各類型帷幕版片之得分
                                      double threshold, //設計目標門檻得分
                                      ref double score, //回傳該設計的得分
                                      ref bool pass){}//回傳該設計是否通過門檻

2019年10月13日 星期日

Cost estimation of curtain wall in early design stages


This note discusses only the cost that can be localized within a limited context. Global attributes such as type diversity and configuration complexity that might add on  cost in fabrication and installation are not included.

Consider three components,  the locking devices, supporting frames and panels. 
  1. locking devices to the structure system
    Considering the entire facade as one piece, the locking devices that are required to firm the entire facade to the structure system are depend on the vertical loads caused by gravity and horizontal loads caused by wind pressure. For this, the cost estimation can be summarized as a function on the panel type and area of the curtain wall system. For each type of panel, consider its weight of unit area. However, this part of cost can be integrated to supporting frame and avoid double counting.
  2. supporting frame
    Supporting frame is most likely coincident with the panel vertices and edges.  Edge length would be an important factor linearly related to the cost for material, fixation, seaming, insulation and so on. Panels are supported by the frames and the weight and wind load would be important factors to design profiles for the supporting frame. Vertices would add on some cost for cutting, joining or  locking devices that would take materials, machining and time for fabrication. The panel area and type would also contribute to the cost of supporting frame due to the weight and wind load. The construction cost of each panel can be linearly proportional to the edge length of each panel.

    I would consider summarizing the construction cost as a weighted linear sum of
    numberOfVertices
    totalEdgeLength
    panelSurfaceArea
    panelType: which is attributed with estimated weighting factors for the above parameters, and weight per unit area for the panel.
    The calculation also needs reference to windLoadContourMap , which is supposed to be derived by some simulation or regulations.
  3. panel
    The panel type and surface area would be the most important factors. For each type of panels, the  cost of material, coating, paints, insulation, ... are proportional to area. Installation would takes one basic cost plus a part that is proportional to the weight and dimension. The dimension can be abbreviated with the sum of width and length for its bounding rectangle. Cost for fixation and seaming have been counted in the supporting frame and are ignored for panel. Wind load would add on some cost that is proportional to the surface area.

    I would consider summarizing the construction cost of each panel as a weighted linear sum of
    surfaceArea
    widthOfBoundingRectangle
    lengthOfBoundingRectangle
    panelType: , which is attributed with estimated weighting factors for the above parameters, and weight per unit area for the panel. The calculation also needs reference to windLoadcontourmap, which is supposed to be derived by some simulation or regulations.

Note for curtain wall

Facade curtain wall design

(for example: Given a 16 floor height building facade for curtain wall design. The structure frame has four 7.2m width spans with 3.6m for floor heights. )

A more general description for coding:

class Facade:
Mesh panelDissection
int[] panelTypes # -1 represent undecided
double[] panelInsulationLevel,
double[][] panelConstructionCostParameters
double[][] windLoadContourMap
double[][] solarRadiationContourMap)
DecisionTree dtree

def constructionCostEvaluation
def solarRadiationHeatGain

The architect needs to make decisions on the followings:

1. Dissections of the curtain wall
The choices for vertical dissections are one, two or three divisions for each span between columns. (just for example, can be any mesh though)
The choices for horizontal dissections are one, two or three divisions for each floor. (just for example, can be any mesh though)
The facade can be represented as a Mesh, with faces as panels on the curtain wall, edges as the supporting frame and vertices as the joints.

2. For each panel, the architect need to make choices among types of panels.
glazing with low E coating or regular
metal panel with high insulation or regular insulation

Evaluation

1. Construction cost evaluation: a function of panel geometry
double facadeConstructionCost( Mesh facade,
int[] panelType,
double[][] panelConstructionCostParameters
double[][] windLoadContourMap)

Construction cost of each panel depends on number of vertices, total edge length, surface area, and panel type.
For panels that need to withstand high wind pressure, extra cost proportional to the panel area is applied to the original cost.
A contour map on the estimated wind load is given. The wind load requirement for each panel is estimated with the surface integral of the wind load.

2. Energy consumption against solar radiation.
double facadeHeatGain( Mesh facade,
int[] panelType,
double[] panelInsulationLevel,
double[][] solarRadiationContourMap)

Total score is graded as the amount of heat gained directly or indirectly from solar radiation.
The insulation level of each type of panel is measured based on some experimental analysis.
Given a contour map that shows intensity distribution of solar radiation on the facade based on some simulations.
The head-gained of a panel is estimated as the product of its insulation level and the surface integral of solar radiation.
This is assuming the situation in the stage of conceptual design, when the architect has to decide the building mass with some concepts about the outlook. In most cases, building mass concerns site situations, urban code regulations and design objectives. The architect might come up with a few design alternatives for building mass, each of which would accommodate enough floor areas for required functional spaces and could be associated with some conceptual design schemes for the overall outlook of the building, probably illustrated with some sketches over the main facade or the entire building. The described setup starts at when the architect has decided the building mass and works on the elevations. When curtain wall has been chosen as one of the possible constructions for the part of the envelope, the architect might take her hands on decisions upon surface dissections and materials, for that would largely define how the building look like after constructed.
The architect may start to think about curtain wall dissections and materials with some knowledge regarding how building envelope may greatly affect the construction cost and energy consumption for the operation of the building. However, estimations on construction cost and energy consumption rely on surface material properties, distributions and quantities, which are unavailable until the design of building envelope system is completed.

MCTS
void mcts( List facades, 
List 
double[][] constructionCostParameters,
double[][] solarRadiationContourMap,
double[][] windLoadContourMap,
The objective is to find good facade designs that fulfill both construction cost and energy saving criteria. The search starts with a facade’s unfinished design as a mesh, with none or some panels assigned with panel types. The search process starts to do expansion, simulation and back propagation and continuously updates and shows the expected value of current partial design. The designer may run serval design alternatives at the same time. The designer may choose any of the design alternative to go on for more detail design, which is to assign some panels with some specific types. The process goes on until the designer finally choose types for every panels.

2019年5月3日 星期五

Monte Carlo Tree Search Assisted Design Decision Making

Monte Carlo Tree Search Assisted Design Decision Making

這個程式是為了模擬一個建築師進行設計時, 要在多個決策選項的搜尋空間中找到能夠被多個評估函數全部接受的決策組合。這些評估函數分為兩種, 有一種是能夠在所有決策都確定以後用電腦進行分析而得到結果的, 例如法規、結構、耗能與工程預算。另一組評估函數是需要專家判斷, 目前無法交由電腦執行, 例如美感、業主偏好、藝術價值等等評估。建築師的任務是要找到能夠通過所有評估項目的決策組合。以下描述兩組MCTS分別描述電腦與設計團隊的作業, 這個研究希望探討MCTS是不是可以提供有用的資訊協助建築設計團隊在設計過程中進行決策。

以下以建築立面的設計為例進行說明:假設建築物立面被分為 n 個區域, 每個區域必須選擇其外牆構造單元, 每個單元有 m 個選項, 因此整個決策空間是由 n 個  m 元選項所構成。每一個構造單元的選用會影響到外牆的結構、工程預算、耗能、採光、隔音等等, 假設目前都已經可以使用電腦運算進行評估, 前提是每一個決策必須都已經確定。建築師另外還需要考慮其他的條件, 必須人為判斷而無法使用電腦評估的, 例如客戶偏好、藝術價值…. 在此情境下, MCTS是否可以發揮其功能, 讓電腦評估的結果可以最大的協助建築師進行決策。建築師需要為n個選項全部決定

搜尋空間:MCTS的搜尋空間是一個16*16的Boolean array, 陣列內256個值給定一個搜尋決策排序之後就定義了一個二元的搜尋樹。搜尋結果必須通過n個檢測函數, 每個檢測函數都通過才算合格。

檢測函數:每一個檢測函數會使用一或多組16*16的Boolean array作為標的, 與受檢測的array逐一進行比對。 每一次比對計算受檢測array與標的array的相似度任一次的比對結果若超過門檻則檢測停止並回傳通過該函數的檢測。

MCTS的搜尋從選擇最優先的決策值開始, 進行expand, simulation之後進行檢測, 檢測結果就進行back propagate, 計算並更新每個決策值的成功率, 一直到被使用者終止為止。

使用者參考各個決策選項的成功率後決定採用某一個或多個決策, 設定其值, MCTS就繼續往下搜尋, 更新後繼未定之決策各選項的成功率。使用者的決策不一定依照所給定的搜尋順序。

以上是第一個執行模式。第二個執行模式則加入第二組MCTS來模擬使用者的決策。第二組所依據的搜尋決策排序未必與第一組相同, 且所使用的評估函數也不相同。第二組進行MCTS, 更新其決策選項之成功率後選定某些決策並設定其值後, 交給第一組MCTS繼續進行程序, 兩組MCTS可以同步進行。第二組在選定決策項目時可以參考第一組MCTS的決策選項成功率, 優先選擇兩組MCTS模擬結果成功率都比較高的選項作為決策, 此部分的決定方式需進一步討論, 初步可以將兩組的成功率乘上權重相加作為選擇依據。

檢測的函數可以選用圖片, sample成16*16矩陣。做法是拿許多張圖片, 定一個16*16的方格, 每一個方格中隨機取一點求rgb的平均, 大或等於128就算白, 小於128就算黑

MCTS其實就是統計取樣, 這個例子中建築師需要做256個二元決策, 如果等到所有的決策都做了才能進行評估, 那一輩子也找不到好設計。MCTS 可以幫建築師用隨機取樣的方式填補其尚未做的決策, 檢測後統計成功率, 告訴建築師目前的決策預期的成功率有多大, 有沒有其他決策選項會有更高的成功率。 254個決策的決策空間如果過於龐大無法在有效時間內運算, 可以縮小。其搜尋困難度可以藉由評估函數的通過率來調整。

實際進行時, 人所組成的設計團隊和電腦同步作業。人在做決策的期間, 電腦24小時不間斷就還未決定的決策進行取樣, 評估後更新決策樹之節點的成功率, 提供給設計者參考。人所構成的設計團隊可能需要幾天的時間, 或許還要開會討論, 在目前階段未定的決策中, 選擇一部份進行決策, 再交給電腦繼續做MCTS

如此來回進行幾個回合之後, 設計團隊確認所有的決策選項, 如果最後的結果可以符合所有的檢測項目就算成功。如果這部分可行, 可以繼續加入優化的功能。就是在所有的評估函數中選擇一個做為優化的目標函數, 原先通不通過的輸出改為得分, 決策樹節點的成功率就變成目標函數的期望值, 設計團隊就可以選擇較高期望值的節點繼續探索更好的設計方案

人和電腦合作的設計流程好像是沒有對手的alphago, 人一步一步把設計做完, 過程中參考電腦提供的各個走法的成功率來做下一步的決策, 與alphago的差別是電腦並不能掌握全部的評估函數, 有一部份是在人的腦中無法用程式處理的。因此我們在電腦模擬時就用兩組檢測函數, 第二組代表人腦冥冥之中的黑箱檢測。最後如果能夠找到設計方案完全符合兩組的檢測函數, 就算勝利。

選擇MCTS的主要原因之一是夠robust, 我們不需要了解搜尋的檢測函數的特性, 有任何需要的評估函數隨時都可以加入搜尋的條件, 也可以隨時撤離不需要的函數。我們也不需要在意搜尋空間太大, 基本上比圍棋小的空間都可以處理, 因此不需要分析搜尋空間的結構以縮小搜尋樹。這兩個特徵都符合設計問題的處理, 也是過去各種方法所遭遇的困境。